Make Servers Discoverable
Our resolver will need a way to discover the cluster’s servers. It needs to know each server’s address and whether or not it is the leader. In Implement Raft in Our Service, we built Raft into our service, which knows the cluster’s server and what server is the leader. We can expose this information to the resolver with an endpoint on our gRPC service.
Using an RPC for discovery will be easy because we built Serf and Raft into our service already. Kafka clients discover the cluster’s brokers by requesting a metadata endpoint. Kafka’s metadata endpoint responds with data that’s stored and coordinated with ZooKeeper, though the Kafka developers plan to remove the dependency on ZooKeeper and build Raft into Kafka to ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access