All Questions
Scaling Reads medium

Your database is being hammered by queries for `User_ID: 999`, which does not exist. The database repeatedly scans the index and returns 'Null'. How do you protect the DB?

  1. A Block the user.
  2. B Implement 'Negative Caching': Cache the 'Null' result (e.g., `Key_999 = 'Not Found'`) with a short TTL.
  3. C Create a user with ID 999.
  4. D Disable the index.

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

Get the app

Related questions