All Questions
Caching hard

How does the 'TinyLFU' admission policy (used in Caffeine/Ristretto) improve upon LRU for scan-heavy workloads?

  1. A It prioritizes the allocation of additional system memory to handle the overhead of expensive scanning operations during periods of peak load.
  2. B It utilizes a probabilistic filter (Count-Min Sketch) to track frequency history, only admitting new items if they are more popular than the victim candidate.
  3. C It temporarily disables the caching mechanism for any incoming request identified as part of a large-scale linear scanning workload in the database.
  4. D It leverages a random sampling algorithm that periodically purges keys from the cache hierarchy regardless of their actual access frequency or recency.

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

Get the app

Related questions