dubbo new feathure Add GZIP support for large message

0yg35tkg  于 2022-11-13  发布在  其他
关注(0)|答案(5)|浏览(429)
  • 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.7.7
  • Operating System version: windows10
  • Java version: 14

We sometimes has very large data to retrieve from dubbo service, in order to reduce the transportation cost, please add a feathure to compress the message.

suggested:

  1. dubbo.protocol.gzip.enabled=true, to enable the compress function.
  2. dubbo.protocol.gzip.payload=1M, messages larger than 1M bytes will be compressed.

Reference:
https://github.com/lshm/dubbo-gzip/blob/master/dubbo-remoting/dubbo-remoting-api/src/main/java/com/alibaba/dubbo/remoting/exchange/codec/ExchangeCodec.java

ldioqlga

ldioqlga1#

It would be great if someone can help to add this support.

One thing to keep in mind, make sure it's optional and extensible.

mrwjdhj3

mrwjdhj32#

FYI, it's not recommended to transport large data in one TCP connection.

kqqjbcuj

kqqjbcuj3#

gRPC has compress support and there is a example for their API: https://github.com/AmiDavidW/grpc-java/blob/a111ab75dd246548b9ea6fef58466a05d1aba5b0/examples/src/main/java/io/grpc/examples/experimental/CompressingHelloWorldServerAllMethods.java#L52

xmq68pz9

xmq68pz94#

It would be great if someone can help to add this support.

One thing to keep in mind, make sure it's optional and extensible.

I'd like to help, but, how can I help?

piah890a

piah890a5#

I have tested to merge the code from those sample to 2.7.7, and it works. BTW, the original code has some bugs, need to fix.

相关问题