ARCHOS 525 BLUEPRINT · /d/dgm_raft-log-replication
Raft Consensus & Log Replication Internals (Election, AppendEntries & Snapshot)
7 COMPONENTS · 7 FLOWS · UPDATED 2026-11-24
GITHUB README / PR PREVIEW CARD
[](https://archos.sageideas.dev/d/dgm_raft-log-replication) *Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_raft-log-replication)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_raft-log-replication" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="Raft Consensus & Log Replication Internals (Election, AppendEntries & Snapshot) — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
client_0["Client Command"]
ldr_1[("Raft Leader")]
f1_2[("Follower 1")]
f2_3[("Follower 2")]
fsm_4[("State Machine")]
snp_5[("Log Snapshotter")]
downstream_6["Downstream & OTel"]
client_0 -->|"1. Propose · gRPC"| ldr_1
ldr_1 -->|"2a. AppendEntr · Raft RPC"| f1_2
ldr_1 -->|"2b. AppendEntr · Raft RPC"| f2_3
ldr_1 -->|"2c. Apply · In-Proc"| fsm_4
fsm_4 -.->|"3a. Compact · Disk"| snp_5
f2_3 -->|"3b. InstallSna · Stream"| snp_5
snp_5 -.->|"4. Emit / · OTLP/API"| downstream_6COMPONENT STACK (7)
- Client CommandSTATELESSLinearizable Write/Read
- Raft LeaderSTATEFULAppends log + advances commitIndex
- Follower 1STATEFULAppends WAL + checks prevLogTerm
- Follower 2STATEFULRandomized election timer
- State MachineSTATEFULApplies committed index
- Log SnapshotterSTATEFULCompacts log prefix ->
- Downstream & OTelSTATELESSConsumers, metrics & SLOs
REQUEST & DATA FLOW (7)
- Client Command → Raft Leader (Propose)[gRPC]
- Raft Leader → Follower 1 (AppendEntr)[Raft RPC]
- Raft Leader → Follower 2 (AppendEntr)[Raft RPC]
- Raft Leader → State Machine (Apply)[In-Proc]
- State Machine → Log Snapshotter (Compact)[Disk]
- Follower 2 → Log Snapshotter (InstallSna)[Stream]
- Log Snapshotter → Downstream & OTel (Emit /)[OTLP/API]