All Questions
Caching medium

A malicious bot requests random, non-existent keys (e.g., /user/x8z9q) at a high rate. Since these keys are missing, every request hits the database, causing high load. What is the standard defense?

  1. A Implement a 'Write-Behind' (Write-Back) caching strategy to buffer incoming requests in a persistent background execution queue.
  2. B Utilize a Bloom Filter to probabilistically verify element existence, or store 'Not Found' results in the cache with a short TTL.
  3. C Transition the cache eviction logic to a 'Least Frequently Used' (LFU) policy to ensure that rarely accessed keys are purged immediately.
  4. D Configure the cache cluster to ignore Time-To-Live (TTL) expiration signals for any key that does not have a corresponding database record.

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

Get the app

Related questions