Is the serialised form of a message cached when sending to multiple clients?

18 views
Skip to first unread message

Mark Nuttall-Smith

unread,
Aug 14, 2019, 11:58:47 PM8/14/19
to grpc.io
I have a streaming service that sends the same message to multiple connected clients.
I'm wondering if grpc (or protobuf itself) is smart enough to cache the serialised form of a message, so that the serialisation cost is not incurred once per connected client?
Otherwise, what is the cleanest strategy for optimising this?
Thanks, Mark

Vijay Pai

unread,
Aug 26, 2019, 2:29:35 PM8/26/19
to grpc.io
This caching is not automatic in grpc or protobuf, but I know that some users use generic (non-proto) message sends to achieve this result: explicitly serialize the message once and then send it out multiple times as a raw message. Hope that helps!
- Vijay
Reply all
Reply to author
Forward
0 new messages