Posting tweets
Open a user page and see their posts.
Possibility to react and answer to a post
Subscription to an account.
Home feed.
Low latency
Availability
Scalability
20 million daily active users = 100 million tweets/day
200 million daily passive users = read-only
1 billion total users
A globally read-heavy structure mainly.
-> fetch posts from a user
Input: user(, page)
Output: posts, ranked by decreasing time
(would recommend paging to avoid fetching too many posts, e.g {posts_per_page = 10, page = 1})
-> fetch subscriptions
Input: user
Output : user_id of the people followed by user
Describe the overall system architecture. Identify the main components needed to solve the problem end-to-end. Use the diagramming tool to create a block diagram.
Define the data model. Identify the main entities, their attributes, and relationships. Consider the choice of database type (SQL vs NoSQL) and justify your decision based on access patterns...
Deep dive into 2-3 key components. Explain how they work, how they scale, discuss tradeoffs, capacity, and any relevant algorithms or data structures.