1. Design a photo-sharing app like Instagram. Where do you start, and what do you ask me?
Seniorinterviewrequirements
What the interviewer is really testing
Whether you scope an open-ended problem before designing, ask only the questions whose answers change the architecture, and turn vague goals into numbers you can design against.
Show the model answer, follow-ups and checklist
Model answer
I would not draw anything for the first five minutes. First I want us to agree on what we are building.
Functional scope. I would propose a scope instead of asking open questions: “I will assume the core is three things: upload a photo, follow other users, and view a feed of photos from the people I follow. I will leave out stories, direct messages, search and ads unless you want one of them.” A proposal gets a faster and clearer answer than “what features do you want?”.
Non-functional requirements. I would ask the handful that change the design:
- How many daily active users are there, and how many uploads and feed views does each make? That gives the read to write ratio.
- What latency is acceptable for loading the feed? May a new photo take a few seconds to reach followers’ feeds?
- Is the audience global? That decides the CDN and multi-region questions.
- What must never be lost? An uploaded photo, presumably. A like count can be approximate.
- What are the availability targets for viewing and for uploading? They may differ.
If you ask me to choose, I would state assumptions: 100 million daily users, feed views far outnumbering uploads, the feed loading in under 500 ms at p99, a feed that may be a few seconds stale, and photos that are durable.
Then I would write these on the board, say the plan (a quick estimate, the API, the data model, a high-level design, then deep dives on feed generation and media storage) and check: “Does that scope match what you had in mind?”
The purpose of the opening is to give the rest of the session something to be judged against. “The feed may be a few seconds stale” is what later lets me justify building feeds asynchronously.
Likely follow-ups
- I answer "you decide" to every question. What do you do?
- State explicit assumptions with numbers, write them down and move on within a minute. The interviewer is checking that you can make reasonable calls without hand-holding. Offer one checkpoint ("tell me if any of these look wrong") and then design against them.
- Which of your questions would change the design the most?
- The read to write ratio and whether the feed may be stale. A read-heavy product that tolerates a few seconds of staleness points to precomputed feeds and heavy caching. If followers must see a post instantly, the fan-out design and the storage choices change.
- How do you know when you have asked enough?
- When I can state the two or three core use cases, the rough scale, and the latency, consistency and availability targets for the main path. That usually takes five or six questions and about five minutes. Further questions can wait until a design decision depends on them.
- What if you realise halfway through that you scoped it wrongly?
- Say so plainly, state what changes and adjust the design. Requirements change in real projects too, and interviewers often change one on purpose to see how you react.
Common mistakes
- Drawing components before agreeing what the product does.
- Asking a long list of questions whose answers would not change anything.
- Asking open questions such as "what features do you want?" instead of proposing a scope to confirm.
- Collecting requirements and never referring to them again when making decisions.
- Skipping non-functional requirements, so that later trade-offs have no basis.
A strong answer includes
- Proposes two to four core use cases and names what is out of scope
- Asks about scale and the read to write ratio
- Gets latency, consistency, availability and durability targets as numbers
- States assumptions when the interviewer declines to answer
- Writes the requirements down and confirms them
- Outlines the plan for the rest of the session