Skip to main content

Design Instagram

Understanding the Problem

📸 What is Instagram ?

Instagram is a social media platform primarily focused on visual content, allowing users to share photos and videos with their followers.

Designing Instagram is one of the most common system design interview questions asked not just at Meta, but across all FAANG and FAANG-adjacent companies. It has a lot of similarities with our breakdowns of FB News Feed and Dropbox , but given the popularity and demand, we decided this warranted its own breakdown.

Functional Requirements

Core Requirements

  1. Users should be able to create posts featuring photos, videos, and a simple caption.
  2. Users should be able to follow other users.
  3. Users should be able to see a chronological feed of posts from the users they follow.

Below the line (out of scope):

  • Users should be able to like and comment on posts.
  • Users should be able to search for users, hashtags, or locations.
  • Users should be able to create and view stories (ephemeral content).
  • Users should be able to go live (real-time video streaming).

Non-Functional Requirements

tip

If you're someone who often struggles to come up with your non-functional requirements, take a look at this list of common non-functional requirements that should be considered. Just remember, most systems are all these things (fault tolerant, scalable, etc) but your goal is to identify the unique characteristics that make this system challenging or unique.

Before defining your non-functional requirements in an interview, it's wise to inquire about the scale of the system as this will have a meaningful impact on your design. In this case, we'll be looking at a system with 500M DAU with 100M posts per day.

Pattern: Scaling Reads

Instagram showcases the perfect scaling reads scenario - users view hundreds of posts daily but post only occasionally. This extreme read-to-write ratio demands sharding by user ID for posts, vertical partitioning for different data types (profiles, posts, analytics), and hierarchical storage for older content.

Learn This Pattern