One hot row

  • Fix
  • Store 09

Difficulty 2 of 5

All 3,000 writes/s increment one logical counter. One row makes every update wait in line. Keep the same write rate. Keep p99 below 100 ms and CPU below 80 percent.

0:00. Writes wait for one locked row. Graph: the wait queue on that row grows, and p99 passes 100 ms.

Play level

SQLUsers3,000 req/sPostgres2 vCPU · 2 GB
SQLUsers3,000 req/sPostgres2 vCPU · 2 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
CPU use
under 80%
Monthly cost
under 100 USD/mo
Parts you can add
Postgres
Part limit
16
Edit limit
3
Traffic
3,000 req/s

Concepts

How players did

Player results load from the server.