---
title: "Mirror between regions"
description: "Rename the regions of a two-region sandbox and choose how each mirror link copies records, with MirrorMaker 2 or with offset-preserving Cluster Linking."
url: https://monedula.dev/flock/docs/kafka-simulator/how-to/mirror-between-regions/
---
The two-region sandboxes start with MirrorMaker 2 links between fixed regions. The region and mirror-link editor renames the regions and sets, link by link, whether records cross by MirrorMaker 2 or by Cluster Linking.

## Before you start

- The [playground](/kafka-simulator/playground/) with **cluster type** set to **Active / passive (mirror)**. [Run an active/passive pair and fail over](/flock/docs/kafka-simulator/how-to/run-active-passive/) describes that sandbox.

## Steps

### 1. Open the editor

Select the `primary` region band. The Inspector's **Shape** tab holds **regions · free play** and **mirror links · free play**, after **cluster · free play** and **racks · free play**. The cluster's own view, opened by selecting the cluster frame, has the same tabs.

A region or link edit rebuilds the sandbox from its start and drops the records and actions recorded so far. So it waits in the plan at the bottom of the Inspector, which lists the changes, until you select **Apply**.

### 2. Rename the regions

Under **regions · free play**, the **region 1** and **region 2** fields hold the region names. Change `primary` to `us` and select **Apply**: the sandbox rebuilds with a `us` region, and its mirror copy in the second region is now called `us.orders`. A two-region sandbox always keeps exactly two regions.

### 3. Pick the replication kind

Under **mirror links · free play**, each row is one link: the source region, the target region, and the kind, **MirrorMaker 2** or **Cluster Link**. Set the kind to **Cluster Link**. A **↔ reverse** checkbox appears next to it: ticking it also creates the link in the opposite direction, dormant until you switch over. **remove** deletes a link, and **Add mirror link** adds one when a source and target pair is still free. Each of these edits joins the plan; select **Apply** once you are done.

### 4. Read the new link

Select the arrow between the regions. The mirror link's **kind** reads **Cluster Link (offset-preserving)**, and its **destination** is marked **· read-only mirror**. The **DR posture** card on the **Why** tab now reads "Active-passive · Cluster Linking (offset-preserving)", with "clean switchover" as the RTO and a **Cluster Link · offset-preserving** line that names the direction records flow in, `us → dr`.

### 5. Promote or switch over

Open the **Failure** tab. In **Failover (DR)**, the link's row has two Cluster Linking controls:

- **promote mirror · us.orders** turns the mirror into a writable topic and stops mirroring it. In Confluent Platform the cluster link stays up for its other mirror topics; in the simulator a link carries this one topic, so the link is removed with it;
- **switch over · us.orders** promotes the mirror and reverses the link in place, so the original topic becomes the read-only mirror. Run it again on the reversed link to switch back.

After a switchover, the link's **direction** row shows the reversed direction, marked **reversed (switched over)**. Because a Cluster Link keeps offsets, a consumer that moves to the promoted topic resumes at the same offsets, with no translation.

On the **Active / active** sandbox, the first edit in either section replaces its two region-owned topics with one shared `orders` topic, mirrored along the links you define.

## Related

- [Run an active/active pair](/flock/docs/kafka-simulator/how-to/run-active-active/) runs two regions that both take writes.
- The **Disaster recovery** module of the [scenario catalog](/flock/docs/kafka-simulator/reference/scenarios/) has scripted scenarios on Cluster Linking and MirrorMaker 2. Their pages include [Cluster Linking vs MirrorMaker 2: when to use which](/kafka-simulator/scenarios/cluster-linking-vs-mm2/) and [Mirror topics are read-only; promotion makes them writable](/kafka-simulator/scenarios/mirror-read-only-promote-writable/).