Pub/Sub Made Easy
Push or Pull Subscriber? - ep. 6
A ten-episode progression through topics, subscriptions, clients, endpoints, and replay
Ten 2019–2020 episodes follow a message from publication to independent subscription backlogs, delivery, acknowledgement, and replay. Examples compare push and pull consumers and connect them to serverless endpoints.
Google Cloud Tech 6 of 10
In this collection Browse 10 summaries 6 of 10
With pull delivery, the subscriber asks Pub/Sub for messages. With push delivery, Pub/Sub sends requests to the subscriber's HTTPS endpoint. Priyanka compares how that choice changes access requirements, work distribution, and control over delivery rate.
Key points
- The connection requirements differ: Pull clients need credentials to call the Pub/Sub API. Push needs a DNS-reachable HTTPS endpoint with a certificate that is not self-signed, under the episode's 2020 requirements 00:00–02:07(opens in a new tab).
- Workers can share incoming work in different ways: Multiple pull workers on one subscription each receive a subset of its messages. A push endpoint can instead be a load balancer that distributes requests, or one webhook receiving messages from several subscriptions 01:04–03:09(opens in a new tab).
- Control over delivery rate moves between client and service: Pull clients choose how quickly to retrieve messages and can extend acknowledgement deadlines. With push, Pub/Sub slows delivery when the endpoint returns errors or takes too long to respond 02:07–03:09(opens in a new tab).
- The episode associates pull with high-volume or private services and push with webhooks and scale-to-zero services: Those are scenario-based recommendations, not universal performance guarantees 03:09–04:12(opens in a new tab).
Full video: https://www.youtube.com/watch?v=KObJkda4ZfY(opens in a new tab)