Practical guide

How Pub/Sub message size affects cost

Model Pub/Sub throughput from encoded messages, attributes, subscriber delivery, and the documented minimum request size.

Updated · Sources checked

Count encoded bytes and delivery copies

Pub/Sub throughput uses message data and attributes, and Google documents a 1 KB minimum per request for Pub/Sub service pricing. Small individual publishes can therefore have more billable throughput than payload bytes imply.

One million 200-byte events sent individually represent at least one billion request-minimum bytes before delivery. Batched requests can reduce that minimum effect where latency and failure handling allow it. With three subscribers, delivery quantities still multiply the delivered stream.

Use measured request and message distributions, not only average payload. The Pub/Sub Cost Calculator makes publish, subscriber, and retention assumptions visible.

FAQ

Are attributes free?

No. Google includes attribute keys and values in message-volume calculation.

Official sources

Related calculators

Continue reading