finds.dev

huangzworks/redisbook

《Redis 设计与实现》(网络版)的书稿源码

View on GitHubHomepage ↗

★ 1,521TeXupdated May 2024

// the take

This is the manuscript for 《Redis 设数与实现》(Redis Design and Implementation), a Chinese-language book walking through Redis's internals — data structures (SDS, dict, skiplist, intset, ziplist), persistence (RDB, AOF), and features like pub/sub, transactions, scripting, replication, sentinel, and cluster. It's for engineers who want to understand how Redis is actually built, not just how to use it, and who can read Chinese.

Goes deeper than the official docs on things that actually matter: incremental dict rehashing, the skiplist implementation backing sorted sets, the ziplist/intset compact encodings and when Redis switches between them. The Graphviz .dot diagrams for stateful processes (rehash steps, AOF rewrite, event loop transitions) make genuinely confusing mechanics easy to follow. It's clearly been read closely over the years — the contributor list is full of corrections and clarifications from readers who caught real errors, not just typo fixes.

No English version, which is a real barrier given how often this gets recommended as a canonical Redis internals reference outside China. It documents an old Redis codebase — written well before Redis 7/8, multi-threaded I/O, and the newer object encodings, so parts of the internals section no longer match current source. It's frozen reference material, not a living doc: nothing here tracks upstream Redis changes, so you're reading a historical snapshot and need to verify against current source for anything load-bearing. Building the PDF/ePub requires a Sphinx + Graphviz + LaTeX toolchain (makepdf/make.bat), which is more setup than most people want just to read a book.

We read the README, the directory tree and a key source file in October 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
1,521
Forks
415
Language
TeX
Last commit
1 May 2024

// nearby

If redisbook isn't quite it.

All repos →