0

As of now I am running schema-registry as a single node. To provide fault tolerance, I want to run schema-registry in master slave mode. One node for master and one node for slave.

Do we need to add any extra property to identify a node as master?

Please can any body share me the configurations(schema-registry.properties) for master and slave.

Any help is appreciated.

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
Renukaradhya
  • 812
  • 2
  • 19
  • 31

2 Answers2

1

setting up multiple SchemaRegistry instances is pretty easy. You can just startup several instances, but you have to ensure that all instances are pointing to the same zookeeper quorum. This is property kafkastore.connection.url in file schema-registry.properties

The leader election will be managed by Zookeeper throughout all registered schema-registry instances. If you want to avoid particular schema-registry instances from becoming the leader (aka master), then set property master.eligibility=false in the properties file (default value is true).

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
GeKo
  • 141
  • 2
  • 11
  • 1
    Thanks for the information. Currently I am using above configuration and I want to do some testing around this, like when I bring one of the schema-registry down, other takes over as master. Also need to test scenarios like when other failed node comes back whether it will get updated with the new schema added. – Renukaradhya May 18 '17 at 08:23
1

I think what the original question is asking is really: How do I know which Schema Registry node is currently the master, and test that when one node fails another picks up?

As far as I can tell, this isn't explicitly documented anywhere, but I found that, at least for Confluent Platform v3.3.1, Zookeeper stores this information in the key /schema_registry/schema_registry_master. When I use Exhibitor as a UI to browse the state of Zookeeper, I see the following value for that key:

{"host":"172.31.59.89","port":8081,"master_eligibility":true,"version":1}

When I restarted the current master, this value updated instantly.

Josh Padnick
  • 3,157
  • 1
  • 25
  • 33
  • +1 I had to figure this out myself before finally stumbling on your answer. It's also the same on Confluent Platform v2.x. Hoping to get onto 4.x shortly. – mjuarez May 17 '18 at 19:02