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

PLACEMENT OF REPLICAS

In a distributed system, replicas of data or services are often placed in various locations to enhance availability, reliability, and performance. The placement of these replicas can be categorized as client, server, and permanent replicas. 

1. Client Replicas

Client replicas are stored on the client side. These replicas are often temporary and may be used to improve performance by reducing latency and load on the server. This technique is commonly known as caching.

Example: Web browser caching web pages.

  • Advantages:
    • Reduced Latency: Data is closer to the client, leading to faster access times.
    • Lower Server Load: Reduces the number of requests sent to the server, easing server load.
    • Offline Access: Clients can access data even when not connected to the network.
  • Disadvantages:
    • Consistency Issues: Ensuring that client replicas are up-to-date can be challenging.
    • Storage Overhead: Requires storage space on client devices.

2. Server Replicas

Server replicas are maintained on the server side. These replicas are usually consistent and reliable, often used in a master-slave or multi-master setup.

Example: Database replication in a relational database system.

  • Advantages:
    • Consistency: Easier to manage and maintain consistency across replicas.
    • Centralized Control: Simplifies control and management of data.
    • Scalability: Can handle large amounts of data and user requests.
  • Disadvantages:
    • Higher Latency: Clients may experience higher latency compared to local replicas.
    • Single Point of Failure: If not designed with redundancy, server failure can lead to data unavailability.

3. Permanent Replicas

Permanent replicas are a more stable form of replicas, intended to exist for the long term. These replicas are typically stored in multiple data centers and are used to ensure high availability and fault tolerance.

Example: Distributed file systems like Google File System (GFS) or Hadoop Distributed File System (HDFS).

  • Advantages:
    • High Availability: Data is available even if one or more data centers fail.
    • Fault Tolerance: Provides resilience against hardware and network failures.
    • Geographical Distribution: Data can be distributed across various locations to serve a global user base effectively.
  • Disadvantages:
    • Consistency Management: Ensuring consistency across multiple data centers can be complex.
    • Synchronization Overhead: Requires mechanisms to keep replicas synchronized, which can be resource-intensive.