TLDR: Why Distributed Systems Need Consensus Algorithms Like Raft
Date: 2025-09-06 Source: https://arpitbhayani.me/blogs/why-consensus
Overview
Everything we interact with today is a "distributed system". From microservices to cloud-native applications, from databases to message queues. We are constantly building systems that span multiple machines.
Key Points
- Everything we interact with today is a “distributed system”.
- Why Agreement is Hard: It Does Seem Simple At first glance, getting multiple machines to agree seems straightforward.
- What Consensus Algorithms Actually Solve: The Core Guarantee: Safety and Liveness Consensus algorithms (like Paxos or Raft) provide two fundamental guarantees Safety: Nothing bad ever happens.
- Real-World Scenarios: Where Consensus is Critical: Distributed Databases Leader Election for Primary-Replica Systems Databases like PostgreSQL with streaming replication need to elect a primary after the current primary fails.