Within one cluster a stream has three copies, but the leader counts only two as caught up — what does that distinction mean?
answer
- two different questions about the same copies
- existence is not currency
- the leader keeps the shorter list
- distance judged against a catch-up window
basics
~20 sCopy count says how many copies exist; the caught-up set says how many are current enough right now to stand behind the leader. A copy that has fallen behind still exists and still holds its older records, but does not count.
solid answer
~50 sTwo different facts are in play. **Copy count** is a placement decision: how many stored replicas of that stream the cluster keeps, on which nodes. The **caught-up set** is a runtime fact: which of those copies the leader currently considers close enough to itself to be treated as holding the stream. A follower copy is a process pulling records from the leader as fast as it can, so a slow disk, a saturated link between failure domains or a long pause on its node puts distance between the position that follower has replicated to and the leader's newest record. Past some allowance the leader stops counting it. Nothing is lost at that moment — the copy keeps the records it already pulled — but the durability you actually have is the width of the caught-up set, not the copy count you configured.
go deeper
Recall that two numbers exist: how many copies a stream is kept in, and how many of those are current at this moment. The second is the one durability is really measured against.
Explain the mechanism that separates them: a follower is a process pulling records, and disk, link or pause slows it until the leader stops counting it. Name the allowance that decides the boundary.
Show that you read the set as a live signal of a running cluster, not a configuration value — and that you know a stream can sit for days with a narrower set than anyone intended.
Frame it as the gap between the durability an estate believes it bought and the durability it has at any instant, and decide what standard makes that gap visible on streams nobody reviews again.
## Two questions that sound like one When someone says a stream is "kept in three copies", they have answered only one question. Within a single cluster, a stream's data is stored more than once: one copy is the **leader**, holding the authoritative sequence of records that writers append to, and the others are **follower copies** on other nodes, each continuously pulling records from the leader so that it holds the same sequence. That gives an operator two separate facts, and on a running cluster they drift apart constantly: - **How many copies exist?** This is the **copy count** — a placement decision, chosen when the stream is created and changed deliberately. It is stable; nothing about the day's traffic moves it. - **How many of those copies are current right now?** This is the **caught-up set** — the copies the leader presently treats as close enough to itself to be holding the stream. It moves minute by minute, without anyone touching a setting. ## Why a copy falls behind A follower copy is not a magic mirror; it is a process reading from another machine over a network and writing to a disk. Anything that slows that loop opens a gap between **the position that follower has replicated to** and the leader's newest record: - a disk that has begun retrying, or a volume shared with a noisy workload; - a saturated link, especially when the copy sits in a different failure domain from the leader; - a long pause on the node — a stall, a reclaim of memory, a scheduling hiccup; - a node that has just restarted and has minutes of records to make up; - a leader accepting records faster than that particular follower can consume them. None of these corrupts the follower. It is simply out of date, and how far out of date changes second by second. ## What the caught-up set is for The leader keeps this set because durability claims have to be made against copies that actually hold the newest records. A copy that is four minutes behind cannot stand behind a record written ten seconds ago — if the leader's volume died right now, that record would not be on it. | Fact | What it tells you | What moves it | |---|---|---| | Copy count | how many stored replicas of the stream exist, and where | an operator changing it, or copies being moved between nodes | | The caught-up set | how many of those are current enough to be counted right now | a slow disk, a saturated link, a pause, a restart, a traffic burst | | A copy outside the set | still exists, still holds everything it pulled so far | closing its gap and being re-admitted, or falling further behind | The practical consequence is that a stream configured for three copies can be running, perfectly healthily in every dashboard sense, with a caught-up set of two — or of one. The configured number is what you asked for; the set is what you have. ## Entering and leaving the set Leaving is not a manual act and not a failure alarm. Platforms that maintain such a set define an allowance — **the catch-up window** — expressed either as a number of records or as elapsed time since the copy was last current. A copy past that allowance is dropped from the set; a copy that closes its gap back inside the allowance is re-admitted. Both events are ordinary on a busy cluster. A dropped copy is not deleted, not fenced off, and not broken. In designs where a follower pulls continuously it keeps pulling; whether it re-enters depends on whether it can read faster than the leader is writing, which is not guaranteed. ## Designs differ on what the set even is This picture — a leader maintaining a list of current followers — is the shape used by platforms that replicate from a leader to followers. It is not universal. Some platforms commit a write when a majority of copies has answered, with no standing list of who is current; there, being behind is decided per write rather than by membership. Others put durability in an underlying shared store, so brokers hold no per-record copies of their own and the question does not arise in this form. When you move between platforms, check which shape you are looking at before you read a copy count as a durability promise. ## What a junior should carry away Three copies is a statement about storage. Two caught up is a statement about **now**. If a write is supposed to be safe because several machines hold it, the number that matters is the second one, and it is the one nobody configured.
- A follower copy drops out of the caught-up set. Is anything lost at that moment?No. Dropping out is a statement about currency, not integrity: the copy still holds every record it had already pulled, on the same disk, uncorrupted. What changes is that the leader no longer counts it as holding the newest records, so the set of copies that can vouch for a fresh write is narrower than the copy count suggests.
- Does a copy outside the caught-up set still receive records from the leader?On platforms where followers pull continuously, yes — it keeps pulling and can be re-admitted once it is current again. Whether it gets there is not guaranteed: if it is slow because its disk or its link cannot keep up with the leader's incoming rate, it can stay behind indefinitely. Some designs require it to close the gap entirely before counting it again.
A relay team of four exists on paper all season. What matters on race day is how many are actually at the track and warmed up — the roster is a plan, the line-up is a fact, and only the line-up can run the race.
saying these in an interview costs you the question
- Treats the configured copy count as the number of current copies
- Believes a copy that drops out has lost or corrupted its data
- Assumes every follower copy is byte-identical to its leader at all times
- Thinks a copy that has fallen behind was taken offline by an operator
- Confuses a follower copy's distance behind its leader with a reader's distance behind the newest record