Self-test
Check your understanding
Self-test11 questions
Explain lazy and active expiry. Why does Redis need both?
Which commands keep a key's TTL and which clear it?
Why add jitter to TTLs? What happens without it?
What does
maxmemorynot count, and why does that matter for sizing the container?Choose an eviction policy for a pure cache, a session store, and a job queue. Justify each.
Your instance uses
volatile-lruand writes are failing with OOM errors. What's the likely cause?How does Redis approximate LRU without a linked list of all keys? How does LFU resist scans?
What does a fragmentation ratio below 1.0 mean? Above 1.5?
Name three harms of a big key and two ways to fix one.
What's a hot key, and why doesn't adding cluster nodes help?
- Design question
A 32 GB Redis is at 95% of maxmemory and evicting. Walk through how you'd find what's using the memory and reduce it.