All Questions
Scaling Reads medium

A popular cache key expires. 5000 requests hit the server at once. They all miss the cache and hit the database. What fixes this?

  1. A Request Coalescing (Singleflight): Group the 5000 requests, send 1 query to DB, and share the result.
  2. B Disable the cache.
  3. C Restart the database.
  4. D Use a shorter TTL.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions