PrepZone Logo
PrepZone
Back to Database

Database · Hard

How do distributed databases elect a leader and fail over? Explain Raft in one minute.

DatabaseDistributed SystemsStaff

Answer preview

Leader election picks exactly one node to accept writes; failover is the process of detecting that the leader is gone and promoting a replacement without losing acknowledged writes or creating two leaders. Correctness comes from requiring a majority quorum to elect — which is why…