Pau*_*uca 3 google-cloud-platform google-cloud-pubsub
The docs for PubSub state that the max payload after decoding is 10MB. My question is whether or not it is advantageous to compress the payload at the publisher before publishing to increase data throughput?
This especially can be helpful if the payload has a high compression ratio like a json formatted payload.
如果您正在寻找 PubSub 的效率,我会首先专注于使用最好的 API,这就是 gRPC 的 API。如果正在使用客户端库,那么无论如何它使用 gRPC 的可能性很高。为什么是 gRPC?
其次,如果可能的话,我会尝试对消息进行批处理,从而减少调用次数,消除一些延迟。
最后我会看看压缩,但这意味着你需要在订阅者处专门解压缩它。这意味着您的应用程序代码将变得更加复杂。如果您的所有工作负载都在 Google Cloud Platform 上,我就不会为压缩而烦恼。如果您的工作负载在 GCP 之外,您可能会考虑它,但测试是有意义的。
如果您的架构稳定,另一种压缩方法是考虑使用 ProtoBuf。
最后,我会:
| 归档时间: |
|
| 查看次数: |
1158 次 |
| 最近记录: |