# Schema Registry Multi-DC setup using separate kafka clusters

**URL:** <https://forum.confluent.io/t/schema-registry-multi-dc-setup-using-separate-kafka-clusters/12337>\
**Category:** Schema Registry\
**Created:** [9 October 2024 19:09 UTC](https://forum.confluent.io/t/schema-registry-multi-dc-setup-using-separate-kafka-clusters/12337 "2024-10-09T19:09:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![whittin3](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/whittin3/32/4041_2.png) [@whittin3](https://forum.confluent.io/u/whittin3)\
**Post date:** [9 October 2024 19:09 UTC](https://forum.confluent.io/t/schema-registry-multi-dc-setup-using-separate-kafka-clusters/12337/1 "2024-10-09T19:09:18Z")

</div>

Hello,

I have a multi-dc schema registry setup where each region has its own kafka cluster and two instances of schema registry running. As an example:

> In Region1: **DC1** has KafkaCluster1 and two instances of schema registry pointing to KafkaCluster1 with leader eligibility set to true.
> 
> in Region2: **DC2** has KafkaCluster2 and two instances of schema registry pointing to KafkaCluster2 with leader eligibility set to false.
> 
> in Region3: **DC3** has KafkaCluster3 and two instances of schema registry pointing to KafkaCluster3 with leader eligibility set to false.

I have MirrorMaker 2 running replication across the three DCs on a subset of topics all DCs will need access to. Additionally, MirrorMaker 2 is responsible for replicating the `_schemas` topic from DC1 (leader) to both DC2 (follower) and DC3 (follower).

I have a load balancer in each region with certificates that fronts the two schema registrys and terminates ssl. Network resolution works across DCs and each schema registry deployment is addressable. For example:

`https://schema-registry.dc1.someexampledomain.org/schemas`, `https://schema-registry.dc2.someexampledomain.org/schemas`, `https://schema-registry.dc3.someexampledomain.org/schemas` all return correctly.

Leader election within DC1 works fine however I cannot seem to get forwarding of write or delete requests to work outside of DC1 to DC2 or DC3. As an example, for DC2 I have tried setting SCHEMA\_REGISTRY\_LISTENERS to

`"http://0.0.0.0:9092,https://schema-registry.dc1.someexampledomain.org:443,https://schema-registry.dc3.someexampledomain.org:443"`

but this results in port binding exceptions. I also do not think we would want to bind to a port in this situation so I don’t believe this is the right config to utilize.

What is the correct config to utilize to inform schema registry instances of other instances that belong to a different kafka cluster?

Note: I believe this type of architecture is supported as in this [documentation](https://docs.confluent.io/platform/current/schema-registry/multidc.html) it says:

> Producers write data to just the active cluster. Depending on the overall design, consumers can read data from the active cluster only, leaving the passive cluster for disaster recovery, or from both clusters to optimize reads on a geo-local cache.

Any help or advice is appreciated! Thank you in advance!
