ARCHOS 525 BLUEPRINT · /d/dgm_int-redis
Redis Internals (Event Loop, In-Memory Structures & RDB/AOF)
8 COMPONENTS · 7 FLOWS · UPDATED 2026-11-24
GITHUB README / PR PREVIEW CARD
[](https://archos.sageideas.dev/d/dgm_int-redis) *Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_int-redis)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_int-redis" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="Redis Internals (Event Loop, In-Memory Structures & RDB/AOF) — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
client_0["App Clients"]
io_1["I/O Multiplexer"]
loop_2["Command Event Loop"]
dict_3[("Hash Table & SDS")]
evict_4["TTL & LFU Evictor"]
aof_5[("AOF & RDB Fork")]
repl_6[("Replication Backlog")]
downstream_7["Downstream & OTel"]
client_0 -->|"1. RESP cmd · RESP3"| io_1
io_1 -->|"2. Parsed cmd · In-Proc"| loop_2
loop_2 -->|"3a. O · RAM"| dict_3
loop_2 -->|"3b. Enforce · LFU/LRU"| evict_4
loop_2 -.->|"3c. Append AOF · Disk"| aof_5
loop_2 -.->|"3d. Stream cmd · PSync2"| repl_6
aof_5 -.->|"4. Emit / · OTLP/API"| downstream_7COMPONENT STACK (8)
- App ClientsSTATELESSPipelined RESP3
- I/O MultiplexerSTATELESSepoll/kqueue + threaded read
- Command Event LoopSTATELESSSingle-threaded atomic exec
- Hash Table & SDSSTATEFULIncremental rehash + ZSet/List
- TTL & LFU EvictorSTATELESSLazy + active sampled eviction
- AOF & RDB ForkSTATEFULCOW fork snapshot + fsync 1s
- Replication BacklogSTATEFULPSync2 ring buffer to replicas
- Downstream & OTelSTATELESSConsumers, metrics & SLOs
REQUEST & DATA FLOW (7)
- App Clients → I/O Multiplexer (RESP cmd)[RESP3]
- I/O Multiplexer → Command Event Loop (Parsed cmd)[In-Proc]
- Command Event Loop → Hash Table & SDS (O)[RAM]
- Command Event Loop → TTL & LFU Evictor (Enforce)[LFU/LRU]
- Command Event Loop → AOF & RDB Fork (Append AOF)[Disk]
- Command Event Loop → Replication Backlog (Stream cmd)[PSync2]
- AOF & RDB Fork → Downstream & OTel (Emit /)[OTLP/API]