DAU - 1.2 billion
Avg time per user - 20 mins per day
avg time on posts - 5 sec
Total posts = 1200/5 = 240.
Reads ~ 57k reads per sec.
10% are active users and add 2 posts per day
120000000*2 = 2.4million posts per day =
writes ~2500 posts per sec.
GET /v1/posts?Pagination={}&sort=+{time} -> Partial
GET /v1/posts/:id -> Post
POST /v1/posts/:id/comment
POST /v1/posts/:id/like
Post
User
Page
In this diagram:
Explain how the request flows from end to end in your high level design. Also you could draw a sequence diagram using the diagramming tool to enhance your explanation...
Dig deeper into 2-3 components and explain in detail how they work. For example, how well does each component scale? Any relevant algorithm or data structure you like to use for a component? Also you could draw a diagram using the diagramming tool to enhance your design...
Explain any trade offs you have made and why you made certain tech choices...
Try to discuss as many failure scenarios/bottlenecks as possible.
What are some future improvements you would make? How would you mitigate the failure scenario(s) you described above?