Home / Companies / Stream / Blog / Post Details
Content Deep Dive

How Do Activity Feeds Stay Responsive During Traffic Spikes or Viral Events?

Blog post from Stream

Post Details
Company
Date Published
Author
Raymond F
Word Count
1,875
Company Posts That Month
28
Language
English
Hacker News Points
-
Summary

Feed systems face significant technical challenges when handling traffic surges caused by viral posts from users with millions of followers, such as celebrities or news events. The core challenge lies in efficiently distributing content, with two primary strategies: fan-out on write, which precomputes feeds but incurs high write costs, and fan-out on read, which builds feeds on demand but increases read latency. A hybrid approach is often used, applying fan-out on write for regular users and fan-out on read for high-follower accounts. Caching architectures play a crucial role, with multi-tier caching systems like Meta's TAO and Twitter's Thunder providing rapid data access while managing cache stampedes and identical-request floods. Message queues decouple the synchronous write path from asynchronous tasks, using systems like Kafka to handle spikes by managing consumer lag. To prevent crashes during viral moments, systems employ traffic tiering, load shedding, and dependency isolation, with mechanisms like bulkheads and circuit breakers ensuring core services remain functional. Auto-scaling is not sufficient on its own due to its reactive nature, so pre-scaling and simulation exercises are necessary for predictable events. These strategies ensure feeds remain responsive during traffic spikes, allowing engineering teams to focus on product experiences rather than infrastructure challenges.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
Real-time 2 6,457 1,307 242 +28%
Kubernetes 1 1,840 308 106 +33%