Stolen token

  • Fix
  • Lock 02

Difficulty 2 of 5

Each API instance checks a session token once, then trusts it for 24 hours. A revoked session keeps working on the other instances. A revoked token must stop within 5 minutes. Keep p99 under 80 ms. You have 5 edits.

0:05. A user reset the password after a phishing email. The stolen token still opens the account. Graph: freshness keeps rising.

Play level

HTTP/2HTTP/2SQLHTTP/2SQLHTTP/2HTTP/2SQLUsers2,000 req/sLoad balanc…1 vCPU · 1 GBPostgres0.1 vCPU · 1 GBAPI server0.5 vCPU · 1 GBLocal cache0.1 vCPU · 0.5 GBAPI server0.5 vCPU · 1 GBLocal cache0.1 vCPU · 0.5 GBAPI server0.5 vCPU · 1 GBLocal cache0.1 vCPU · 0.5 GB
HTTP/2HTTP/2SQLHTTP/2SQLHTTP/2HTTP/2SQLUsersLoad bal…PostgresAPI serv…Local ca…API serv…Local ca…API serv…Local ca…
The board at the start of the level
A token bucket on guessesDrag or use arrow keys to change the limit

Limit 1/s per account · all codes tried in 12 days

Goals and limits

Data age
under 300 s
p99 latency
under 80 ms
Error rate
under 0.1%
Monthly cost
under 60 USD/mo
Parts you can add
Managed pub/sub, Managed queue, Local cache, Redis cache
Part limit
12
Edit limit
5
Traffic
2,000 req/s

Concepts

How players did

Player results load from the server.