NEW
Replicating a deterministic state machine across nodes via consensus so all replicas apply operations in the same order for consistent state.
DESCRIPTION
State machine replication (SMR) makes services fault tolerant by replicating a deterministic state machine and coordinating replicas with a consensus algorithm. Clients submit operations that are ordered in a replicated log and applied identically on each replica. Raft or Paxos provide crash-fault tolerance and strong consistency; BFT variants add resilience to malicious faults. SMR underpins systems like ZooKeeper, etcd, and databases needing linearizable coordination. Determinism in the state machine is crucial to ensure identical state after replaying the log.
ALTERNATIVE DEFINITIONS
Wikipedia
State machine replication is a method for implementing fault-tolerant services by replicating servers and coordinating client interactions with server replicas.
Focuses on fault tolerance through server replication and coordination with clients.
Raft
Raft is a consensus algorithm for managing a replicated log.
Defines the consensus mechanism that commonly powers state machine replication via a replicated log.
RELATED TERMS
Consensus Paxos Raft Replicated Log Byzantine Fault Tolerance Leader Election Linearizability ZooKeeper etcd CAP Theorem
COMPETING TERMS
Primary-Backup Replication
RELATIONS
- Broader: Replication
KNOWLEDGE AREAS
Software Engineering Infrastructure Data Storage & Operations Data Architecture Real-time & Streaming Data
TARGET AUDIENCE
Software Developer Data Engineer DevOps Engineer Cloud Architect Software Architect Solution Architect MLOps Engineer
EXTERNAL SOURCES
- Wikipedia - State machine replication
- Raft - Understandable consensus algorithm resource
- Apache ZooKeeper - Coordination service built on SMR concepts
TOP QUESTIONS
Why is State Machine Replication important for data platforms?
It provides strong consistency and fault tolerance for coordination services, metadata stores, and distributed databases. Many critical systems rely on SMR to remain highly available.
Category: Relevancy
How does deterministic behavior impact State Machine Replication?
Determinism ensures identical state across replicas when operations are applied in the same order. Non-determinism can cause divergence and failures.
Category: Requirements
Which consensus algorithms are commonly used in State Machine Replication?
Raft and Paxos are widely used for crash-fault tolerance. PBFT and other BFT algorithms address adversarial faults.
Category: Overview
What is the difference between SMR and primary-backup replication?
Primary-backup often lacks strict ordering under failures. SMR enforces ordered log replication via consensus, yielding stronger consistency guarantees.
Category: Alternatives
What performance trade-offs exist in State Machine Replication?
Strong consistency introduces latency due to quorum communication. Tuning batching, pipelining, and leader placement helps mitigate overhead.
Category: Opinion
Where is State Machine Replication used in practice?
In coordination systems like ZooKeeper and etcd, metadata services, and transactional databases needing linearizable operations.
Category: Examples
How does SMR relate to CAP theorem?
SMR typically favors consistency and partition tolerance; during network partitions it may sacrifice availability to preserve correctness.
Category: Linkage
What are common mistakes implementing SMR?
Non-deterministic state machines, improper log compaction, and misconfigured timeouts causing leader instability are frequent pitfalls.
Category: Mistakes
How to test State Machine Replication systems?
Use fault injection, partition simulations, and consistency checks. Verify log ordering and snapshot correctness under adversarial conditions.
Category: Testing