Cloud concept · Updated

Push vs. Pull - Push and pull are delivery models distinguished by who initiates delivery: the sender in push and the consumer in pull.

In short

With push, a producer or intermediary sends data or invokes a handler when work is available; with pull, the consumer requests work when it has capacity. The choice affects delivery latency, request volume, network access, and where the system handles bursts and tracks progress.

Cloud Concepts Hub →

5 key aspects of Push vs. Pull

Compare push and pull at each delivery boundary, then evaluate latency, capacity control, recovery, and connectivity separately.

01
Delivery boundary

Identify who initiates delivery on each hop. A library can present a push-style callback to application code while pulling from an upstream API.

02
Backpressure

Pull consumers can stop requesting work or limit their batch size when capacity is low. Push handlers can absorb bursts with durable buffering or use flow control if the sender supports it.

03
Latency and request volume

Push avoids waiting for the consumer's next poll, but throttling and retries can still delay delivery. For pull, distinguish the interval between requests from the time a long-poll request can remain open while waiting for work.

04
Progress and recovery

Determine whether the application, a client library, or a managed service records progress. Acknowledge or checkpoint after the work is durable, and handle duplicates when delivery or processing is retried.

05
Connectivity and trust

Webhook push needs a destination the sender can reach; verifying the sender is a separate security control and may be required by the service. Pull consumers initiate connections to the source or broker, which can simplify deployment under inbound network restrictions.

Cloud services for Push vs. Pull

Amazon SNS and Amazon SQS show how the models can work together: SNS pushes a published message into an SQS queue, and workers pull from the queue as capacity becomes available. Google Cloud Pub/Sub and Azure Event Grid offer push and pull options, so the event source can remain the same while consumers use different delivery models where supported. Azure Cosmos DB shows the distinction within a client integration: a background processor polls the feed and calls a handler, while an explicit pull integration gives application code control over reads and resume points.

Azure Cosmos DB

The change feed processor polls in the background, invokes application handlers, and uses leases to coordinate workers and save progress. Pull mode lets application code read feed pages explicitly and manage continuation tokens for resumption.

Event Grid

Event Grid can push events to supported handlers, including webhooks. Event Grid namespace topics also support pull delivery, so consumers can receive events at their own pace and acknowledge them after processing.

What is Push vs. Pull

3 min read

Distinguish push from pull at a specific boundary. When an event broker sends an HTTP request to a webhook, it pushes an event to the endpoint. When a worker calls a queue's receive API, it pulls a message from the queue. A single pipeline can use both: an event router pushes jobs into a queue, then workers pull them as processing slots open. Registering a subscription or opening a connection does not settle the question; what matters is whether the sender delivers work on its own or in response to a consumer's request for work.

Push lets a consumer react without running its own receive loop. For example, a storage notification can invoke a handler whenever a file arrives so the handler can update a catalog. A webhook endpoint must be reachable by the sender. Authentication is a separate concern: delivery can work without it, but production endpoints should verify the sender using a mechanism the service supports, such as signed requests or identity tokens. To absorb bursts, a handler can durably enqueue events before acknowledging them and let downstream workers process them at a sustainable rate.

Pull lets consumers decide when to receive more work and, where supported, how many items to request. A report generator can stop receiving jobs while all its processing slots are occupied. Repeated short polls can produce many empty responses when work is sparse, but increasing the time between requests can delay pickup of work that arrives just after a poll. Long polling is different: the server holds an outstanding receive request open and can return as soon as work arrives, reducing empty responses without making available work wait for the request's timeout. Pull can avoid the need for an inbound delivery endpoint, but it does not stop a backlog from growing during a sustained burst.

Azure Cosmos DB change feeds illustrate why the application interface and underlying transport can differ. The change feed processor polls the feed in the background and invokes an application callback with batches. This is push-style at the callback boundary, not a webhook initiated by the database. The processor uses a lease container to distribute feed ranges across instances and checkpoint progress. In pull mode, application code explicitly reads pages, chooses when and which feed ranges to read, and persists continuation tokens if it needs to resume after a restart. Use a processor for continuous handling with built-in coordination, or explicit pulls when a batch job needs control over read timing, ranges, or resume points.

Neither model guarantees ordering, durability, or exactly-once processing. A push sender may retry if it misses an acknowledgment after the handler has committed an update. A pull worker may likewise commit an update and then crash before recording its progress. Where retries or replay are possible, make processing idempotent and advance progress only once the work or its handoff is durable. Check the service's retry, retention, and replay behavior, and monitor the age of the oldest pending work or lag behind the source; successful requests alone do not show that consumers are keeping up.

Push vs. Pull exam questions

Real practice exam questions on Push vs. Pull, with the correct answer and its explanation. Answer them with every option in the exam simulator.

DVA-C03

A company stores customer notification preferences in an Amazon DynamoDB table. Its customer-facing application invokes an AWS Lambda function after writing to the table so the function can invalidate cached preferences. Changes made by a support tool and a nightly import bypass this invocation, leaving stale cache entries. The company must invalidate entries when items are inserted, updated, or deleted, without modifying any of the writers or adding polling code to the function. Which solution meets these requirements?

Show answerCORRECT ANSWER

Enable DynamoDB Streams with the KEYS_ONLY view. Create a Lambda event source mapping for the stream and grant the function's execution role permission to read it.

DynamoDB Streams records item-level changes regardless of which writer makes them. The event source mapping polls the stream and invokes the function with records that contain the keys needed to invalidate cache entries, including keys for deleted items.

Practice Push vs. Pull in a full exam

Questions on Push vs. Pull in each practice exam, with every answer option and an explanation for each:

Start a free practice exam

Learn Push vs. Pull in lessons

2 short lessons on Push vs. Pull in 1 certification course.

Open the lessons