原因:
1.数据包大小不确定
2.经常出现网络耗时比较长的原因
如何 监控dubbo的传输数据包的大小,有那个地方能看到吗
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.
可以在 org.apache.dubbo.remoting.exchange.codec.ExchangeCodec 的 encodeRequest 方法中找到 checkPayload(channel, len); 方法,encodeRequest 这个方法是protected,你可以重写它,加上自己的逻辑即可,需要基于Dubbo SPI 实现自己的Codec2即可。
Most helpful comment
可以在
org.apache.dubbo.remoting.exchange.codec.ExchangeCodec的 encodeRequest 方法中找到checkPayload(channel, len);方法,encodeRequest这个方法是protected,你可以重写它,加上自己的逻辑即可,需要基于Dubbo SPI 实现自己的Codec2即可。