Skip to content
System Design Explorer

Comparison

News Feed vs Notification Service: Two Kinds of Fan-out

By Ankur NayakReviewed

A news feed and a notification service both take one event and deliver it to many people, so interview answers for them often blur together. The difference is where the result ends up: a feed writes into timelines that users pull when they open the app, while a notification service pushes out through Apple, Google, email and SMS providers that you don't control.

Comparing them side by side makes the trade-offs sharper: what each one precomputes, what 'too many recipients' means for each, and how each survives a failure in the middle of a large send.

News Feed

Full design
News Feed architecture diagramComponents: Mobile / Web App, API Gateway, Post Service, Post Store (Sharded key-value), Social Graph (Graph store), Fan-out Queue (Kafka), Fan-out Workers, Timeline Cache (Redis lists), Feed Service, Media CDN. Connections: Mobile / Web App to API Gateway; API Gateway to Post Service (POST /posts); Post Service to Post Store (write); Post Service to Fan-out Queue (fan-out job); Fan-out Queue to Fan-out Workers; Fan-out Workers to Social Graph (followers of author); Fan-out Workers to Timeline Cache (push post ID); API Gateway to Feed Service (GET /feed); Feed Service to Timeline Cache (read IDs); Feed Service to Post Store (hydrate / celebrity posts); Mobile / Web App to Media CDN (images, video).Mobile / Web AppClientAPI GatewayAPI gatewayPost ServiceServicePost StoreSharded key-valueSocial GraphGraph storeFan-out QueueKafkaFan-out WorkersWorkerTimeline CacheRedis listsFeed ServiceServiceMedia CDNCDN

Notification Service

Full design
Notification Service architecture diagramComponents: Product Services, Notification API, Preferences & Devices (SQL + cache), Templates, Priority Queues (Kafka topics), Push Workers, Email Workers, SMS Workers, APNs / FCM, Email Providers, SMS Providers. Connections: Product Services to Notification API (send(user, template, data)); Notification API to Preferences & Devices (preferences, tokens); Notification API to Priority Queues (enqueue); Priority Queues to Push Workers; Priority Queues to Email Workers; Priority Queues to SMS Workers; Push Workers to Templates (render); Push Workers to APNs / FCM; Email Workers to Email Providers; SMS Workers to SMS Providers.Product ServicesServiceNotification APIAPI gatewayPreferences & DevicesSQL + cacheTemplatesNoSQL databasePriority QueuesKafka topicsPush WorkersWorkerEmail WorkersWorkerSMS WorkersWorkerAPNs / FCMExternal APIEmail ProvidersExternal APISMS ProvidersExternal API

Side by side

News Feed compared with Notification Service
DimensionNews FeedNotification Service
TriggerA user publishes a postAny internal service calls the notification API
Fan-out targetFollowers' cached timelines (post IDs in Redis lists)Devices, inboxes and phone numbers, via APNs/FCM, email and SMS providers
Delivery modelPush into caches at write time, pull at read time (hybrid)Queue per channel and priority, delivered by workers
'Too many recipients' problemCelebrities: skip fan-out, merge their posts at read timeCampaigns: rate-limited scheduler on a low-priority queue
Latency expectationFeed loads in under 200 ms; new posts may arrive seconds lateTransactional sends in seconds; campaigns can take hours
Failure that matters mostLosing the timeline cache: fall back to slow fan-out on readA third-party provider outage: retry with backoff, switch provider, or expire
User controlsFollow, mute, blockPer-channel preferences, quiet hours, unsubscribe

Verdict

Both are fan-out problems solved with queues, but a feed optimises for cheap reads of precomputed results while a notification service optimises for reliable, prioritised delivery through systems it doesn't own. In an interview, say which one you are designing and spend your time on its hardest part: celebrities for feeds, provider failures and priority isolation for notifications.

Frequently asked questions

Can a notification service reuse the news feed's fan-out pipeline?

Partly: both read a recipient list and enqueue work per recipient. But notifications need per-user preferences, per-channel queues, provider-specific workers and delivery tracking, so they are usually a separate service that consumes the same events.

More comparisons