DISTRIBUTED SYSTEM
CHAPTER 10 : CASE STUDY
LAB WORK SOLUTION- DISTRIBUTED SYSTEM
DISTRIBUTED SYSTEM -BCA -ALL SLIDES
MCQ- DISTRIBUTED SYSTEM

Active Replication

Active replication, also known as state machine replication, involves replicating the same service on multiple nodes. Each request from a client is sent to all replicas, which then process the request independently and return a response. 

Characteristics of active replication :

  • Consistency: All replicas process the same requests in the same order, ensuring consistent state across replicas.
  • Fault Tolerance: If one replica fails, others can continue to provide the service without interruption.
  • Synchronization: Requires a mechanism to ensure that all replicas receive requests in the same order, often achieved through consensus algorithms like Paxos or Raft.

Advantages:

  • Provides high availability and fault tolerance.
  • Ensures strong consistency across replicas.

Disadvantages:

  • Can be resource-intensive since all replicas process every request.
  • Requires a mechanism for ordering requests, which can introduce complexity and latency.

Passive Replication

Passive replication, also known as primary-backup replication, involves designating one replica as the primary (or master) and the others as backups. The client interacts with the primary, which processes the request and then propagates the state changes to the backups. 

Characteristics of passive replication :

  • Primary-Backup Model: The primary handles all requests, and backups are updated to reflect the primary's state.
  • Failover Mechanism: If the primary fails, one of the backups is promoted to be the new primary.
  • Consistency: Consistency is maintained by ensuring backups are updated before the primary responds to the client.

Advantages:

  • More efficient use of resources since only the primary handles requests.
  • Simpler than active replication in terms of synchronization.

Disadvantages:

  • Can have higher latency in failover scenarios as a new primary is elected.
  • Backups may lag behind the primary, potentially leading to temporary inconsistencies during failover.

Comparison