Bestpractice kafka cluster scaling #5539
-
hello everyone i would like to scale up kafka cluster pod (statfulset) from replicas 3 to 4 , Could you please suggestion how to do that and thank you |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
If you are scaling up, you normally just need to increase the replicas count in the For a scale down, it is slightly more complicated. You should use the Kafka reassignment tool first to move all partition replicas out of the nodes which will be removed (the nodes are removed always from the highest index number in their pod name / highest What you should never do is to change the replicas in the StatefulSet. The operator will revert it back so it will not help. |
Beta Was this translation helpful? Give feedback.
If you are scaling up, you normally just need to increase the replicas count in the
Kafka
CR. Once the new broker(s) is added, you probably want to balance your cluster to move some partition replicas to it - either using the built in Cruise Control support or manually using the Kafka reassignment tool. Without this, the new broker will be idle until some new topics are created and their partitions scheduled on the new node as well.For a scale down, it is slightly more complicated. You should use the Kafka reassignment tool first to move all partition replicas out of the nodes which will be removed (the nodes are removed always from the highest index number in their pod name / highest
br…