Cascading Replication
Implement cascading replication to distribute the load of a primary server by having standbys replicate from other standbys.
What is Cascading Replication?
Welcome to Cascading Replication! In typical PostgreSQL replication, all standby servers connect directly to the primary server.
However, for larger setups or when you need many read replicas, this can put a lot of load on the primary. Cascading replication offers a solution.
It means a standby server can itself act as a primary for other standbys, forming a chain.
How the Replication Chain Works
Imagine a chain: The primary server sends its Write-Ahead Log (WAL) to a first standby (let's call it Standby A).
Then, Standby A, instead of just consuming the WAL, also acts as a source, sending that same WAL data to a second standby (Standby B).
This creates a flow: Primary → Standby A → Standby B. Standby A is an 'intermediate' standby.