Google IoT Core 是否支持 HTTP 压缩?

Does Google IoT Core support HTTP compression?

使用 HTTP 协议,是否可以利用 HTTP 压缩(即 Content-Encoding: gzip)来减小 publishEvent 的主体大小,从而降低 IoT 核心的总成本?

我测试了在 Node HTTP 示例中设置 gzip header 并且它继续为我工作所以你应该能够做到这一点。另请注意you can use MQTT,这是一个二进制协议,这也可能有助于减少网络开销。

请注意,实际负载本身以及配置更改消息都是二进制数据,可以在通过网络发送之前对其进行压缩。

我收到了 Google 的反馈,这是摘录:

Cloud IoT supports receiving data on gzip compressed encoding in the REST devices API. Though this approach could save you some bandwidth usage from your devices to Google Cloud, sending compressed data will NOT reduce the total cost of Cloud IoT core. Cloud IoT will account for ingress data the uncompressed version of the data for billing.