← Lessons

quiz vs the machine

Gold1370

System Design

Push vs Pull

Whether the source sends updates to consumers or consumers ask for them.

5 min read · core · beat Gold to climb

Two directions of flow

In a push model the source sends data to consumers as soon as it changes. In a pull model consumers ask the source for new data when they are ready.

Both deliver the same information, but they place control and load in different places.

Push trade offs

  • Updates arrive with low latency because there is no waiting between polls.
  • The source must track who wants data and handle slow consumers, risking overload if a consumer cannot keep up.

Pull trade offs

  • The consumer controls its own pace, so a slow consumer simply asks less often, giving natural backpressure.
  • Frequent polling wastes work when nothing changed, and infrequent polling adds latency.

Common hybrids

  • A push notification that says something changed, followed by a pull to fetch details, keeps latency low while letting the consumer control load.
  • A log or message queue lets consumers pull at their own rate while the broker buffers.

Choose push for freshness and pull for control, and combine them when you need both.

Key idea

Push sends updates immediately for low latency while pull lets consumers fetch at their own pace for natural backpressure.

Check yourself

Answer to earn rating on the learn ladder.

1. What natural property does the pull model provide?

2. What is a risk of the push model?