REST or gRPC

  • Choose
  • Wire 11

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.

Play level

Options

  • JSON over HTTP/2
  • JSON over HTTP/2 with a second worker
  • gRPC with compact messages
Connections and streamsDrag or use arrow keys to change the protocol

Goals and limits

p99 latency
under 180 ms
Error rate
under 0.1%
Monthly cost
under 14 USD/mo
Traffic
2,400 req/s

Concepts

How players did

Player results load from the server.