---
title: "Reasons for replication; active replication"
subject: "Distributed System"
chapter: 7
key: "semester_7/distributed_system:active-replication-reasons"
source: https://www.bctengineer.com/q/semester_7/distributed_system/active-replication-reasons
site: BCT Engineering
---

# Reasons for replication; active replication

Distributed System · Chapter 7: Replication

- Asked in: 2072 Chaitra, 3+5 marks; 2075 Chaitra, 2+6 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/active-replication-reasons
- Whole chapter: https://www.bctengineer.com/md/semester_7/distributed_system/chapter-7

## Question

What are the reasons for replication? Explain active replication model with its advantages and disadvantages. (How is replication used as a basic scaling technique in distributed system?)

## Short answer

Replication improves performance/scalability, availability, fault tolerance, and reduces network load. Active replication multicasts each request to all replica managers using total order; they execute independently and reply. Advantages: immediate failure masking, Byzantine tolerance with voting, load sharing. Disadvantages: requires total-order multicast, deterministic operations, and wastes resources by repeating work.

## Answer

#### Reasons for replication
Replication means keeping copies of data or services on multiple computers. Reasons:
1. **Performance and scalability**: many replicas share the load of requests; copies placed near clients (caching, CDN, web mirrors) cut latency and network traffic. This is how replication is used as a basic scaling technique: read requests are spread over replicas, so throughput grows with their number, and a distant server's load is reduced.
2. **Availability**: if one server fails, others can serve; the service stays available (availability = 1 − pⁿ for n replicas failing independently with probability p).
3. **Fault tolerance / reliability**: data survive crashes; with majority voting even wrong (Byzantine) replies can be tolerated.
4. **Reduced network load and disconnected operation**: local copies work in a mobile or poorly connected environment.
Cost: keeping replicas consistent.

#### Active replication model
All replicas are equal state machines. 
```text
 Client --> Front end --multicast (total order)--> RM1, RM2, RM3
                  <---------- replies --------------
```
Steps:
1. The front end attaches a unique id to the client request and **atomically multicasts** it (totally ordered, reliable) to all replica managers (RMs).
2. Each RM processes the request independently in the same order, so each reaches the same state (deterministic operations needed).
3. Each RM sends its reply to the front end, which returns the first reply (crash faults), or the majority reply (Byzantine faults) to the client.

**Advantages**
- Failures are masked immediately; no failover delay and no recovery step.
- Tolerates Byzantine failures with 2f+1 replicas and voting.
- Simple client logic; load of reads can be shared.

**Disadvantages**
- Needs total-order reliable multicast (expensive).
- Operations must be deterministic; otherwise replicas diverge.
- Every replica does all the work (high resource use; no saving of computation).
- More network traffic and complexity than passive replication.

## Check yourself

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

1. How does replication act as a scaling technique?
   A. All writes go to one machine
   B. Reads are spread over replicas near clients, raising throughput and cutting latency
   C. It reduces the number of replicas
   D. It removes caching
   Answer: B. Many replicas share load and are placed near clients. (Key point: Replication for scaling)

2. In active replication, how does the front end send a request?
   A. Only to the primary
   B. To a random replica
   C. Atomic (totally ordered, reliable) multicast to all replica managers
   D. Via a token ring
   Answer: C. Total order ensures all RMs process requests in the same order. (Key point: Active replication steps)

3. Why must operations be deterministic in active replication?
   A. To save CPU
   B. To avoid multicast
   C. Because only the primary executes
   D. Otherwise replicas executing the same requests could diverge
   Answer: D. Same start state, same order and deterministic operations give identical states. (Key point: Determinism requirement)

4. What does the front end return to the client when Byzantine faults are expected?
   A. The majority reply (2f+1 replicas)
   B. The first reply
   C. The last reply
   D. The primary's reply
   Answer: A. Voting masks wrong replies; for crash faults the first reply suffices. (Key point: Byzantine tolerance)

## 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×
- [Replication as scaling; concurrent invocations](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Areplication-concurrent-invocations) — Distributed System, chapter 7
- [Active vs passive; active replication working](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Aactive-passive-working) — Distributed System, chapter 7
- [Reasons for replication; fault tolerant services](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Areplication-reasons-ft-services) — Distributed System, chapter 7
- [Replication objectives; primary-backup](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Areplication-objectives-primary-backup) — Distributed System, chapter 7
- [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

- [RWH: reasons and basic components](https://www.bctengineer.com/question.md?key=semester_6%2Fbuilding_technology%3Arwh-reasons-components) — Building Technology, chapter 12
- [Need for equalization and basic technique](https://www.bctengineer.com/question.md?key=semester_7%2Fwireless_communication%3Aequalization-need-basic) — Wireless Communication, chapter 5
- [Relevance of analog filters; frequency scaling](https://www.bctengineer.com/question.md?key=semester_5%2Ffilter_design%3Aanalog-filter-relevance-frequency-scaling) — Filter Design, chapter 1
- [Distributed system in big data example](https://www.bctengineer.com/question.md?key=semester_8%2Fbig_data_technologies%3Adistributed-system-example) — Big Data Technologies, chapter 1
