Where do sessions live

  • Choose
  • Cache 17

Difficulty 3 of 5

Five million sessions need about 1 KB each. Operators revoke about 5 sessions/s, and every API instance must reject a revoked session within 1 s. Choose where session state lives. Keep p99 below 150 ms.

Play level

Options

  • Signed cookies with no revocation lookup
  • Shared Redis, cached in each API for 60 s
  • Shared Redis session state
A token bucket on guessesDrag or use arrow keys to change the limit

Goals and limits

p99 latency
under 150 ms
Data age
under 1 s
Monthly cost
under 200 USD/mo
Traffic
5,000 req/s

Concepts

How players did

Player results load from the server.