Curriculum PortalMedia Delivery Engine

Accessible Media Delivery Engine

WCAG 2.2 AA CompliantPresigned CDN Streaming
CDN Cache Hit
99.2%
Signed URL TTL
15m 00s
Course Player
Select Curriculum Showcase Module:
[Dr. Priya Sharma]Welcome back everyone. Today we are diving deep into the Raft consensus protocol, specifically focusing on how randomized election timers prevent split votes in distributed clusters.
00:0006:00
CS-801•Module 4: Fault-Tolerant Distributed Storage Systems

Distributed Consensus: Raft Protocol Leader Election & Log Replication

Instructor: Dr. Priya Sharma(Principal Distributed Systems Architect)

06:00 Total Duration
Resolution
1920x1080 (1080p60)
Video Bitrate
4,850
Audio Encoding
AAC-LC
Live WebVTT
Synchronized

Institutional WCAG 2.2 AA Compliance Verification

100% Audit Cleared
WCAG 1.2.2: Captions (Prerecorded)
Synchronized captions with speaker tags and high-contrast overlay.
WCAG 1.2.3: Audio Description / Alternative
Interactive synchronized transcript with full cue search and 1-click jump.
WCAG 1.4.1: Non-Color Scrubber
Clear thumb affordance, distinct borders, and dual numeric timers.
WCAG 2.1.1: Keyboard Operability
Full keyboard navigation: J/K/L, M, C, F, Left/Right arrow keys.

Interactive Transcript

12 Cues
00:00Dr. Priya Sharma
Now Playing

Welcome back everyone. Today we are diving deep into the Raft consensus protocol, specifically focusing on how randomized election timers prevent split votes in distributed clusters.

00:18Dr. Priya Sharma

In any fault-tolerant distributed system, nodes can be in one of three states: Follower, Candidate, or Leader. All nodes start out initially as Followers.

00:38Dr. Priya Sharma

Followers remain completely passive as long as they receive regular heartbeat messages from an active leader. If heartbeats stop, the election timeout triggers.

01:02Dr. Priya Sharma

To avoid split votes where two candidates start an election at the exact same millisecond, Raft introduces randomized election timeouts between 150 milliseconds and 300 milliseconds.

01:30Dr. Priya Sharma

When a node transitions to the Candidate state, it increments the current term, votes for itself, and broadcasts RequestVote RPCs to all peers in the cluster.

02:00Dr. Priya Sharma

If a candidate receives votes from a strict quorum—meaning more than half of the cluster nodes—it successfully becomes the cluster leader for that term.

02:35Dr. Priya Sharma

Once elected, the leader immediately starts sending AppendEntries heartbeats to suppress new elections. Clients send all write requests directly to this leader node.

03:15Dr. Priya Sharma

Next comes log replication. The leader appends the new entry to its log, broadcasts AppendEntries RPCs with the entry, and waits for quorum confirmation before committing.

03:55Dr. Priya Sharma

Once the entry is safely replicated on a majority of nodes, the leader applies it to its local state machine and returns the result to the client application.

04:35Dr. Priya Sharma

Notice how Raft maintains the Log Matching Property: if two entries in different logs have the same index and term, they are guaranteed to store the exact same command.

05:10Dr. Priya Sharma

This guarantee ensures linearizable consistency even under network partitions, packet loss, or arbitrary follower node crashes.

05:40Dr. Priya Sharma

In the next session, we will inspect leader crash recovery and log compaction with snapshots. Review the downloadable notes below before continuing.

Click any cue paragraph to jump video playbackSync: WebVTT Active