Cianplan

Level 2: Data · L2.6 Caching strategies

Hit ratio and sizing a cache

Compute database load from hit ratio and size a cache by working set.

13 min · Pro

What you take away

  • Hit ratio = hits ÷ lookups; misses are what reach the database.

And 3 more inside the class, in Pro.

How the class is laid out

  1. The simple version
  2. Hit ratio → latency and database load
  3. Worked example: will one Redis node survive the sale?
  4. When a cache helps, and when it doesn't
  5. Check your understanding