This episode covers disaster recovery and data migration: backup strategies, MirrorMaker 2.0 for cross-cluster replication, offset translation and checkpointing, active-active and active-passive patterns, RPO/RTO considerations, and zero-downtime cluster migration.

No cluster is immune to disaster: datacenter damage, configuration errors, or accidental deletion can cripple production. Disaster recovery is the plan that answers the questions: how fast can you get back to operating, and how much data are you willing to lose?
Episode 25 covers backup strategies, MirrorMaker 2.0 for cross-cluster replication, the RPO and RTO concepts, active-active and active-passive patterns, and migrating data between clusters without downtime.
Within-cluster replication protects against broker failures, but not against human error or logical damage. For that you need restorable backups:
__consumer_offsets; for cross-cluster recovery, export offset positions too.Backups must be tested, not just created. Periodic restore drills ensure you know how to restore and how long it takes. Combine several layers: replication for broker failure, backups for human error, and MirrorMaker for datacenter disasters.
MirrorMaker 2.0 is the official tool for replicating data between clusters. It uses Kafka Connect (episode 12): one connector per source topic, with workers reading and writing across clusters:
clusters = primary, backup
primary.bootstrap.servers = primary.example.com:9092
backup.bootstrap.servers = backup.example.com:9092
primary->backup.enabled = true
primary->backup.topics = orders, user-events
replication.factor = 3primary->backup.enabled = true enables one-way replication from primary to backup. Topics are replicated with the same name; offsets are translated during the process so consumer positions stay meaningful on the destination side.
The trickiest part of replication: offsets in the source cluster aren't the same as offsets in the destination cluster. MirrorMaker 2.0 handles this with offset translation — mapping source offsets to destination offsets — and checkpointing, periodically recording that mapping into an internal topic. Consumers on the backup side can resume from roughly the same position as on the primary side.
MirrorMaker sends a heartbeat topic (heartbeats) to monitor the health of replication connections. With heartbeats, you know how far replication has fallen behind and whether the inter-cluster connection works — important metrics for assessing failover readiness.
Two numbers define your recovery targets:
RPO and RTO are determined by the business, not by technology — they translate the cost of downtime and data loss into architectural design.
A good failover procedure: verify the backup cluster's health, stop writes on the primary, confirm the last synchronization, point clients to the backup, then enable the reverse-direction replicator. All steps must be tested in periodic drills — a procedure never tested will fail in a crisis.
MirrorMaker also serves as a migration tool: create a new cluster, replicate from the old one, then move clients one by one. The key to success is preserving the correct order for topics whose consumers must resume from a certain position.
A downtime-free migration flow:
Key point: move producers first, then consumers — new consumers read new data from the destination cluster, while old clients still run on the source cluster.
During migration, monitor replication lag continuously. Prepare a rollback plan: if a problem is found, point clients back to the old cluster — as long as bidirectional replication or checkpoints still allow it. After the old cluster is shut down, rollback is much harder; keep a sufficient observation period before decommissioning.
Info
MirrorMaker 2.0 is not a backup: it needs a running destination cluster. For data that must genuinely be preserved, combine cross-cluster replication with backups to object storage that don't depend on Kafka.
In this episode 25 you've understood backup strategies, MirrorMaker 2.0 with offset translation and checkpointing, the RPO and RTO concepts, active-active and active-passive patterns, and zero-downtime migration procedures between clusters.
The key takeaways:
In the next episode 26 we'll discuss Kafka in microservices architectures — event-driven architecture, the saga pattern, CQRS, and outbox. You'll learn choreography, domain events, and the transactional outbox with Debezium.