All Questions
Redis hard

Why might 'Key Expired' events (`Ex` notification) be delivered significantly later than the actual moment the TTL reaches zero?

  1. A The internal notification bus uses a randomized retry delay to prevent saturating the client's network buffer.
  2. B Events are generated only when the key is physically deleted, which happens via lazy access or periodic random sampling.
  3. C Notifications are batched and flushed once per minute to minimize the overhead on the single-threaded event loop.
  4. D The expiration subsystem requires a dedicated client-side heartbeat to acknowledge the precise epoch of the key's death.

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

Get the app

Related questions