All Questions
Caching hard

To solve the Thundering Herd problem without locking, you implement 'Probabilistic Early Expiration' (X-Fetch). How does it works?

  1. A The cache server utilizes an internal entropy source to randomly delete and refresh keys before their scheduled expiration timestamp.
  2. B Clients perform a probabilistic check; as a key nears expiry, there is an increasing likelihood a client will recompute it in the background.
  3. C Distributed nodes participate in a light-weight consensus vote to elect a single 'refresh master' whenever a high-traffic key is invalidated.
  4. D The primary database management system triggers an asynchronous push notification to all subscribed cache nodes whenever a record is updated.

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

Get the app

Related questions