jessica
jessica

Reputation: 2610

How to delete Kafka brokers machines from kafka cluster

We have Kafka cluster , cluster include 7 Kafka brokers ,

Version details:

Kafka machines are installed on rhel version 7.2 
Kafka version is 0.1x
Zookeeper version: 3.4.10
schema-registry version: 4.0.0

Each Kafka broker machine include the following services

Kafka broker
Zookeeper server
Schema registry

Now we want to delete 2 Kafka brokers machines from the current Kafka cluster ( the Kafka machines that we want to delete are – 06/07 ( Kafka version – 0.1X , )

So cluster should be finally with:

5 Kafka brokers machines - kafka01, kafka02 , kafka03 , kafka04 , kakfa05 , kafka05

3 zookeeper servers/services that installed on kafka01, kafka02 , kafka03

5 schema registry services that installed on kafka01, kafka02 , kafka03 , kakfa05 , kafka05

We are not sure what are exactly the configuration files in Kafka brokers that should be changed, when we delete from the cluster the Kafka brokers - kafka 07/06

I will happy to get remarks/notes about Kafka brokers deletion procedure

from my understanding we need to do the following in order to remove the kafka machines - kafka 06/07

on kafka06/07

stop the services of

Kafka broker
Zookeeper server
Schema registry

then shutdown the kafka06/07 machines as

init 0

then restart the following service on kafka01/02/03/04/05

Kafka broker
Zookeeper server
Schema registry

Upvotes: 1

Views: 9103

Answers (1)

Suman
Suman

Reputation: 868

To remove a Kafka Broker component, first identify and reassign the Kafka topic partition Leaders from the Kafka Broker, that you want to decommission, by using the kafka-reassign-partitions.sh script, and then shutdown the Kafka Broker service.

And remove the host from the bootstrap-servers in producers and consumers.

Upvotes: 2

Related Questions