Lesson 0008 · Review & retention
A cross-pillar quiz that jumps between topics on purpose — turning fluency into durable memory.
You've finished all seven core lessons and answered every check correctly. But answering right just after a lesson is fluency — easy retrieval while the idea is fresh. The real goal is storage strength: recalling it cold, weeks later, with no context to prime you. The way you build that is interleaving — mixing unrelated topics so each question forces you to first decide which concept applies, then retrieve it. It feels harder than a topic-by-topic review, and that difficulty is exactly the point (desirable difficulty). No section headers here on purpose — every question could be from any pillar.
Answer from memory, out loud or on paper, before clicking. If you blank on one, that's a signal — note it, and revisit that lesson's glossary entry. A miss found now is a concept saved later.
Two clients INCR the same counter concurrently. No update is lost because Redis:
A key's Redis Cluster hash slot is computed as:
A cache with default settings hits maxmemory. New writes then:
Which OS setting most amplifies a big instance's snapshot latency spike?
"Is user X in this 50M-member collection?" is answered O(1) by:
WAIT 2 1000 returning 2 still isn't a durability guarantee because Redis:
Many keys warmed together with a flat TTL melt the DB nightly. Cheapest fix:
KEYS * on a huge keyspace is dangerous mainly because it:
To stop a one-off scan from evicting your hot keys, prefer the policy:
To keep a big-instance snapshot from spiking your serving node, run BGSAVE:
A client receives -MOVED. Unlike -ASK, it should:
Live "top 10 by score" plus per-player rank is best modelled with a:
With appendfsync everysec, a crash loses at most about:
The command that atomically elects one request to rebuild a hot key is:
Any pillar you missed twice is your weak spot — reopen that lesson's cheat sheet today, and re-take this quiz in a few days. Perfect score? Still re-take it spaced out — the retention plan tells you when.
Retrieval quizzes test pieces; real skill is combining them. Bring this to your teacher (me) and reason it out loud — there's no single right answer, and the defending is the point:
Design the Redis layer for a global e-commerce cart + product-detail cache: tens of millions of carts, heavy read traffic, occasional flash-sale spikes, and "we can lose a few seconds of cart data but not minutes." Cover: which data structures for cart vs product; caching pattern + TTL/eviction for product detail; how you keep flash sales from stampeding the DB; persistence settings for the durability bar; and Sentinel vs Cluster — and if Cluster, how you keep a cart's keys on one slot without creating hot shards.
You can now reason about Redis from first principles. The last mile of your mission — being the person a team trusts on this — comes from testing these calls against real practitioners:
redis · r/redis — searchable, high-signal.The official Redis docs and antirez's blog are where every claim in this course traces back to. Your compressed version lives in this course's glossary and cheat sheets — revisit those first.