MVP
design an Instagram like system
Users can upload photos/images
Users can follow other users
In the homepage, the app will display a timeline consists of photos/images posted by the subscribed users
Non MVP
comments, likes, stories
Scalable - be able to handle large traffic
Available - Should be accessible anytime/anywhere
Performance - the latency should be low
Durability - photos/images should be persisted once get uploaded
400 million DAU
100 million photos uploads daily
Upload QPS
100 0 00 000 / 100 000 = 1000 QPS
Read QPS
assume each user views 5 posts per day
2000 million views/day
2 0000 00 000 / 100 000 = 20000 qps
Storage, assume 500k / photo
100 000 000 * 500k = 50 TB /day
replica factor * 3 (replications, different resolutions)
150 TB /day
*top account 100 million followers
*4 billion likes everyday
Define what APIs are expected from the system...
Defining the system data model early on will clarify how data will flow among different components of the system. Also you could draw an ER diagram using the diagramming tool to enhance your design...
You should identify enough components that are needed to solve the actual problem from end to end. Also remember to draw a block diagram using the diagramming tool to augment your design. If you are unfamiliar with the tool, you can simply describe your design to the chat bot and ask it to generate a starter diagram for you to modify...
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?