Scatter-gather
Difficulty 4 of 5
Support looks up a customer's orders 40 times/s. The orders are sharded by order ID, so each lookup asks all 16 shards. Orders arrive at 800/s. Bring lookup p99 under 150 ms and order p99 under 100 ms, with at most 4 edits.
14:20. Order lookup p99 is 10 s. Graph: all 16 order shards at 100 percent CPU, each reading 1,600 MB/s from a 500 MB/s disk.
Hash ring · 3 to 4 nodes · 8 of 36 keys move
Goals and limits
- p99 latency (Lookup)
- under 150 ms
- p99 latency (Order)
- under 100 ms
- Error rate (*)
- under 0.1%
- Monthly cost
- under 200 USD/mo
- Edit limit
- 4
- Traffic
- 40 req/s
Concepts
How players did
Player results load from the server.