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

# Active vs passive; active replication working

Distributed System · Chapter 7: Replication

- Asked in: 2074 Asoj, 3+5 marks
- Video: [REPLICATION | Active and Passive Replication | Deterministic Servers](https://www.youtube.com/watch?v=yE2YG2KbOCQ) — Adarsha Dhakal
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_7/distributed_system/active-passive-working
- Whole chapter: https://www.bctengineer.com/md/semester_7/distributed_system/chapter-7

## Question

Differentiate between active and passive replication. Explain working mechanism of active replication.

## Short answer

Active replication multicasts each request to all replicas via total order; they execute independently, ensuring identical states. Passive uses a primary that executes and updates backups. Active working: a front end issues a totally ordered multicast of client requests; each replica manager processes them in the same order deterministically and replies; the front end returns the first reply (crash) or majority (Byzantine).

## Answer

#### Difference
| Point | Active replication | Passive replication |
|---|---|---|
| Execution | Every replica executes each request | Only the primary executes; backups just store updates |
| Role of replicas | All are identical, no primary | One primary, one or more backups |
| Request delivery | Totally ordered multicast to all RMs | Sent to the primary only |
| Failure recovery | Instant; others already have the result | Failover: elect new primary, takes time |
| Overhead | High CPU (work repeated) | Lower CPU, but state transfer needed |
| Determinism | Required | Not required |
| Faults tolerated | Crash and Byzantine (with voting) | Crash only |
| Typical use | Safety-critical systems | Databases, file servers |

#### Working mechanism of active replication
Active replication uses the **state machine approach**: a service is a deterministic state machine replicated on several replica managers (RMs) that all start in the same state and process the same requests in the same order.

```text
 Client --> Front End ==multicast==> RM1  RM2  RM3
                 ^                    |    |    |
                 +-------replies------+----+----+
```
1. **Request**: the client sends the request to its front end, which gives it a unique identifier and **multicasts it to the group of RMs** using a reliable, totally ordered multicast (so all RMs receive all requests in the same order).
2. **Coordination**: the group communication system delivers each request to every RM in the same order (total order, e.g. Lamport timestamps or a sequencer).
3. **Execution**: each RM executes the operation independently on its own copy. Because operations are deterministic and the order is the same, all copies stay identical.
4. **Response**: each RM sends its answer to the front end. The front end passes on the **first reply** (if only crashes are expected), or the **majority** (if Byzantine faults, requiring 2f+1 replicas).
5. Duplicate requests are discarded using the identifiers.

A failed RM does not interrupt the service since the others still reply.

## Check yourself

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

1. What is the main difference between active and passive replication?
   A. Passive uses multicast
   B. In active every replica executes the request; in passive only the primary does
   C. Active has a primary
   D. Passive requires determinism
   Answer: B. Active replicates execution; passive replicates state. (Key point: Execution)

2. Why do all copies stay identical in active replication?
   A. They copy state from a primary
   B. They use a lock server
   C. They start in the same state and process the same deterministic requests in the same order
   D. They share memory
   Answer: C. State machine approach relies on same start, same order and determinism. (Key point: State machine approach)

3. What is the role of the group communication system?
   A. Elects a primary
   B. Stores backups
   C. Detects Byzantine faults only
   D. Delivers each request to every RM in the same total order
   Answer: D. Total order e.g. via sequencer or Lamport timestamps. (Key point: Ordering)

4. How many replicas for Byzantine faults, and which reply is passed?
   A. 2f+1 replicas, majority reply
   B. f+1 replicas, first reply
   C. 3 replicas, any reply
   D. f replicas, last reply
   Answer: A. Majority voting masks up to f faulty replicas. (Key point: Reply selection)

## Related in Distributed System

- [Passive vs active replication; availability](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Apassive-vs-active-available) — Distributed System, chapter 7, asked 2×
- [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×
- [DNS and its working mechanism](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Adns-working) — Distributed System, chapter 2, asked 3×
- [Fault; primary-backup vs active](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Afault-primary-backup-active) — 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×
- [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×
- [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
- [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
