- broadcast-based replication
- hybrid solutions — primary-backup but uses consensus for fault tolerance
- primary-backup
- problems with view servers
- need a separate server just for this
- timeouts are fundamentally unreliable
- what happens when the view server fails?
- can’t replicate this - “basically a chicken and egg problem”
- to revisit later
- problems with view servers
- state machine replication
- deterministic — i.e., same inputs = same outputs
- so that one operation to one replica is equivalent to the same operation to all replicas
- operations — more general within SMR model so long as deterministic — don’t have to be
get/put
Primary-backup
In the primary-backup paradigm, we have one replica acting as a primary, and others acting as the backup. Only the primary receives and executes operations (i.e., clients all issue requests to the primary). The primary machine then replicates the updated state to backups (passive replication). Fault tolerance is achieved here based on a timeout.
State machine replication (SMR)
In state machine replication (SMR), clients can send deterministic operations to any replica. When replicas receive an operation, it will broadcast that operation to all replicas. It assumes a fail-stop (non-Byzantine), best-effort link model.
There are three key requirements:
- Initial state: all replicas start in the same initial state.
- Determinism: all replicas receiving the same input on the same state produce the same output and resulting state.
- Agreement: all replicas process inputs in the same sequence.
The goal is for all replicas to execute operations in the same order, so that the client gets a consistent response. In practice, achieving fault tolerance in SMR depends on the underlying total order broadcast protocol. It’s the job of a consensus algorithm (like Raft) to keep logs consistent across all nodes.
i.e., each node has a replicated log. They will execute actions in the log in the same order. On node crash, a replicated log allows it to essentially replay the timeline.