Skip to main content

Active vs passive; active replication working

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

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

Difference

PointActive replicationPassive replication
ExecutionEvery replica executes each requestOnly the primary executes; backups just store updates
Role of replicasAll are identical, no primaryOne primary, one or more backups
Request deliveryTotally ordered multicast to all RMsSent to the primary only
Failure recoveryInstant; others already have the resultFailover: elect new primary, takes time
OverheadHigh CPU (work repeated)Lower CPU, but state transfer needed
DeterminismRequiredNot required
Faults toleratedCrash and Byzantine (with voting)Crash only
Typical useSafety-critical systemsDatabases, 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.

 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.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Distributed System chapter 7 questions →