0%
Product Architecture Interviews: User Flows, APIs, Data Models, Feeds, Real Time and Privacy
Walkthrough: Photo Sharing App
This lesson runs the whole six step framework on one of the most common product architecture prompts: design a photo sharing app, where people post photos, follow each other, browse a home feed, like and comment, and can make their account private. You have seen each building block in earlier lessons. Here the goal is to see them assembled under interview conditions, with the time budget, the numbers and the choices made out loud, so you can reproduce the shape on any similar prompt.
The walkthrough is written as one strong candidate's answer, with notes on why each move earns credit. Treat it as a model rather than a script. Your interviewer will steer differently, and the point is to recognise which step you are in and what it needs to produce.
Restating and scoping the prompt
The prompt arrives as one line: design a photo sharing app like the ones you use every day. The candidate restates it and proposes a scope within the first two minutes.
"As I understand it, users upload photos with captions, follow other users, and see a home feed of posts from people they follow. They can like and comment, and each user has a profile with a grid of their posts. Accounts can be public or private. I would like to focus on posting, the home feed, likes and comments, the profile, and privacy. I would leave out stories, direct messages, search, reels and ads unless you want one of them. Does that match what you had in mind?"
This does three useful things. It names a concrete core, it names what is out of scope so the interviewer can object now rather than later, and it ends with a question. Suppose the interviewer agrees and adds one thing: they care about the experience for a user who follows a few very popular accounts. That is a hint that the feed deep dive will need the celebrity case.
Personas and core flows
There are three personas. A creator posts photos and reads reactions. A viewer scrolls the feed, likes, comments, follows and visits profiles. Most users are both. A small admin or moderator persona handles reports, which you mention but do not design in depth.
The core flows, written as short user stories, become the spine of the design:
Nice to have items go on a separate line: saving posts, tagging people, location tags, notifications for likes and comments. Notifications are likely to come up, so the candidate notes that they would reuse the notification system from l06 and keep it out of the main diagram.
Edge cases that shape the design
The candidate spends one more minute on edge cases, because they will shape the data model and the read paths. What does a viewer see if a post is deleted while they scroll? It disappears on the next fetch, and a like on a deleted post fails quietly. What if a user blocks someone? Each disappears from the other's feed, profile views and comments, as in l08. What does a new user with no follows see? An empty state with suggested accounts, which the candidate marks as out of scope beyond a simple suggestions call. What happens while a photo is processing? The author sees it at once; others see it when it is ready, as in l07.
Non functional needs as product promises
Rather than listing generic qualities, the candidate states promises users would notice:
The feed opens fast: first page in under about 300 milliseconds at the 90th percentile on a good network, with images streaming in behind. Posting feels instant to the author: the post appears on their profile immediately, and followers see it within seconds of processing finishing. Likes respond instantly to the person tapping, and the counts others see can lag by a few seconds. Privacy is never violated: a private account's posts never appear to a non follower on any screen, and a block takes effect immediately. Photos are never lost once the app says posted.
Each promise maps to a mechanism later: an optimistic client for posting and liking, eventual consistency for counts, strong checks for privacy and durable storage for media. Stating them this way gives the interviewer a clear contract to test the design against.
Back of the envelope numbers
The interviewer says to assume a large product. The candidate picks round numbers and says them out loud.
The conclusions matter more than the numbers. Feed reads outnumber new posts by roughly fifty to one, so the feed read path needs to be cheap and precomputed where possible. Fan out on write for an average post means about 200 feed insertions, which is affordable, but a post from an account with 40 million followers would mean 40 million insertions, which is not; that confirms the hybrid feed the interviewer hinted at. Likes are high volume and concentrated on a few posts, so counters need care. Media storage is large and growing, so tiering matters.
Questions the candidate asks, and why
Scoping is a conversation, so the candidate asks a small number of questions whose answers would change the design, rather than a long checklist. Is the feed chronological or ranked? The interviewer says chronological is fine to start, which keeps the ranking discussion short. Are there very large accounts, and how large? The interviewer confirms tens of millions of followers, which locks in the hybrid feed. Is the product global? Yes, which means media must be served from a CDN everywhere and users can be homed to regions. Do we need video? Photos only for now, which removes transcoding from the critical path and lets the media pipeline from l07 stay simple. Each answer is written down next to the requirement it affects, so the interviewer can see the questions were not ritual.
What the interviewer is checking in step one
Interviewers commonly look for a clear, agreed scope, flows that drive the rest of the design, product promises rather than vague qualities, and a few numbers that change decisions. A candidate who finishes step one in about eight minutes with all four has already given strong evidence of product sense and navigation. The candidate closes the step with a checkpoint: "So the hard parts look like the home feed with celebrity accounts, counts on viral posts, and privacy across every screen. I will sketch the data and APIs next, then the architecture, and spend most of the deep dive time on those three. Sound good?"
Pacing for the whole interview
Before moving on, the candidate has a rough plan in mind for 45 minutes: about 8 minutes for requirements and numbers, 5 for the data model, 5 for APIs, 7 for the high level architecture, 15 for deep dives and 5 for trade offs and wrap up. The plan is not announced in detail, but it guides decisions such as stopping the API discussion after the five main endpoints rather than listing every settings call. If the interviewer pulls toward one area early, the candidate follows and shortens a later step, keeping the deep dives because that is where most of the evidence for senior level is gathered.
When an interviewer adds a detail during scoping, such as caring about users who follow very popular accounts, write it down and say which deep dive it points to. It shows you are listening and lets you plan the second half around what they value.