- Dynamic miller column sizing with flexbox layout - Root column (160px), middle slices (48px), active column (flex) - Auto-scroll browser to rightmost column on navigation - Offline indicator UI and IndexedDB cache integration - /api/documents endpoint for client-side document caching - Breadcrumb navigation in document content area - FTS5 search with SQLite virtual table - Client-side Mermaid and KaTeX rendering via CDN - Deep sample content (advanced-topics/raft-deep-dive) - Border removal (only search button keeps radius) - Full viewport layout with proper borders between sidebar/content
29 lines
634 B
Markdown
29 lines
634 B
Markdown
# Raft Deep Dive
|
|
|
|
A detailed look at the Raft consensus algorithm.
|
|
|
|
## How Raft Works
|
|
|
|
Raft uses a leader-follower model where one node is elected as the leader and all other nodes are followers.
|
|
|
|
## Key Components
|
|
|
|
1. Leader Election
|
|
2. Log Replication
|
|
3. Safety
|
|
|
|
## Election Process
|
|
|
|
When a follower doesn't hear from the leader for a timeout period, it increments its term and starts an election.
|
|
|
|
```mermaid
|
|
graph TD
|
|
A[Follower] --timeout--> B[Candidate]
|
|
B --votes received--> C[Leader]
|
|
C --heartbeat--> A
|
|
```
|
|
|
|
## State Machine
|
|
|
|
The state machine applies committed log entries to produce the same output on all nodes.
|