Martinus Elvin
Martinus Elvin

Reputation: 1

Kafka Streams Consumer Constantly Rebalance over 100k tps

We have a kafka streams service that performs a left join (KStreams) operation by their message key. The message size is 1 KB more or less. The left topic has around two hundred thousand (200,000) messages per second, while the right topic has around two thousand (2000) message per second. Each topic has 96 partitions with 3 hours retention time. The join operation has 15 minutes time window.

We have a very concerning problem that the consumer keep getting rebalancing after some time and the consumer lag can accumulate to 200 millions or more. We have doing a lot of tuning and test on our service but the problem still persist. The consumer start rebalancing when we have 100,000 tps or more. Below are the latest configuration we use:

We have also enable custom configuration on rocksdb configuration from the service side. Below are the latest rocksdb configuration we use:

Below are some info regarding kafka cluster we are using:

We have several bare metal server dedicated to deploy the services with @ 16 core and 32GB RAM.

The service running in a dockerized container with 2 pods (we have tried up to 4 pods too). Could someone provide inside or solutions so we can have a stable and fast consumer to handle this kind of messages?

We have doing alot of configuration tuning, especially for the consumer configuration stated above, following a lot of performance tuning article in the web.

We have tried :

Upvotes: 0

Views: 37

Answers (0)

Related Questions