What is the good number for the max Frame size

310 views
Skip to first unread message

Grpc learner

unread,
Aug 9, 2018, 12:40:30 AM8/9/18
to grpc.io
The default max frame size is 4Mb, how can I determine a good number for max frame size?
Addition, the `max frame` belongs to the transportation layer, if we do not manually send a protobuf msg to grpc and only call APIs generated by gRPC, the grpc always send a msg under 4Mb(the default value) ? 
Correct me if I am wrong.



Yuxuan Li

unread,
Aug 15, 2018, 2:26:22 PM8/15/18
to grpc.io
I am not sure what do you mean by "if we do not manually send a protobuf msg to grpc and only call APIs generated by gRPC", but max frame size is applied to all HTTP2 frames regardless (like you said, it belongs to the transport layer), so there shouldn't been any distinction between what users put or use. grpc will take whatever the user want to send, and create frame(s) for the data. If the data is larger than a single frame (4MB) can contain, then multiple frames will be created to transmit the data.

And in most cases, there is no need to change the default max frame size. But if you want to optimize your application's performance, you may want to experiment with different values max frame size depending on the message size you are transmitting.

Grpc learner

unread,
Aug 16, 2018, 6:00:45 PM8/16/18
to grpc.io
Hi Yuxuan,

Thanks for your answer!
Reply all
Reply to author
Forward
0 new messages