Quick revision
The short answer
Replication keeps copies of every partition on several brokers, so it protects us when a broker or a disk dies: with replication factor 3, min.insync.replicas=2 and acks=all, losing one broker loses no acknowledged record. It does not protect against mistakes that every replica copies faithfully, such as a deleted topic, a wrong retention setting or bad data, nor against losing the whole cluster or region. For those we need a copy outside the cluster: a second cluster fed by MirrorMaker 2, an archive in object storage that we can replay, or source systems that can republish.
What to remember
In this answer, we saw that replication with acks=all and min.insync.replicas=2 protects acknowledged data against broker and disk failures, and that it copies logical mistakes such as deletions, wrong retention, bad records and tombstone floods to every replica within milliseconds. It also cannot help when the whole cluster or region goes. Real recovery needs a copy outside the cluster: a MirrorMaker 2 standby for cluster loss, an object-storage archive that can be replayed for point-in-time recovery, and producers that can republish from their source of truth. Tiered storage is part of the topic and dies with it.
Your turn
Answer it aloud as you would in the interview, or type your answer below. Then show one part at a time and compare.
Replication keeps copies of every partition on several brokers, so it protects us when a broker or a disk dies: with replication factor 3, min.insync.replicas=2 and acks=all, losing one broker loses no acknowledged record. It does not protect against mistakes that every replica copies faithfully, such as a deleted topic, a wrong retention setting or bad data, nor against losing the whole cluster or region. For those we need a copy outside the cluster: a second cluster fed by MirrorMaker 2, an archive in object storage that we can replay, or source systems that can republish.
Why this question is asked
The manager's sentence sounds reasonable, and that is why it is dangerous. Three copies of everything feels like a backup, and for hardware failures it behaves like one. Interviewers ask this question to see whether we can separate two kinds of failure: physical failures, where a machine breaks, and logical failures, where the machine works perfectly and does the wrong thing. In this answer, we will recap what replication actually does, list the failures it covers and the ones it does not, and then go through the options that let us recover Kafka data after a logical failure, including why tiered storage does not count.
1A Quick Recap of Kafka Replication
A Kafka topic is split into partitions, and each partition is an append-only log. With replication factor 3, every partition has three replicas on three different brokers. One replica is the leader, which takes all writes; the other two are followers, which keep fetching from the leader to stay in step.
The followers that are fully caught up form the in-sync replica set, the ISR. Two settings decide what an acknowledged write means. On the producer, acks=all says the leader must wait until every replica in the ISR has the record before it answers. On the topic or broker, min.insync.replicas=2 says the leader refuses acks=all writes when fewer than two replicas are in sync.
Put together, these settings mean that every record the producer saw acknowledged sits on at least two brokers. If one broker dies, another in-sync replica becomes leader, it already has every acknowledged record, and the partition still has two replicas, so it stays writable.
2What Replication Does Not Protect Against
Replication copies whatever the leader writes, and it copies decisions too. That is its strength for hardware failures and its weakness for everything else. A logical failure is one where the cluster works correctly but carries out a wrong instruction, and such a failure reaches all three replicas within milliseconds.
Think about a few examples. Someone deletes a topic by mistake: the controller removes it from the metadata and every broker deletes its replica. Someone lowers retention.ms from seven days to one hour: every replica deletes the older segments on its next cleanup pass. A producer with a bug writes wrong prices for an hour: every replica stores them. A job sends a flood of tombstones, records with a key and a null value, to a compacted topic: compaction on every replica removes the values for those keys.
Replication also stops at the cluster boundary. If the whole cluster or the whole region is lost, all three copies go with it. Even inside a region, replicas can share fate: if all three brokers sit in one availability zone, or share a rack and a power supply, one event can take them all. And Kafka acknowledges a write once it is in the page cache of the in-sync replicas, not once it is on disk, so if every replica loses power at the same instant, acknowledged data that was not yet flushed can be lost. Spreading replicas across zones with broker.rack is what makes that simultaneous loss unlikely.
| Failure | Covered by RF=3? | Why |
|---|---|---|
| One broker or disk dies | Yes | Another in-sync replica has every acked record |
| Topic deleted by mistake | No | Deletion reaches every replica |
| Retention lowered by error | No | Every replica deletes old segments |
| Producer writes bad data | No | Bad records are replicated faithfully |
| Tombstone flood on compacted topic | No | Compaction removes values on every replica |
| Whole cluster or region lost | No | All replicas live in that cluster |
| All replicas lose power at once | Partly | Unflushed acked writes can be lost |
3Option 1: A Second Cluster With MirrorMaker 2
MirrorMaker 2 is a set of Kafka Connect connectors that read topics from one cluster and write them to another, along with consumer group offsets and topic configuration. Running a standby cluster in another region gives us a copy that survives losing the whole first cluster.
But there is a catch: a mirror copies mistakes too. Bad records written by a buggy producer arrive in the second cluster a few seconds later. If configuration sync is on, a retention change can be carried across as well. So MirrorMaker 2 is a disaster recovery tool for losing a cluster, and only a partial answer for logical failures. It helps with a deleted topic, because deleting a source topic does not delete its mirror, but it does not help with data that was wrong when it was written.
4Option 2: An Archive in Object Storage You Can Replay
The closest thing to a classic backup is a sink connector, such as an S3 sink connector running in Kafka Connect, that writes every record of the important topics to object storage, partitioned by topic, partition and time. Object storage is cheap enough to keep months or years of data, and we can protect the bucket with versioning or object lock so that a mistake in Kafka cannot delete it.
To recover, we run a source connector or a small replay job that reads the archived files for the needed time range and produces them back into a topic. Because the archive is a point-in-time record, we can choose to replay only the hours before a bad deployment started. The cost is a restore that takes hours rather than seconds, and records that come back with new offsets, so consumers must restart from the beginning of the restored range or rely on idempotent processing.
5Option 3: Systems That Can Republish, and Why Tiered Storage Is Not a Backup
Often the source of truth is not Kafka at all. If the events come from an orders database through a transactional outbox, the database still holds the orders, and the owning service can republish them. Designing producers so they can re-emit a time range of events on demand is cheap insurance, and it is the only option that can also correct bad data, because the producer can publish the right values.
Tiered storage, available in Kafka since 3.6, moves older log segments to object storage. It looks like an archive, but it is not one. Those remote segments still belong to the topic: they follow the topic's retention, and when the topic is deleted, Kafka deletes its remote segments too. So tiered storage lowers the cost of long retention, and a backup still has to be a separate copy that our own mistakes cannot reach.
6Follow-up questions
If replication is not a backup, why bother with min.insync.replicas=2?
Because it is what turns replication into a durability promise. With acks=all but min.insync.replicas=1, the ISR can shrink to the leader alone, the leader keeps acknowledging writes, and if that broker then dies, every record written since the shrink is lost. With min.insync.replicas=2, the leader refuses writes instead, so an acknowledged record always exists on two brokers. It trades some availability for the guarantee we actually want.
How do we decide which topics need an archive?
Start from the business: which topics are the only record of something, and what would it cost to lose a day of them. Topics fed from a database that can republish need less, while topics that are the system of record, such as payment events or audit logs, should be archived with a retention that matches legal and business needs. A tier list agreed with the owners keeps the archive cost proportional.
7Conclusion
In this answer, we saw that replication with acks=all and min.insync.replicas=2 protects acknowledged data against broker and disk failures, and that it copies logical mistakes such as deletions, wrong retention, bad records and tombstone floods to every replica within milliseconds. It also cannot help when the whole cluster or region goes. Real recovery needs a copy outside the cluster: a MirrorMaker 2 standby for cluster loss, an object-storage archive that can be replayed for point-in-time recovery, and producers that can republish from their source of truth. Tiered storage is part of the topic and dies with it.
Open with
I would agree that replication factor 3 is important, but I would explain that it protects against physical failures, not logical ones. With acks=all and min.insync.replicas=2, every acknowledged record sits on at least two brokers, so losing a broker or a disk loses nothing and the partition stays writable.
Then, if they want more
But replication faithfully copies everything the leader does. If someone deletes a topic, lowers retention by mistake, a producer writes bad data, or a job floods a compacted topic with tombstones, all three replicas change within milliseconds. It also does nothing if we lose the whole cluster or region, and replicas in one zone can fail together.
Kafka acknowledges from page cache, so a simultaneous power loss can even lose acked but unflushed records. For recovery I would combine three things depending on the topic's importance. A MirrorMaker 2 standby cluster in another region covers cluster loss, knowing that bad data travels with it. A sink connector archiving critical topics to versioned object storage gives point-in-time replay.
And producers backed by a database or outbox can republish a time range. I would also point out that tiered storage is not a backup, because its remote segments belong to the topic and are deleted with it.
About this answer
- Last updated
- 13 November 2026
- Checked
- Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
- Where the question comes from
- Written by Scrivio for practice. It is not taken from an interview.
- Official documentation
- Apache Kafka documentation
Report an issue with this answer
Copy the line below and send it to the author with what you found. It carries the address of this page.
Issue with "Explain what replication protects against and what it does not, and which options exist...": https://scrivio-interview-library.netlify.app/spring-boot/kafka-operations/99562ffcca/