Bikas Katwal
1 min readJul 10, 2020

--

Yes, you are correct, the follower will not know who is the current leader. The whole idea is not to broadcast the leader details to a big cluster with 1000 nodes.
There are multiple ways to solve this.
1. Maintain gossiping between servers so they can update any 2–3 nodes about the new leader and propagate further to all nodes.

2. Make a client that always keeps track of leader and watches zookeeper node /election. Many distributed systems today. have their own client who talks to Zookeeper. Like Solr-Client, Kafka Client. That way writes always land to the leader.
I haven’t seen any system using this approach but that’s one way to do it :)

--

--

Bikas Katwal
Bikas Katwal

Written by Bikas Katwal

Coder | Distributed Systems | Search | Software Engineer @Walmartlabs

No responses yet