Level 4 · Operations & Production¶
Level 4 is about the server your application depends on: what survives a crash, what a failover loses, how a cluster changes shape under load, who's allowed to do what, how to find the cause of a slowdown, and how to upgrade without breaking anything. Every claim in this level was tested by breaking something on purpose:
kill -9after 5,000 writes on a snapshot-only server, which lost all 5,000;appendfsync alwayscutting a single client to under 30 writes per second on this laptop's disk;- an acknowledged write lost when a partitioned primary died, while
WAIThad warned it wasn't replicated; - a Sentinel failover with a 3.2-second write outage and every acknowledged write intact;
- a cluster resharded under load with zero client errors, through 8.4's atomic slot migration;
- Python 3.14 rejecting TLS certificates that
redis-cliaccepted; - Redis 8.10 and Valkey 9.1 unable to read each other's snapshots, replicate, or restore each other's
DUMPs.
Servers used: Redis 8.10.2 (Homebrew, macOS, Apple Silicon) and Valkey 9.1.2 for the comparison lesson. Multi-server lessons run every node on one laptop, which demonstrates behaviour and procedures, but not real availability. Things that couldn't be tested here are stated where they come up: OS-crash and power-loss durability, copy-on-write measurement (Linux-only instrumentation), and Valkey's own modules.
Prerequisites: Levels 1–3, and comfort running several processes from a terminal.
Modules¶
- Persistence I: RDB Snapshots & fork() —
SAVEvsBGSAVE, fork cost, copy-on-write headroom, what a crash loses, load times andredis-check-rdb. - Persistence II: AOF, fsync & Hybrid Persistence — fsync policies measured, process crash vs machine crash, multi-part AOF, rewrites, and truncated vs corrupt files.
- Replication: PSYNC, the Backlog & Consistency — diskless full sync, partial resync, backlog
overflow,
WAIT, and losing an acknowledged write. - High Availability with Sentinel — three Sentinels, a primary killed under load, the failover log step by step, and Sentinel-aware clients.
- Redis Cluster: Hash Slots, MOVED & ASK — 16,384 slots, creating a cluster,
redirects,
CROSSSLOT, hash tags and cluster clients. - Cluster Operations: Resharding, Scaling & Failover — adding nodes,
ASKduring a manual slot move, atomic slot migration under load, killed vs graceful failover. - Security: ACLs, Protected Mode & TLS — protected mode, least-privilege users,
ACL DRYRUNandACL LOG, and mutual TLS. - Monitoring & Troubleshooting — the slow log, latency monitor, command stats, latency percentiles, hot and big keys, and what to alert on.
- Versions, Licensing, Valkey & Upgrades — what the license files say, Redis vs Valkey compared on one machine, and the rolling-upgrade procedure.
- Capstone — A Secured, Persistent, Failover-Tested Cluster — a 6-node cluster with ACLs, authenticated replication and AOF, proven by a 13-check acceptance test.
After Level 4¶
You can run Redis in production and prove that it behaves as intended. Keep the habit this course has tried to build: before trusting a setting, a library default or a version upgrade, reproduce the failure it's supposed to handle, on a lab you can throw away.