Course contentsShow
← Databases & SQL
Lesson 1539 of 1,95314. High Availability and DurabilityFree lesson

Cascading Replication Hierarchies

Structure secondary replicas to offload primary database traffic and extend geographical coverage.

In this lesson, you will learn how to architect cascading replication hierarchies to distribute read workloads across multiple layers of secondary replicas while optimizing network bandwidth and geographical latency.

The Concept of Cascading

In a traditional single-leader replication model, all secondary replicas connect directly to the primary database to pull updates from the write-ahead log. When you scale to dozens of replicas, this creates a significant performance bottleneck on the primary node. Cascading replication introduces intermediate layers—or "cascading replicas"—which act as both a consumer of data from the primary and a source of data for subsequent downstream replicas.

By establishing a tiered hierarchy, the primary node only transmits data to a few "level-one" replicas, which then redistribute that data to "level-two" replicas in their respective data centers or regions.

Architectural Benefits

This structure offers two primary advantages:

  1. Primary Offloading: It significantly reduces the network I/O and connection overhead on the primary instance, as it no longer needs to manage heartbeat or data streams for every single replica in the global fleet.
  2. Geographical Coverage: You can place a level-one replica in a remote region to act as a local hub. This hub then pushes updates to local level-two replicas, ensuring that the heavy lifting of cross-continent data transfer happens only once, rather than multiple times.

Visualizing the Hierarchy

Imagine a primary database in the US-East region. Instead of all global replicas connecting to it, you structure it like this:

[Primary: US-East] 
   |---> [Replica: EU-West (Intermediate Hub)]
   |        |---> [Replica: EU-West-A (Read-Only)]
   |        |---> [Replica: EU-West-B (Read-Only)]
   |---> [Replica: APAC-Tokyo (Intermediate Hub)]
            |---> [Replica: APAC-Tokyo-A (Read-Only)]

In this model, the EU-West hub receives logs from the primary and orchestrates the distribution to its local peers. If an intermediate hub fails, the downstream nodes lose access to new updates, meaning that while you gain performance and reach, you must account for the added complexity in your monitoring and failover orchestration.

Key Takeaway: Cascading replication hierarchies reduce primary node load and optimize cross-region bandwidth by distributing the replication burden across tiered, intermediate secondary hubs.