Instagram System Design

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

  1. User should be able to upload an image/video on his profile.
  2. User should be able to see uploads of other users followed the user.
  3. User should be able to follow other users.
  4. User can perform search for an image/video based on title.

Non Functional

  1. The user feed latency should be low.
  2. We are okay with eventual consistency as uploaded image can be shown to another user after few milliseconds.
  3. Our app needs to be highly available.
  4. The Data store we will be using for storing image/video should be reliable and data should not be lost.

Additional Requirements

  1. Users can add tags to a photo/video.
  2. Users can put comments on a post.
  3. 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.

Click Here