Suggest an editImprove this articleRefine the answer for “How does cascading replication work in Redis?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)Cascading replication is a scheme where a replica itself acts as a data source for other replicas: instead of every replica connecting directly to the master, a chain is built, `master → replica1 → replica2 → replica3`, and each link maintains its own replication offset. **Key point:** it reduces load on the master and allows flexible geographic scaling, but update latency grows with the chain's length, and if an intermediate replica goes down, its "children" lose their sync source; it's configured manually via `REPLICAOF host port`.Shown above the full answer for quick recall.Answer (EN)Image**Cascading replication** in Redis is a scheme where a replica can itself act as a **data source** for other replicas. ### How this is set up Usually every replica connects **directly** to the master. But in a cascading scheme: - one or several replicas connect **to another replica**, - which in turn receives data from the master. So the chain looks like this: ```javascript master → replica1 → replica2 → replica3 ``` ### How synchronization works 1. The **master** sends data to `replica1`. 2. **Replica1**, once synced, becomes the source for **replica2**. 3. Every update reaching the master gets passed further down the chain. 4. Each replica maintains its own offset (`replication offset`), to know which data it's already received. ### Why this is needed 1. **Reducing load on the master**, not every replica connects to it directly. 2. **Read scaling**, a multi-level structure can be built, where lower levels serve read requests. 3. **Flexibility for geographic distribution**, e.g. the data center closest to a region gets its data from an intermediate replica, not directly from the master. ### Downsides - **Update latency grows** with the length of the chain. - If an "intermediate" replica goes down, all of its "children" lose their sync source. - Redis doesn't manage this structure automatically, the administrator specifies which node each replica should replicate from (`REPLICAOF host port`). **Summary:** Cascading replication in Redis is a manual scheme where replicas can copy data not directly from the master, but from each other, to reduce load on the primary server and scale the system for reads.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.