Design a Creator Activity Feed for a Music Streaming App
We want to add an activity feed to our music streaming platform where artists and podcasters (creators) can post short text updates, tour announcements, and release teasers to their followers. Listeners open the app and see a reverse-chronological feed composed of recent updates from all the creators they follow. Your goal is to design the backend system responsible for publishing creator posts, managing follower relationships, and delivering low-latency timelines to listeners.
- Creators can publish short text posts (up to 280 characters) with optional media links.
- Listeners can follow and unfollow creators.
- Listeners can fetch a reverse-chronological timeline feed of updates from creators they follow with pagination.
- Low latency read performance: P99 feed fetch latency under 200ms.
- Eventual consistency: New creator posts must appear in follower feeds within 5 seconds.
- High availability for reads (99.9% uptime), tolerating temporary write delay during peak traffic.
10 million total registered users, 2 million Daily Active Users (DAU). 100,000 posts published per day (~1 QPS average, 50 QPS peak). Timeline fetch load is ~500 QPS average (peaking at 2,500 QPS).
- High-level architecture diagram showing post publishing, fan-out processing, and feed generation.
- Data models for creator posts, follower relationships, and timeline feed storage/caching.
- Explanation of the chosen fan-out strategy (push, pull, or hybrid) and pagination mechanism.
Evaluates whether the design explicitly addresses fan-out on write (push) vs fan-out on read (pull) or a hybrid approach, detailing how background workers populate Redis/in-memory user timelines.
Evaluates the mechanism for handling creators with large follower counts (e.g., combining pre-computed timelines for normal creators with on-the-fly merging for popular creators).
Evaluates the data schema for creator posts, follow relationships, and the layout of the timeline cache (e.g., Redis Sorted Sets keyed by user ID with timestamps as scores).
Evaluates the feed retrieval design for cursor-based (timestamp or post-ID based) pagination to avoid missing or duplicating items when new posts are inserted.
Every functional requirement in the brief is visibly served by something on the board, and the non-functional targets are addressed rather than ignored.
Components are labelled, data flows are drawn as connections between them, and the direction of each flow is unambiguous.
Follow-up: How does your architecture handle a high-volume creator with 500,000 followers posting an update without causing write spikes or queue backup in your fan-out pipeline?
Listeners can follow up to 500 creators. Most creators have under 5,000 followers, but top artists can have up to 500,000 followers. Delivery of posts to follower feeds can be eventually consistent within 5 seconds.
- Views
- 4