Skip to content
PMInterviewKit
← All questions
Technicalstretch

How would you design the backend for a photo-sharing app's news feed?

How to approach it

Clarify what the feed shows and how fresh it must be, then explain the core choice: build feeds when someone posts, or when someone opens the app.

How a strong answer opens

“I'd like to clarify what the feed shows and how fresh it must be. The core choice is whether to build each person's feed when someone posts or when they open the app.”

Outline of a strong answer

Try answering out loud for a few minutes before you open this.

  1. Requirements: who appears in the feed, ranking, freshness
  2. Store photos in object storage behind a CDN; store metadata in a database
  3. Option A: push posts into followers' feeds when created
  4. Option B: pull and assemble when a user opens the app
  5. Hybrid for accounts with huge followings
  6. Ranking service and caching for speed
  7. Trade-offs: cost, freshness, load on peak events

Where this question usually goes wrong

Describing one database query per feed load, without discussing precomputed feeds, accounts with huge followings, or caching.

Learn the method

System design for PMs in Module 6, Technical for PMs.

The full kit has worked answers in full, start to finish, for every round type. $129 once.

Get one email when the full kit opens

No spam: just one launch email. See our privacy policy.