If you are on social media, then there is a high probability that you have used instagram at-least once in your life. Have you ever wondered how the app works so flawlessly and if you have to build a similar app how will you proceed? In this article we will be covering how we can design an app similar to instagram.
Requirements
Functional
- User should be able to upload an image/video on his profile.
- User should be able to see uploads of other users followed the user.
- User should be able to follow other users.
- User can perform search for an image/video based on title.
Non Functional
- The user feed latency should be low.
- We are okay with eventual consistency as uploaded image can be shown to another user after few milliseconds.
- Our app needs to be highly available.
- The Data store we will be using for storing image/video should be reliable and data should not be lost.
Additional Requirements
- Users can add tags to a photo/video.
- Users can put comments on a post.
- Users can search photo based on tags.
Capacity Estimation
Traffic estimation
Let’s assume we have 500 million daily active users and we get roughly 5 million uploads per day.
Total number of uploads ~ 57 per sec
Storage estimation
Let’s assume average upload size of 200KB.
Then total storage required for 1 day is 200*5 ~ 1 TB per day.