There can be many reasons for the lag. As an example:
1. This specific partition is getting 10x incoming traffic / produce
requests compared to other partitions.
2. This partition is hosted / leadership on a node which is very busy,
so all write requests to this partition have high latency.
3. Consumer dedicated to consume from this partition in the consumer
group may have failed and started reading all the way from the
beginning.
4. There could be long running transaction on this parititon due to
which you aren't able to read recent records
5. Consumer dedicated to consume from this partition in the consumer
group may be reading from other "heavy" partitions as well , hence,
overall processing might be slow whereas other consumers may be
processing their partitions faster because they are all light-weight
partitions.

Hopefully the above examples will point you towards a direction on
what all you need to monitor to identify the root cause.

--
Divij Vaidya

On Wed, Aug 9, 2023 at 3:33 PM Karnam, Sudheer <sudheer.kar...@hpe.com> wrote:
>
> Hi team,
> We are using kafka version-2.6.0,has 6brokers and cluster is running for last 
> 3 years.
> We have a topic with 30 partitions and recently we are observing lag in one 
> of the partition(1,22,000),Other 29 partitions are not having lag.
> We restarted kafka brokers still lag not reducing in one topic and found no 
> errors in broker logs specific to partition.
> Any solution to reduce lag in particular topic.
>
> Thanks
> Sudheer

Reply via email to