- Asked 2/15
- 2069 Chaitra · 2+4 marks
- 2075 Asoj · 3+5 marks
Passive vs active replication; availability
Short answer
Passive replication has a primary execute and push updates; active replication uses total-order multicast to all replicas, which all execute. Passive allows non-determinism and failover; active masks failures instantly but needs determinism. High availability uses replication with primary-backup failover and leader election.
Compare/differentiate passive replication with active replication approach. Also discuss with a technique that makes the distributed system service highly available.
Passive vs active replication
| Point | Passive (primary-backup) | Active (state machine) |
|---|---|---|
| Who processes the request | Only the primary replica manager | All replica managers |
| Backups | Receive state updates from the primary | Execute the same requests independently |
| Front end talks to | Primary (one RM) | Group of RMs by multicast |
| Communication | Primary sends updates to backups; ordering by primary | Totally ordered reliable multicast |
| Failure handling | Failover: a backup is elected to replace primary; short delay | Immediate masking; no recovery delay |
| Non-deterministic operations | Allowed (the primary decides outcome) | Not allowed, replicas would diverge |
| Failure types | Crash failures only | Can tolerate Byzantine failures with voting |
| Resource usage | Low: work done once | High: work done n times |
| Consistency | Linearizable if primary works | Sequentially consistent |
| Example | Primary-backup database | Replicated state machines, fault-tolerant control |
A technique for high availability
Replication with failover and failure detection, e.g. primary-backup with an election.
- Keep the service data on several servers at different locations; a front end routes client requests to the primary.
- The primary applies each update and forwards it to the backups, replying to the client only after backups acknowledge (so no update is lost).
- Backups and the primary exchange heartbeats. If the primary stops, a backup is chosen as the new primary by a leader election (bully algorithm); the front end redirects clients to it.
- A repaired server rejoins as backup after copying the current state.
- Load balancers and multiple front ends remove other single points of failure.
If each of n replicas is down with probability p independently, the service is available with probability 1 − pⁿ; for p = 0.05, n = 3 it is 99.9875%.
Alternative: the gossip architecture, where any replica answers a client and updates are propagated lazily.
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Active vs passive; active replication working · Distributed System, chapter 7
- Consensus; highly available service · Distributed System, chapter 6
- Reasons for replication; active replication · Distributed System, chapter 7 · asked 2×
- Autonomous vs distributed system · Distributed System, chapter 1
- Fault; primary-backup vs active · Distributed System, chapter 7
- Object replication; process resilience · Distributed System, chapter 7
- Active vs passive; realize 4(s+2)/(s+1) · Filter Design, chapter 6 · asked 5×
- Insertion gain/loss, design steps, active vs passive · Filter Design, chapter 1
- Active vs passive; non-inverting (s+8)/(s+2) · Filter Design, chapter 6 · asked 5×
- Merits and demerits of active vs passive filters · Filter Design, chapter 6