Monedula
Kafka Simulator docs menu

Run an active/active pair

Start the two-region active/active sandbox, where both regions take writes and mirror to each other, then lose one region and watch the other carry on.

How-to guides 4 of 10

4 min read

Updated 20 October 2026

Markdown

On this page

Steps

1. Start the sandbox

In the left rail of the playground, set cluster type to Active / active. On a narrow screen, pick it from the scenario menu in the top bar, under ✦ Free play. The sandbox starts with:

  • two regions, west with broker-1 and broker-2, and east with broker-3 and broker-4, each region with its own three-voter KRaft quorum;
  • a topic owned by each region, west.orders and east.orders, and a mirror link each way that copies it to the other region under the same name;
  • a producer per region: pw writes to west.orders and pe to east.orders;
  • a consumer group per region, cg1 in west and cg2 in east, each reading both topics in its own region.

2. Read the two mirrors

Select either arrow between the regions. The Inspector opens on that mirror link, for example Mirror link · mm-west-east, with its kind, direction, destination topic and per-partition lag. Neither link has a failover section, because neither region is a standby.

The Why tab ends with a DR posture card. Here it reads “Active-active · bidirectional mirror”, with the RPO as the mirror lag in each direction and the RTO as “≈ 0”.

3. Lose one region

Select the west region band and kill · hard west. The producer pw can no longer write, while pe keeps writing to east.orders and cg2 keeps reading in east: select pe and it keeps getting acknowledgements, while pw reports an error. The records west took but had not mirrored are the loss window, the RPO the DR posture card reported, and the card still reads “≈ 0” for the RTO.

Losing a region is half of a failover. Active-active has no standby to promote, because east already takes its own writes, so the other half is moving west’s clients to east. Select the Failure tab: on this sandbox it has a DR drill (active-active) section with a row per region. Select lose west, which takes down the same brokers and KRaft voters as the kill above, then move west clients to east:

  • pw reconnects to east as a new producer session, with a new producer ID. west.orders is a read-only mirror in east, so pw now writes east.orders, next to pe.
  • cg1 moves to east and reads both topics there. On the mirror of west.orders it resumes at its committed offset translated by MirrorMaker 2, capped at what the mirror holds, so the records west never mirrored are skipped. On east.orders it keeps the same offset.

The west row is tagged clients on east, and in the Failover (DR) section the west → east row names the records lost with west and the offset the moved group resumes at. The DR posture card says the same. With an offset checkpoint (ms) set in the timing settings, cg1 resumes at MirrorMaker 2’s last checkpoint of its offset instead, which can trail its last commit, and the row counts the records it reads again.

4. Bring it back

Select the west region band again and restart west. Its brokers and controllers come back, and the mirror from east copies the records west missed while it was down.

west comes back with its disks, so the mirror into east also copies the records it had not mirrored before the loss: they reach east late rather than never. A group that read them in west before the loss and now reads the east mirror reads them a second time. If west had not come back, those records would be gone.

To finish the drill, select move west clients back in the DR drill (active-active) section. pw reconnects to west as a new session and writes west.orders again, and cg1 moves home, carrying its positions back. Wait for the mirror into west to catch up first: a position is capped at what west’s copy holds, so moving back early makes cg1 read the gap again. pe and cg2 never moved.

The Failure tab’s Inter-region link section cuts the link between the regions with cut inter-region link and restores it with heal, and its replication speed buttons throttle both mirrors. It has no fail over button for this sandbox, for the same reason the mirror links have no failover section: neither region is a standby to promote.

In the terminal, each broker answers for its own region’s cluster: kafka-topics --list on broker-1 prints east.orders and west.orders, both held in west, and kafka-consumer-groups --list after ssh broker-3 prints only g2, the canvas’s cg2.

  • The Active-active DR drill scenario page walks through steps 3 and 4 as a scripted scenario: lose west, move its clients to east, restart west and move them back.