#17Build Redis
An in-memory data-structure server: one thread, rich types, optional persistence, async replication. Internalize the cost of single-threaded simplicity and a dozen caching/HA decisions get easier.

You are designing an in-memory data-structure server: clients send commands, the server mutates rich types (strings, lists, hashes, sets, sorted sets, streams) held in RAM, and optionally persists to disk. This is the canonical "your data structures, on a server" system — once you have built it, you understand why a single thread is fast (and where it is fatal), why "Redis transactions" are not ACID, why default Redis can lose ~1 second of writes, why Sentinel is not CP, why Cluster has no proxy, and how every distributed-systems decision in Redis flows from one foundational choice: one thread.

Resist the urge to "describe Redis." Make decisions yourself, defend them, and let the AI push back. The point is to make every choice the Redis authors made and feel why they made it.

Reading: Antirez — Redis design rationale (antirez.com) · Redis docs — replication, persistence, cluster spec · Aphyr — Jepsen on Redis (Sentinel) · Redis 7.0 — multi-part AOF, Functions
single-threaded event loop
data-structure encodings
RDB + AOF persistence
sampled LRU / LFU eviction
async PSYNC replication
Sentinel quorum + majority
Cluster hash slots & client routing