grpc / grpc-go

The Go language implementation of gRPC. HTTP/2 based RPC
https://grpc.io
Apache License 2.0
21.06k stars 4.37k forks source link

Update documentation to reflect protobuf limitation of 2GB #6623

Open easwars opened 1 year ago

easwars commented 1 year ago

Based on the internal post https://yaqs.corp.google.com/eng/q/4724221033530261504#a1n3, the protobuf team is adding documentation about the 2GiB limit of protobuf message size. We should probably link to that, from our call options: MaxCallRecvMsgSize and MaxCallSendMsgSize

See internal update to the doc: https://critique.corp.google.com/cl/564773603

dfawley commented 1 year ago

We should probably link to that, from our call options: MaxCallRecvMsgSize and MaxCallSendMsgSize

It's fine to mention it, but of course protobuf isn't the only codec we support, so things should be written with that in mind.

arvindbr8 commented 1 year ago

@easwars -- does that mean our default here is slightly more than supported? https://github.com/grpc/grpc-go/blob/fd9ef7263ae34b82b6200fee951af1b2edcb16df/rpc_util.go#L360

MaxInt32 = 2.147483647 GB

arvindbr8 commented 1 year ago

@easwars -- I have a feeling we might confuse users by mentioning the limit thats limited to protobuf encoding. Do you still strongly feel that we should include it?

easwars commented 1 year ago

I understand that users who deal with messages which are anywhere close to this size are a very very small fraction, and putting this detail in the docstring might confuse others. So, I'm ok closing this or mentioning this is one of our examples/guides dealing with encoding.

easwars commented 2 months ago

The size limits have made it to the official protobuf docs: https://engdoc.corp.google.com/eng/doc/devguide/proto/programming-guides/encoding.md?cl=head#size-limit