A Lite subject consists of a pre-configured variety of partitions. Every partition is an append-only timestamped log of messages. Every message is an object with a number of fields, together with message physique, a user-configurable
event_timestamp, and an routinely set
publish_timestamp based mostly on when Pub/Sub Lite shops the incoming message. A subject has a throughput and storage capability that the consumer configures. To configure the subject capability, you’ll have to think about a handful of properties, such because the variety of partitions, storage/throughput capability for every partition, and message retention interval.
The Pub/Sub Lite pricing model is predicated on provisioned subject throughput and storage capability. Plan to provision sufficient capability to accommodate peaks in site visitors; then, as your site visitors modifications, you’ll be able to modify the throughput and storage capability of your subjects. Pub/Sub Lite’s Monitoring metrics allow you to simply detect situations when it’s worthwhile to improve your capability. Begin by creating alerting policies that may notify you when your backlog is rising unexpectedly:
subscription/backlog_quota_bytes needs to be comfortably decrease than
subject/storage_quota_byte_limit. If a subscription exceeds the storage capability, the Pub/Sub Lite service removes the oldest message from the partition, whatever the message retention interval for the oldest message. You must also arrange alerts for
subject/subscribe_quota_utilization to verify publish/subscribe throughputs are comfortably beneath restrict.
Pub/Sub Lite scales vertically by permitting you to extend the throughput capability of every partition in increments of 1MiB/s. You’ll be able to improve the variety of partitions in a subject as properly, however this is not going to protect the order of messages. The connector v0.1.zero would require you to restart with a brand new subscription on repartitioning, however we plan to take away this limitation quickly—please regulate the release notes. When beginning with Pub/Sub Lite, it’s greatest follow to barely overprovision the variety of partitions in order that the per-partition publishing and subscribing throughput capacities could be set to the decrease bounds of four MiB/s and eight MiB/s, respectively. As the applying site visitors will increase, you’ll be able to update the Lite topic to extend each the publishing and subscribing capacities as much as 16 MiB/s and 32 MiB/s per partition, respectively. You’ll be able to modify publish and subscribe throughput capability of a partition independently.