redis/redis
Lore
A narrative timeline of Redis. Dates derive from git tags, commit timestamps, and the release notes shipped in 00-RELEASENOTES.
Origins (Mar 2009 – mid 2010)
- Mar 2009. Salvatore Sanfilippo ("antirez") commits the first version of Redis to GitHub. The initial codebase is roughly one C file plus the early dict, sds, and ae implementations. Lua scripting, persistence, and clustering do not yet exist.
- 2009. RDB snapshots land. The fork-based persistence model — a child writes the snapshot while the parent keeps serving — is established and remains the design today.
- Late 2009. AOF (Append-Only File) is added as a more durable alternative to RDB.
- 2010. Pub/Sub, MULTI/EXEC transactions, and the slow-log subsystem appear. The basic data types (strings, lists, sets, hashes, sorted sets) are settled into their
t_*.cfiles, where they still live.
The Master/Slave era (2010 – 2014)
- Oct 2010. Replication ships in the form that is still the default: a primary keeps a replication backlog and replicates writes to attached replicas. The protocol later evolves into PSYNC.
- 2012. Cluster work begins. The early code becomes
src/cluster_legacy.c. Hash slot count fixes at 16384 (CRC16(key) mod 16384). - Oct 2013. Sentinel ships in stable form. The same binary changes its command table when invoked as
redis-sentinel(or with--sentinel). Fixed since then insrc/sentinel.c. - Mar 2014. Lua scripting (
EVAL/EVALSHA) goes from beta to stable. The interpreter is the bundled Lua 5.1 indeps/lua/.
The Cluster era (2015 – 2018)
- Apr 2015. Redis 3.0 ships with cluster GA. Clients see
MOVED/ASKredirections; clusters use the bus protocol onport + 10000. - Apr 2017. Redis 4.0 lands the modules API.
src/module.candsrc/redismodule.hdefine a stable C ABI so external.so's can register commands and data types. PSYNC2 and active defrag (src/defrag.c) also ship with 4.0. - 2017. Lazy free (asynchronous deletion of large objects via the BIO thread) is introduced — the start of
src/lazyfree.c. - Oct 2018. Redis 5.0 introduces streams (
src/t_stream.c), the first new top-level data type in years. Internally streams are radix-tree-indexed (src/rax.c) listpacks.
The Modernisation era (2019 – 2021)
- May 2020. Redis 6.0 ships ACLs (
src/acl.c), TLS (src/tls.c), the new RESP3 protocol (src/networking.c,src/resp_parser.c), client-side tracking (src/tracking.c), and the first version of optional IO threads (src/iothread.cwas rewritten in 7.4 but the design originates here). - May 2021. Redis 6.2 expands the command set significantly (
COPY,SMISMEMBER,LMPOP, …) and introduces RESP3-only clients. - Aug 2021. Multi-part AOF design lands as preparatory work for Redis 7.
The Functions and Cluster v2 era (2022 – 2024)
- Apr 2022. Redis 7.0 ships functions (
src/functions.c) — server-side stored programs that supersedeEVALfor production workloads — plus sharded Pub/Sub, multi-part AOF, ACL v2, client-no-evict, and a substantial cluster bus refactor. - Jan 2023. Redis 7.2 lands
CLUSTER SLOT-STATS,CLIENT NO-TOUCH, and Lua'sredis.REPL_*controls. Thecluster_slot_stats.cfile is born. - Mar 2024. Redis 7.4 introduces hash-field TTLs — every hash entry can carry its own expiration. The implementation pulls in
src/keymeta.cand a redesignedsrc/ebuckets.cfor bucketed expiration. - 2024. The licence transitions from BSD-3 to a tri-license (RSALv2 / SSPLv1 / AGPLv3) under Redis Ltd.'s stewardship.
LICENSE.txtis rewritten andREDISCONTRIBUTIONS.txtdocuments which portions remain under BSD-3.
The current era (2025 – present)
- Q2 2025. Redis 8 rebranding: "Redis Community Edition" is renamed "Redis Open Source". Core repo accepts upstream contributions for new types like vector sets (HNSW-backed similarity search) under
modules/vector-sets/, plus query/search and bloom/cuckoo/topk/t-digest/cms probabilistic types are made first-class via the modules included byBUILD_WITH_MODULES=yes. - 2025–2026. Active subsystems on the
unstablebranch include:- Auto Slot Migration (
src/cluster_asm.c) — automated rebalancing across cluster nodes. - Hash-field TTLs continue to evolve (
src/t_hash.c,src/keymeta.c). - Stream improvements and
XDELEX/XACKDEL/XNACKsemantics. - Hot-key tracking (
src/hotkeys.c). - GCRA-based rate limiting primitive (
src/gcra.c). - IO thread rewrite as a fully thread-pool model with main-thread handoff and pending-clients lists (
src/iothread.c). - Faster floating-point conversion via
fast_float_strtod.c.
- Auto Slot Migration (
Longest-standing features
These pieces date back to the earliest commits and are still in active use:
| Feature | First seen | Notes |
|---|---|---|
ae.c event loop |
2009 | Architecture has not changed; backends are pluggable. |
sds.c strings |
2009 | One header rewrite (sds.h) but the len-prefix design stuck. |
dict.c hash table |
2009 | Incremental rehashing is original to Redis. |
t_string.c, t_list.c, t_set.c, t_zset.c, t_hash.c |
2010 | Encodings have changed (ziplist → listpack), but the file split has not. |
rdb.c snapshotting |
2009 | RDB version field is bumped each compatibility break; current RDB version is in src/rdb.h. |
| Fork-based BGSAVE | 2009 | The single most influential design choice in Redis. |
Deprecated and removed features
| Feature | Rise | Decline |
|---|---|---|
| ziplist | The default encoding for small lists/hashes/zsets from the early days. | Superseded by listpack in Redis 7.0. src/ziplist.c is kept around for RDB load compatibility but isn't created any more. |
| zipmap | Original small-hash encoding. | Replaced by ziplist long ago; kept in src/zipmap.c only for ancient RDB compatibility. |
SLAVEOF command name |
The old name for REPLICAOF. |
The command remains but is deprecated; new docs use REPLICAOF. |
| Diskful PSYNC2 as the default | Used disk transit for the RDB during full sync. | "Diskless" replication and "rdbchannel" replication are now both available as faster alternatives. Both implementations live in src/replication.c. |
The lolwut command |
Easter-egg drawing demo introduced for Redis's birthday. | Still in src/lolwut.c (and lolwut5.c, lolwut6.c, lolwut8.c for each major release that added a new design); not deprecated, just decorative. |
Major rewrites
- Listpack supersedes ziplist (Redis 7.0, 2022). New encoding, new
src/listpack.c. Everyt_*.cfile gained code paths forOBJ_ENCODING_LISTPACK. - PSYNC → PSYNC2 → rdbchannel (2017–2024). Replication grew the ability to resume after primary restart and then to stream RDB on a separate socket.
- Multi-part AOF (Redis 7.0, 2022). The single
appendonly.aofwas split into a base RDB plus incremental AOF files coordinated by amanifest.src/aof.cdoubled in size. - Hash-field TTL (Redis 7.4, 2024). A new key-meta layer (
src/keymeta.c), theentry.c/hfield types, and a rewrittensrc/ebuckets.cto make per-field expiration cheap. - Cluster Auto Slot Migration (2025). A new
src/cluster_asm.cadds an automated slot-rebalancing controller alongside the legacy implementation. - IO threads rewrite (2024–2025). The original Redis 6 IO threading model was reworked in
src/iothread.cas a thread-pool with main-thread coordination and pending-client queues.
Growth trajectory
- 2009 — single author, single binary.
- 2013 — Sentinel adds the second runtime mode of the same binary.
- 2015 — Cluster adds the third (and last) runtime mode.
- 2017 — Modules let third parties extend the command surface without editing core.
- 2020 — TLS, ACL, RESP3, IO threads. The codebase doubles between 6.0 and 6.2 mainly because of new commands and the modules API surface.
- 2024 onward — Vector sets, query/search modules, and probabilistic types become first-class with
BUILD_WITH_MODULES=yes. The repo retains its single-binary flavour but the capability surface has grown by an order of magnitude.
The shape of the project has changed less than the line count suggests. The original single-threaded event-loop core is still the heart of src/server.c; everything else has been added around it.
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.