---
title: "Passive vs active replication; availability"
subject: "Distributed System"
chapter: 7
key: "semester_7/distributed_system:passive-vs-active-available"
source: https://www.bctengineer.com/q/semester_7/distributed_system/passive-vs-active-available
site: BCT Engineering
---

# Passive vs active replication; availability

Distributed System · Chapter 7: Replication

- Asked in: 2069 Chaitra, 2+4 marks; 2075 Asoj, 3+5 marks (asked 2 times)
- Video: [Replication in distributed systems: Single leader / Master-Slave / Active-Passive](https://www.youtube.com/watch?v=GEORh7zX3iY) — Alexander Sergeenko
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_7/distributed_system/passive-vs-active-available
- Whole chapter: https://www.bctengineer.com/md/semester_7/distributed_system/chapter-7

## Question

Compare/differentiate passive replication with active replication approach. Also discuss with a technique that makes the distributed system service highly available.

## 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.

## Answer

#### 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.
1. Keep the service data on several servers at different locations; a **front end** routes client requests to the primary.
2. The primary applies each update and forwards it to the backups, replying to the client only after backups acknowledge (so no update is lost).
3. 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.
4. A repaired server rejoins as backup after copying the current state.
5. 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.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. Who processes the request in passive replication?
   A. All replicas
   B. Only the primary, which then updates the backups
   C. The front end
   D. A random backup
   Answer: B. Backups receive state updates; in active replication all execute. (Key point: Who executes)

2. Which statement about non-deterministic operations is correct?
   A. Active allows them; passive does not
   B. Both forbid
   C. Passive allows them; active does not
   D. Both allow
   Answer: C. The primary decides the outcome in passive; in active replicas would diverge. (Key point: Non-determinism)

3. How do failure responses differ?
   A. Passive masks instantly; active needs failover
   B. Both need election
   C. Neither tolerates crashes
   D. Passive needs failover with a short delay; active masks failure immediately
   Answer: D. Active replicas already hold the result. (Key point: Failure handling)

4. A service has 3 independent replicas each down with probability 0.05. Availability is
   A. 99.9875%
   B. 95%
   C. 85%
   D. 99%
   Answer: A. 1 - 0.05^3 = 1 - 0.000125 = 99.9875%. (Key point: Availability)

## Related in Distributed System

- [Active vs passive; active replication working](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Aactive-passive-working) — Distributed System, chapter 7
- [Consensus; highly available service](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Aconsensus-high-availability) — Distributed System, chapter 6
- [Reasons for replication; active replication](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Aactive-replication-reasons) — Distributed System, chapter 7, asked 2×
- [Autonomous vs distributed system](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Aautonomous-vs-distributed) — Distributed System, chapter 1
- [Fault; primary-backup vs active](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Afault-primary-backup-active) — Distributed System, chapter 7
- [Object replication; process resilience](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Aobject-replication-resilience) — Distributed System, chapter 7

## Related in other subjects

- [Active vs passive; realize 4(s+2)/(s+1)](https://www.bctengineer.com/question.md?key=semester_5%2Ffilter_design%3Aactive-passive-noninverting-4s-plus-2) — Filter Design, chapter 6, asked 5×
- [Insertion gain/loss, design steps, active vs passive](https://www.bctengineer.com/question.md?key=semester_5%2Ffilter_design%3Ainsertion-loss-steps-active-passive) — Filter Design, chapter 1
- [Active vs passive; non-inverting (s+8)/(s+2)](https://www.bctengineer.com/question.md?key=semester_5%2Ffilter_design%3Aactive-passive-difference-noninverting) — Filter Design, chapter 6, asked 5×
- [Merits and demerits of active vs passive filters](https://www.bctengineer.com/question.md?key=semester_5%2Ffilter_design%3Aactive-passive-merits-demerits) — Filter Design, chapter 6
