TTL and stale reads

  • Tune
  • Level 9 of 41
  • Cache

Difficulty 1 of 5

Each second, 4,995 reads and 5 writes reach 1,000 keys. Tune the TTL. Fewer than 1 percent of the 299,700 reads may be stale. More than 80 percent must hit the cache.

Play level

HTTP/2SQLUsers5,000 req/sRedis cache0.25 vCPU · 0.5 GBPostgres0.5 vCPU · 1 GB
HTTP/2SQLUsers5,000 req/sRedis cache0.25 vCPU · 0.5 GBPostgres0.5 vCPU · 1 GB
The board at the start of the level
Cache size and hit ratioDrag or use arrow keys to change the cache size

1,600 keys · hit 81% · mean 3.2 ms

Goals and limits

Stale reads
under 2,997
Hit ratio
at least 80%
p99 latency
under 150 ms
Monthly cost
under 30 USD/mo
Traffic
5,000 req/s

Concepts

How players did

Player results load from the server.