Kafka MirrorMaker 2 Multi-Region DR Design Prompt
Design a MirrorMaker 2 cross-region replication and disaster-recovery topology — active/passive vs. active/active, offset translation, topic/ACL sync, and failover runbook — with the RPO/RTO trade-offs made explicit.
- Target user
- Platform architects and SRE leads
- Difficulty
- Advanced
- Tools
- Claude, ChatGPT, Cursor
The prompt
You are a senior Kafka engineer designing a MirrorMaker 2 (MM2) multi-region replication and disaster-recovery topology, producing a design and failover runbook to review before rollout. I will provide: - Regions and clusters: the source and target cluster locations, inter-region latency and bandwidth, and whether this is active/passive or active/active - Workload: topics to replicate, produce/consume rates, message sizes, and which consumer groups must survive a regional failover - Requirements: target RPO and RTO, whether consumers must resume at the correct offset after failover, and any ordering or exactly-once expectations - Constraints: security model (TLS/SASL, ACLs) that must be mirrored, existing naming conventions, and whether a remote-topic prefix (e.g. `source.topic`) is acceptable to applications - Operations: how MM2 is run (Connect cluster / dedicated MM2 nodes), current monitoring, and the failover decision process Your job: 1. **Choose the topology** — recommend active/passive vs. active/active and justify it against the RPO/RTO targets, calling out that MM2 replication is asynchronous so some tail data loss (RPO > 0) is unavoidable on sudden failover. 2. **Design the replication flows** — specify the MirrorSourceConnector flows, whether to use the default `source.topic` remote prefix or IdentityReplicationPolicy, and how to avoid replication cycles in active/active. 3. **Plan offset translation** — explain how MirrorCheckpointConnector and the offset-sync topic let a consumer group resume at the translated offset in the target region, and where translation lag creates duplicate or skipped records at failover. 4. **Sync topics, configs, and ACLs** — cover automatic topic creation, config sync, `sync.topic.acls.enabled`, and heartbeats so the DR cluster is a faithful, secured replica rather than a bare topic list. 5. **Size and pace replication** — right-size MM2 tasks against partition count and inter-region bandwidth, and set `replication.factor`/internal-topic settings so the replication pipeline itself is durable. 6. **Write the failover runbook** — give ordered steps to promote the DR region: stop or fence producers, drain/confirm replication lag, translate and reset consumer group offsets, repoint clients, and the criteria to declare failover complete. 7. **Write the failback plan** — describe re-establishing reverse replication and reconciling any data written in both regions during the incident. Output: (a) topology recommendation with RPO/RTO trade-offs, (b) replication-flow design, (c) offset-translation plan, (d) topic/config/ACL sync design, (e) sizing plan, (f) step-by-step failover runbook, (g) failback plan. Advisory only; rehearse the failover runbook in a game-day against non-production clusters before relying on it, and measure real replication lag to validate the RPO claim.
Run this prompt with AI
Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.
Related prompts
-
Kafka Client Quota and Throttling Design Prompt
Design produce, fetch, and request-percentage quotas per user/client-id so one noisy tenant cannot saturate broker network or CPU and starve others on a shared cluster.
-
Kafka Cost and Storage Footprint Optimization Prompt
Review a Kafka cluster's storage, replication, and retention footprint to cut disk and inter-broker/cross-AZ network cost without weakening durability guarantees.
-
Kafka Cruise Control Self-Balancing Setup Prompt
Configure LinkedIn Cruise Control goals, capacity model, and anomaly detection to keep partition load, disk, and leadership balanced automatically without manual reassignment JSON.
-
Kafka Log Retention and Compaction Policy Audit Prompt
Audit topic-level retention and compaction settings across a cluster to stop unbounded disk growth, avoid premature data loss, and confirm compacted topics actually compact.
More Kafka prompts & error guides
Browse every Kafka prompt and troubleshooting guide in one place.
Reading prompts? Get all 500 in one free PDF
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.