REST or gRPC
Difficulty 2 of 5
A front service calls a worker 2,400 times/s. Each call sends 2 KB of structured data and gets 12 KB back. The worker has half a CPU core. Choose the design. Keep p99 below 180 ms, errors below 0.1 percent and cost at or below 14 USD/month.
Options
- JSON over HTTP/2
- JSON over HTTP/2 with a second worker
- gRPC with compact messages
Goals and limits
- p99 latency
- under 180 ms
- Error rate
- under 0.1%
- Monthly cost
- under 14 USD/mo
- Traffic
- 2,400 req/s