00 /What You Will Learn
By the end you will be able to
- Explain a cache stampede and why a cache miss is dangerous for a popular key.
- Explain single-flight and why it protects only one server.
- Use
SET key value NX PXas a simple shared lock, and say why it needs an expiry. - Name cheaper ways to avoid the stampede: jittered TTLs, early refresh, serving stale data.
Before you start
Finish Lab 14 (Redis Cache-Aside and Eviction) first. You should know a hit from a miss and what a TTL is. Docker Desktop and Python 3 are needed.