I have a 2 Broker node kafka with 3 node ZooKeeper cluster. When Stopping and starting Kafka cluster, what are the steps I should take, Do I go, stop 2 brokers individually first and then stop 3 zks individually? And then start zks individually and 2 kafka brokers individually?
1 Answers
4
votes
Assumptions
- This is a production cluster and you don't want any data loss.
- You have partition replicas spanned across the brokers
- For each partition you have at least one replica on each broker
- all zks are accessible by each broker
This is how I would do it
- Take down individual broker.
- When one of the broker is down, then
describe
the topics to check if only replicas that are not shown, belong to broker which was taken down. - Restart the broker and again verify that all partitions are in sync before going for next broker.
- Then stop-start each zk individually, each time tracking if all replicas and partitions are in sync. That way at least one zk is available for 2 brokers to maintain their meta data