Course contentsShow
← System Design
Lesson 1679 of 1,91940. Real-World System: Social Media FeedFree lesson

Hybrid Pull-Push Model

Combining pull-on-refresh with push notifications for optimal balance between real-time updates and scalability.

Hybrid Pull-Push Model

You'll learn how to combine pull-on-refresh with push notifications to balance real-time updates with system scalability.

The Core Idea

The Hybrid Pull-Push model strategically blends two approaches: pushing immediate notifications for critical updates while relying on pulling for bulk feed content. Think of it like news alerts on your phone—you get push notifications for breaking stories, but when you open the app, it pulls the full feed to refresh everything.

This model solves a fundamental tension: pure push delivers instant updates but overwhelms your system with fanout traffic, while pure pull is scalable but lacks real-time feel.

How It Works

When a new post is created:

  1. Push a lightweight notification to active/online users only (via WebSocket or SSE)
  2. The notification contains minimal data: "new content available" + post ID
  3. User's client pulls on demand when they refresh or open the feed
  4. The pull fetches ranked, personalized content from cached timelines

For inactive users, skip the push entirely—they'll pull fresh content when they return anyway.

Why This Balance Works

Scalability: You're not pre-generating feeds for millions of inactive users (avoiding massive fanout).

Real-time feel: Active users get instant awareness through push notifications.

Consistency: Pull operations fetch the latest ranked content, incorporating recent algorithm updates.

Resource efficiency: Push infrastructure handles only online users; pull leverages existing caching layers.

The hybrid approach is especially powerful when combined with selective fanout strategies—celebrities trigger pull-only, while regular users get push notifications.

Key Takeaway:
The Hybrid Pull-Push model pushes lightweight notifications to active users for immediacy while pulling full feed content on-demand, optimizing both user experience and system scalability.