-
Notifications
You must be signed in to change notification settings - Fork 1.4k
CPU spikes upon broker replacement #2400
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
Comments
Sorry to hear that you're having issues. Unfortunately I'm not in a position to do new releases, so even if I did have a solution, I couldn't get it pushed out into the mainstream. I do acknowledge the older version of the Kafka Protocol is still implemented in this project. To be honest, In the meantime, I do recommend switching to a newer Kafka library, if possible. In my personal experience, |
Did you see similar CPU spikes in prior broker upgrades? If so then perhaps client side protocol changes would be helpful. But assuming you did not, it doesn't make sense to me that this is caused by the client side (still) using an older protocol. Nor does it align with your comment that the problem was "mitigated by restarting the consumers in our python apps." That suggests that it is related to internal kafka-python client state, and most likely how we handle backoff/retry. |
I made a number of improvements to backoff/retry here: #2480 |
Hello @dpkp @wbarnha,
We have used
kafka-python
to interact with our Kafka brokers since 2020.However, during the last Kafka Broker upgrades (i.e. 3.3 => 3.5) we experienced spikes in the CPU utilization of the broker's nodes. The same happens upon hardware failure in the kafka cluster that results in replacing a broker with another node.

The issue is mitigated by restarting the consumers in our python apps. Aiven responded that this is a known issue on apps relying on
kafka-python
and we should switch to https://github.com/confluentinc/confluent-kafka-python.Here is their whole response:
Is there any development in progress so that we tackle this issue?
If not we will have to switch to another kafka library.
The text was updated successfully, but these errors were encountered: