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 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!