Skip to content

what's the behavior of the client when one of the brokers is down? #51

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dalejin2014 opened this issue Oct 6, 2016 · 2 comments
Closed
Labels

Comments

@dalejin2014
Copy link

I have a question regarding 0 downtime scenario.
Let's say I have 8 kafka nodes in a cluster.
A topic with 100 partitions. The partition leaders are on different nodes.
When I take one node down for OS patch, what will happen to the publisher and consumer?
The publisher and consumer both have a list of the 8 brokers.
Will they encounter errors when they try to publish and consume?
I can see that publisher and consumer can talk to any node in the cluster to find out which node
has the partition leader for the data they try to write or read. But if the node happened to be the partition leader will there be any downtime (perceived by publisher/subscriber) due to rebalancing (leader re-election, or preferred replica election and the partition rebalancing)?

@edenhill
Copy link
Contributor

edenhill commented Oct 6, 2016

The underlying Kafka client (librdkafka) will automatically handle leader failures and switchovers by asking remaining active brokers for updated metadata to learn of new leader's for the failed partitions.
As soon as a new leader is available for a partition the client will resume producing or consuming.

@ewencp
Copy link
Contributor

ewencp commented Oct 7, 2016

I'm going to close this as the question has been answered. @dalejin2014 feel free to reopen if you need further clarification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants