Invalidate

  • Build
  • Cache 06

Difficulty 1 of 5

Four API instances keep local price caches. A write through one instance can leave the other caches stale. Add a change bus so all price updates reach every cache within one second.

Play level

HTTP/2HTTP/2HTTP/2SQLHTTP/2SQLHTTP/2HTTP/2SQLHTTP/2HTTP/2SQLUsers5,000 req/sLoad balanc…2 vCPU · 1 GBPostgres1 vCPU · 2 GBAPI server0.5 vCPU · 0.5 GBLocal cacheAPI server0.5 vCPU · 0.5 GBLocal cacheAPI server0.5 vCPU · 0.5 GBLocal cacheAPI server0.5 vCPU · 0.5 GBLocal cache
HTTP/2HTTP/2HTTP/2SQLHTTP/2SQLHTTP/2SQLHTTP/2HTTP/2SQLUsersLoad ba…PostgresAPI ser…Local c…API ser…Local c…API ser…Local c…API ser…Local c…
The board at the start of the level
Answers with a time to liveDrag or use arrow keys to change the TTL

TTL 5 minutes · 12 lookups/h · old answers up to 5 minutes

Goals and limits

Data age
under 1 s
Stale reads
under 3,000
p99 latency
under 150 ms
Monthly cost
under 100 USD/mo
Parts you can add
Managed pub/sub, Local cache
Part limit
16
Traffic
5,000 req/s

Concepts

How players did

Player results load from the server.