RPC at scale

  • Build
  • Chain 09

Difficulty 3 of 5

Wallets send 20,000 RPC calls/s, mostly balance reads on 100,000 addresses, and a few hot ones get most calls. Each read costs 0.4 ms of node CPU, and the one node has 4 vCPU. At 0:30 it fails for 20 s. Blocks come every 12 s, so a read may be 12 s old at most. Budget 60 USD/mo.

Play level

JSON-RPCUsers20,000 req/sChain RPC4 vCPU · 1 GB
JSON-RPCUsers20,000 req/sChain RPC4 vCPU · 1 GB
The board at the start of the level
One server boardDrag or use arrow keys to change the load

280 req/s · CPU 70% · mean 22 ms

Goals and limits

p99 latency
under 100 ms
Error rate
under 1%
Data age
under 12 s
Monthly cost
under 60 USD/mo
Parts you can add
Load balancer (L7), Load balancer (L4), Chain RPC, Redis cache, Local cache
Part limit
8
Traffic
20,000 req/s

Concepts

How players did

Player results load from the server.