/ The Arena
Prove your engineering skills.
GLOBAL+50 XP
Implement Raft Consensus Leader Election with Randomized Timers
Landmark Capstone Challenge: Raft Leader Election Engine ⚔️
In this landmark capstone challenge, you will implement the core Raft Leader Election State Machine across simulated distributed nodes.
Requirements:
- Election Timeout & Candidate Promotion:
- Increment
currentTermby 1. - Transition to
CANDIDATEand vote for self. - Initialize
votesReceivedset containing localnodeId.
- Increment
- RequestVote RPC Handling:
- Reject votes from older terms (
term < currentTerm). - If
term > currentTerm, update term and step down toFOLLOWER. - Grant at most one vote per term (
votedFor === null || votedFor === candidateId).
- Reject votes from older terms (
- Vote Response Processing:
- Track received votes from peers.
- Transition to
LEADERonce majority quorum is attained. - Step down immediately if a peer returns a higher term.
Join The Arena
Create an account to submit your implementation, test against our containerized CI suite, and climb the global leaderboard.
Create AccountALREADY HAVE AN ACCOUNT? LOG IN