Redis Mastery Path¶
Redis looks like the simplest database there is: SET, GET, done. That simplicity is real, and it's also why so
many Redis problems surprise people. A counter that loses 89% of its increments, a session that never expires because
of one plain SET, a cache that keeps serving a stale price for five minutes no matter how you invalidate it, a lock
that two clients both hold, a queue that silently drops jobs when a worker dies, a write the server acknowledged and
then lost in a failover: none of those are Redis bugs. They're the consequences of how Redis actually works, and they
can all be reproduced in a few lines.
This course teaches Redis by reproducing them. Every lesson runs against a real server and measures what happens: how long one slow command blocks everyone else, what each data structure costs in memory, how often a cache stampede hits the database, which writes survive which crashes. It assumes you can program (examples are mostly Python, with some Node.js) and have used a database before. It doesn't assume any Redis experience.
Level 1 covers the foundations: a throwaway lab and what one command thread means, redis-cli and the RESP
protocol, strings and expiry, safe keyspace iteration, hashes, lists, sets and sorted sets, and the client libraries
(including a retry default that applied one INCR twice), ending with a tested URL shortener. Level 2 goes deeper:
memory encodings and why one extra member made a key 12× larger, bitmaps, HyperLogLog and Bloom filters, geospatial
indexes, streams and consumer groups, Pub/Sub, transactions with WATCH, and Lua and Functions, ending with a
leaderboard and activity feed. Level 3 is application patterns: cache-aside and its stale-write race, eviction
policies, stampedes, rate limiting, distributed locks and fencing tokens, sessions and client-side caching, reliable
job queues, JSON documents, and the query engine with vector search, ending with a caching and rate-limiting layer for
a real API. Level 4 is production: RDB and AOF, replication, Sentinel, Cluster and resharding, ACLs and TLS,
monitoring, Redis vs Valkey and upgrades, ending with a secured cluster proven by an automated failover test.
Every lesson has a How It Actually Works section: why SCAN can return a key twice but never miss one, why a
hash with 513 fields costs five times as much as one with 512, why XREAD $ drops messages, why kill -9 doesn't lose
everysec writes but a power cut can, why a lock lease can't protect you from a paused process, and how a replica
decides whether it needs a full resync.
Versions and what was actually run
Everything in this course was run on Redis 8.10.2 (Homebrew, macOS on Apple Silicon) with its bundled JSON,
search and probabilistic modules, using redis-py 8.1.0 on Python 3.14 and node-redis 6.3.0 on Node.js 26.
Level 4 · 09 also uses Valkey 9.1.2. Every output shown is the output it produced, including the failures. Some
of those failures were findings: a BITCOUNT that returned wrong totals above 2^21 on this build, a race in a
project's caching layer that only a concurrency test caught, and TLS certificates that one client accepted and
another rejected. Timings come from a laptop and show proportions, not benchmarks.
Several commands used here are very recent (SET … IFEQ and DELEX from 8.4, idempotent XADD from 8.6, XNACK
from 8.8, atomic slot migration from 8.4). Each lesson says when a feature arrived, so you can check it against your
own servers. Things that couldn't be run are stated where they come up, never shown with invented output: OS-crash and
power-loss durability, Linux-only copy-on-write instrumentation, Redlock across independent primaries, managed cloud
services, and Valkey's own modules.
How the program is organized¶
| Level | Focus | Modules | What you can do after |
|---|---|---|---|
| 1 · Redis Foundations | The server, redis-cli/RESP, strings, keys, hashes, lists, sets, sorted sets, clients | 10 | Write correct application code against Redis |
| 2 · Data Structures in Depth | Encodings, bitmaps, sketches, geo, streams, Pub/Sub, transactions, Lua | 10 | Pick the right structure and make multi-step operations atomic |
| 3 · Caching & Application Patterns | Caching, eviction, stampedes, rate limits, locks, sessions, queues, JSON, search | 10 | Build the patterns Redis is hired for without their classic bugs |
| 4 · Operations & Production | Persistence, replication, Sentinel, Cluster, security, monitoring, upgrades | 10 | Run Redis in production and prove what survives a failure |
Each level has 9 teaching modules plus a hands-on project (module 10), for 40 lessons total.
How to use this site¶
- Run your own server. Level 1 · 01 sets up a lab you can wipe and restart in seconds. Later lessons start several servers on other ports. Use a laptop or a disposable VM, never a shared or production Redis.
- Reproduce the outputs. Your IDs, timings and sizes will differ; the behaviour should not. When something differs in kind, find out why. Version differences are a likely cause, and each lesson names the version.
- Break things on purpose. Kill a primary, run twenty clients against one key, fill memory to the limit. Most of what matters about Redis only shows up under concurrency and failure.
- Do the projects. Each one combines its level into something you could adapt for real work, and each was tested end to end, including the bugs its tests caught.
More from the Mastery Path series¶
Free, structured, module-wise training across 85 other languages, platforms and disciplines:
Languages
Web Frameworks
Mobile
Testing & QA
Security
Cloud Platforms
Data & Analytics
Databases
AI / ML / LLM
Embedded Systems
Leadership & Management
Professional Skills
Careers & Interviews
Process & APIs
Infrastructure & Ops