Scatter-gather

Scale 14
HTTP/2HTTP/2SQLSQLSQLSQLSQLSQLSQLSQLSQLSQLUsers800 req/sUsers40 req/sNode API2 vCPU · 2 GBLoad bala…2 vCPU · 1 GBPostgres1 vCPU · 2 GBPostgres1 vCPU · 2 GBPostgres1 vCPU · 2 GBPostgres1 vCPU · 2 GBPostgres1 vCPU · 2 GBPostgres1 vCPU · 2 GBPostgres1 vCPU · 2 GBPostgres1 vCPU · 2 GBPostgres1 vCPU · 2 GBPostgres1 vCPU · 2 GBPostgres1 vCPU · 2 GBPostgres1 vCPU · 2 GBPostgres1 vCPU · 2 GBPostgres1 vCPU · 2 GBPostgres1 vCPU · 2 GBPostgres1 vCPU · 2 GB
UsersUsersNode…Load…Post…Post…Post…Post…Post…Post…Post…Post…Post…Post…Post…Post…Post…Post…Post…Post…

Fix the board. Turn every goal green.

Traffic
Lookup40 req/s · reads onlyOrder800 req/s · writes only
Limit
Node API answers about 2,000 req/s
Bill
  • Node API8 USD/mo
  • Load balancer (L7)8 USD/mo
  • Postgres × 16128 USD/mo
144 of 200 USD/mo

Goals

Not tested yet

99 of 100 requests finish faster than this.99 of 100 requests finish faster than this.The share of requests that fail or get no answer.What the servers and services cost each month.

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.