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

Real-Time Requirements for Social Feeds

Understanding latency expectations, update frequency, and consistency requirements for real-time social media feeds.

Real-Time Requirements for Social Feeds

What you'll learn: How to define and balance latency, update frequency, and consistency expectations for delivering fresh social media content at scale.

Why Real-Time Matters

When you post on social media, your followers expect to see it quickly—but how quickly? Real-time requirements define the acceptable delay (latency) between a post being created and appearing in feeds, plus how consistent that experience must be across millions of users.

Core Real-Time Dimensions

Latency Expectations

  • Celebrity posts: Often 1-5 seconds to reach millions (high priority)
  • Regular posts: 30 seconds to 2 minutes is typically acceptable
  • Comments/likes: Sub-second updates feel "live"

Think of it like a newspaper vs. a sports ticker. Breaking news can wait minutes; live game scores cannot.

Update Frequency

How often should feeds refresh?

  • Pull-on-open: Only when user actively opens the app (most common)
  • Periodic polling: Every 30-60 seconds while app is active
  • WebSocket/long-polling: Push updates instantly (resource-intensive)

Consistency Requirements

  • Eventual consistency: Post appears within minutes across all followers (acceptable for most feeds)
  • Read-after-write consistency: You see your own post immediately (critical for UX)
  • Ordering guarantees: Posts don't appear out of chronological order

Trade-Offs in Practice

Stricter real-time requirements mean:

  • Higher infrastructure costs (more workers, caching, connections)
  • Greater complexity in fanout processing
  • Potential scalability bottlenecks during viral events

Most platforms choose eventual consistency with pull-on-open updates, ensuring sub-minute delivery for 95% of posts while handling edge cases (like celebrity posts) with special optimizations.

Key Takeaway: Real-time social feeds balance user expectations for freshness (seconds to minutes) against infrastructure costs, typically accepting eventual consistency and pull-based updates to scale efficiently while guaranteeing immediate read-after-write consistency for the poster's own experience.