redis /

Redis

Live map
Snapshotunstable · cbdad79

A mostly single-threaded command path parses client requests, routes keys, mutates optimized in-memory objects, and fans changes into durability and replication.

Click a building or route
Choose a path

A RESP request is routed, changes the in-memory object, enters durability, reaches replicas, and returns a reply.

System map8 components · 10 connections
130%
Redis: RESP commands through an event-driven data server architectureFollow SET from the socket edge to memory, then watch the same mutation branch toward AOF/RDB durability and connected replicas.array of bulk strings …client context, argc a…command key positions,…validated key argument…typed Redis object and…propagated write comma…canonical write comman…PSYNC response, RDB tr…simple string, bulk da…Clients andreplicasEvent loopand RESPCommanddispatcherCluster routerKeyspaceand expiryEncoded valuesAOF and RDBReplicationstream
Connections
BuildingsEntryServiceComputeStorageRuntimeToolingExternal

Terms, in plain English

RESPRedis Serialization Protocol, the framed wire format for commands and replies.

How to study this repo

  1. 1
    Trace protocol bytes

    Read networking.c from socket input through argv creation and back through output buffers.

  2. 2
    Follow one SET

    Connect server.c dispatch, t_string.c, db.c, and object.c to see command versus storage responsibilities.

  3. 3
    Compare recovery paths

    Read aof.c, rdb.c, and replication.c; explain replay, snapshots, full sync, and partial sync.