KatInterview

Design a Photo and Video Sharing Platform at Scale

System DesignModel answer
HardModel answerSystem Designfeed-generationcdnmedia-pipeline

Last updated

Architect a social media platform where users upload media, follow others, and get a ranked home feed — covering storage, delivery, feed generation, and scaling trade-offs.

The Problem

You are tasked with designing the backend for a photo and video sharing social network. Users can create accounts, follow each other, post images and short videos, interact through likes and comments, receive activity notifications, and search for people or topics. Treat stories and direct messaging as stretch goals: acknowledge them and leave extension points, but do not design them in full.

Your answer should cover:

  • Core APIs — the endpoints a mobile client would call, with pagination and idempotency considered
  • Data models and storage choices — what goes where and why
  • Media ingestion and delivery — upload flow, format transcoding, CDN strategy, and storage tiering
  • Feed generation and ranking — how you build, store, and serve a personalized home feed efficiently
  • Scaling and reliability — sharding, caching layers, hot accounts, consistency guarantees, and failure handling
  • Back-of-the-envelope estimates — put rough numbers on storage, QPS, and egress before diving into design
  • Evolution path — how the system grows from an MVP to global scale

What is expected:

State your assumptions clearly before designing. Interviewers reward structured thinking, honest trade-off discussions, and knowing which parts of the design are genuinely hard. You do not need to cover every bullet in equal depth — identify the two or three areas where interesting engineering decisions live and go deep there.

Hints

Hint 1

Start with scale assumptions and a quick capacity estimate — they should drive every storage and architecture choice you make afterward. Without numbers, trade-offs are just opinions.

Hint 2

The hardest parts are the media pipeline and feed generation. A good answer picks one of the two fan-out strategies (push vs pull), explains why neither alone works at scale, then describes the hybrid that most real systems use.

Hint 3

Hot accounts break your fan-out model and your engagement counters simultaneously. Call this out explicitly and explain the mitigation for each case — it signals that you understand where the real failure modes are.