Skip to main content
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
[![Raft Consensus & Log Replication Internals (Election, AppendEntries & Snapshot) — ArchOS Architecture](https://archos.sageideas.dev/d/dgm_raft-log-replication/opengraph-image)](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_6

COMPONENT STACK (7)

  • Client CommandSTATELESS
    Linearizable Write/Read
  • Raft LeaderSTATEFUL
    Appends log + advances commitIndex
  • Follower 1STATEFUL
    Appends WAL + checks prevLogTerm
  • Follower 2STATEFUL
    Randomized election timer
  • State MachineSTATEFUL
    Applies committed index
  • Log SnapshotterSTATEFUL
    Compacts log prefix ->
  • Downstream & OTelSTATELESS
    Consumers, metrics & SLOs

REQUEST & DATA FLOW (7)

  1. Client Command → Raft Leader (Propose)[gRPC]
  2. Raft Leader → Follower 1 (AppendEntr)[Raft RPC]
  3. Raft Leader → Follower 2 (AppendEntr)[Raft RPC]
  4. Raft Leader → State Machine (Apply)[In-Proc]
  5. State Machine → Log Snapshotter (Compact)[Disk]
  6. Follower 2 → Log Snapshotter (InstallSna)[Stream]
  7. Log Snapshotter → Downstream & OTel (Emit /)[OTLP/API]
Configure NGINX / Postgres / K8s →60-Sec L4–L7 Diagnostic →