调试不平衡的 kafka message_in 速率 [英] debugging imbalanced kafka message_in rate

查看:17
本文介绍了调试不平衡的 kafka message_in 速率的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的生产中有一个 4 节点的 kafka 集群,我们在其中使用自定义分区程序,它对 id 进行 mod 64 来确定分区.自上周以来,我们的 1 个节点上的 kafka messages_in 率不平衡,如附图所示.粉红色线显示 kafka01 节点上的 rate 消息,蓝黄色线显示所有其他 3 个框上的 rate 消息.我正在使用 datadog 进行监控和使用指标 kafka.messages_in.rate .假设 id 分布没有变化,则消息的分布应该没有变化 rate .我为调试问题而采取的步骤是

I've a 4 node kafka cluster in my production where we are using custom partitioner which does mod 64 of an id to determine the partition. since last week, there has been imbalanced kafka messages_in rate on 1 of our nodes as can been seen in the graph attached. The pink line shows the message in rate on kafka01 node and bluish yellow line shows the message in rate on all other 3 boxes . I'm using datadog for monitoring and using the metric kafka.messages_in.rate . Assuming that there has been no change in the id distribution , there should have been no change in distribution of message in rate . Steps I've taken to debug the issue are

  1. 集群在 4 个节点中的每一个节点上都有 16 个领导者.
  2. 整个 4 个盒子中的 ISR 也是平衡的,每个盒子都有 32 个 ISR [复制因子为 2]
  3. 所有 4 个盒子上的网络进出几乎相等.

请求任何帮助或领域/指标来调试这个异常.

Requesting any help or areas/metrics one can look into to debug this anomaly.

对于将来正在搜索此内容的人

For people who are searching about this in future https://mail-archives.apache.org/mod_mbox/kafka-users/201710.mbox/%3CCALaekbwkSKapqPwsyuAoHGiSnc1+3jF2wF+2FDZbAVx61E+c2w@mail.gmail.com%3E

推荐答案

一些需要调试的东西

  • 启用代理日志以进行跟踪
  • 比较一个接收更多请求的日志和一次接收更少请求的日志,在一段时间内会有足够的生产请求进行分析以进行比较
  • 在日志中搜索 ProducerRequest ,它会让您了解分区是否按预期进行,并提供有关它从哪个主机接收更多请求的信息.

这篇关于调试不平衡的 kafka message_in 速率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆