Skip to content
Ameen Abozaid
Planned lessonMID-037-L03

Hit ratio and what it hides

  • Lesson 3 of 5
  • Mid-level
On This Lesson 4 topics

This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.

In this lesson

read hit ratio correctly.

Planned topics

  • Hit ratio = hits / (hits + misses). Aim depends on cost of a miss, not a magic number.
  • A high ratio can hide a few very expensive misses or a flood of tiny cheap hits.
  • Look at it per cache and per key group, plus miss latency and load on the database.
  • A cold start has a 0% ratio; measure after warm-up.
  • A hit ratio says nothing about stale data served.
Draft outline details

Demonstration

two caches both at 90%: one saves 1 ms per hit, the other saves 800 ms; the second is worth far more.

Check your understanding

Does a 99% hit ratio prove the cache is correct?

Show answer

No; it can be serving stale data.

Practice

Apply this lesson with the module's lab, exercises and quiz.

Lab and exercises Quiz

Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.

Continue to next lesson

Type to search levels, phases, modules and lessons.