Skip to content

Designing Data-Intensive Applications - 5. Replication

Published: at 01:37 PM

Table Of Contents

Open Table Of Contents

Leader-Based Replication

Overview

Technologies

Synchronous vs. Asynchronous Replication

Setting Up a New Follower

  1. Take a consistent snapshot of the leader’s database.
  2. Copy the snapshot to the new follower.
  3. Sync the follower with the leader by applying all changes since the snapshot.

Failure Scenarios

Replication Logs

Statement-Based Replication

Write-Ahead Log (WAL) Shipping

Logical Log Replication

Trigger-Based Replication

Consistency Models

Read-After-Write Consistency

Monotonic Reads

Consistent Prefix Reads

Eventual Consistency

Multi-Leader Replication

Challenges

Topologies

Offline Operation

Leaderless Replication (Dynamo-Style)

Mechanisms for Handling Inconsistencies

  1. Read Repair:
    • Detects stale replicas during reads and updates them.
  2. Anti-Entropy Process:
    • Background process resolves inconsistencies across replicas asynchronously.

Quorums

Conflict Resolution


Contribute to this article here.