dubbo传输的数据包大小监控

Created on 9 Aug 2019  ·  2Comments  ·  Source: apache/dubbo

  • [ ] I have searched the issues of this repository and believe that this is not a duplicate.
  • [ ] I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

  • Dubbo version: 2.6.x
  • Operating System version: centos
  • Java version: 1.8

原因:
1.数据包大小不确定
2.经常出现网络耗时比较长的原因

如何 监控dubbo的传输数据包的大小,有那个地方能看到吗

typquestion & discussion

Most helpful comment

可以在 org.apache.dubbo.remoting.exchange.codec.ExchangeCodec 的 encodeRequest 方法中找到 checkPayload(channel, len); 方法,encodeRequest 这个方法是protected,你可以重写它,加上自己的逻辑即可,需要基于Dubbo SPI 实现自己的Codec2即可。

All 2 comments

Because dubbo is transmitted in binary serialization, it needs to be judged according to the protocol format.I usually use this blog to capture packets.

https://www.jianshu.com/p/9f9ebc6dabef

可以在 org.apache.dubbo.remoting.exchange.codec.ExchangeCodec 的 encodeRequest 方法中找到 checkPayload(channel, len); 方法,encodeRequest 这个方法是protected,你可以重写它,加上自己的逻辑即可,需要基于Dubbo SPI 实现自己的Codec2即可。

Was this page helpful?
0 / 5 - 0 ratings