CSE Roadmap

Core tier · about 2 hours · 5 parts

Part 2 of 5 · 1 min read

One leader, several followers

All writes go through one leader; followers replay the leader's changes and serve reads.

Think of a single head chef who alone decides every change to a restaurant's master recipe book. Several line cooks each keep their own copy of that book, updated to match the head chef's copy as changes come in.

In plain words: in single-leader replication, every write statement is directed to one designated node, the leader, which applies the write and then streams the change to every follower, generalizing the log shipping covered in Level 8 from one standby to several. Each follower replays the leader's stream of changes on its own copy of the data, keeping itself up to date, exactly the same mechanism Level 8 covered for a single standby, just with more than one follower receiving the same stream.

A worked example. A write updating a book's price is applied first on the leader, then streamed to three followers, each of which replays that same change on its own copy, eventually bringing all three followers' prices in sync with the leader's.

The key lines. No new SQL; which node a write is routed to, and how changes are streamed out to followers, is a replication configuration detail, not something a single SQL statement controls.

Single-leader replication

Single-leader replication directs every write to one designated leader node, which streams its changes to one or more follower nodes, each replaying those changes on its own copy of the data.

Example: a head chef who alone updates a master recipe book, with several line cooks each keeping a synced copy, mirrors single-leader replication's one-writer, many-copies shape.