System design interview guide
Instagram Feed System Design
Picture a creator on a train with a weak phone signal who taps Share on a short video called a Reel. The app says posted within two seconds, so the creator puts the phone away. A few minutes later a friend opens the app and taps play, but the video stutters or shows only a still picture, because the uploaded file is still being converted into smaller versions that a phone can stream. The same moment can also be hard on the system in another way, because some creators have about 50 million followers, and a single post from one of them has to show up in all of those home feeds. The home feed of a photo and video app is the part of the system that has to handle both problems at once.

Problem statement
You are designing the home feed of a photo and video sharing app like Instagram: photos and short videos (Reels) from people you follow, an upload that returns quickly while the video is converted into playable sizes in the background, an ordering step that is either ranked or newest first, optional Stories that vanish after a day, and delivery of the media files from servers close to the phone (a content delivery network, or CDN). Functionally you need posting media, reading a following feed, likes, optional Stories that expire, and profiles. Non-functionally, most feed list responses should return in under about 300 milliseconds (the list of captions and links, not the video bytes), playback should start within a few seconds, the service should stay highly available, and the app should show honest "still preparing" states when conversion lags. Scale sits at hundreds of millions of people active each day, with far more scrolls than posts, heavy cost from sending media across the network, and a few creators whose follower counts make copying one post into every follower's list a cost incident. What interviewers reward: answering "posted" as soon as the file and post record are safe while conversion continues in the background; copying post ids into follower lists for ordinary creators and merging the largest creators in at scroll time; keeping tiny id lists separate from post details and media files; capping how many candidates enter ordering and giving ranking a time limit; and degrading ranking and media honestly instead of showing a blank feed.
Introduction
The problem: a Reel posted on a weak signal
Picture a creator sitting on a train with a weak phone signal. She has just filmed a short video, which the app calls a Reel, and she taps Share. Within about two seconds the app says "Posted", so she puts her phone away. A few minutes later a friend opens the app. Maybe the new Reel is not in his feed yet. Maybe it is there, but when he taps play it shows a still picture and then stutters, because the file she uploaded is still being turned into smaller versions that a phone can stream over a slow connection.
Nothing is broken in that story. The app really did save her post, and the friend really will be able to watch it soon. What the story shows is that "done" means three different things, and each one can be late on its own. Posted means the app has safely saved the video and the post, so it will not be lost. Playable means the video has been converted into versions that phones can stream, at least one of them. Visible means the post has actually shown up in the home feeds of the people who follow her.
The thing we are designing is the home feed of an app like this: the scrolling list of posts from the accounts you follow, plus everything behind it that gets photos and videos in, keeps them safe, and gets them in front of people. In an interview it is usually described as "design Instagram's feed". This page walks through the choices in the order you would make them in the room: first why this problem is worth solving and what exactly we are solving, then what the system must do, then how big it is, and only after that the design itself.
Why teams bother with a feed like this
If you use a photo and video app, you probably open the home feed more often than any other screen. That is exactly why companies spend so much effort on it, and why interviewers keep asking about it. Behind the feed are several real reasons.
The feed is the product. People come to see what the people they follow have posted. If the feed is slow, stale or empty, the app feels broken even when every other feature works. A feed that loads in a fraction of a second and always shows something new keeps people coming back.
Creators need to trust "posted". A creator who taps Share and then waits a minute, or sees an error after a successful upload, will stop posting. The app has to answer quickly and truthfully, and it has to be honest about what is still being prepared.
Video is expensive. A photo is small, but a video is many times larger, and it has to be stored, converted into several sizes, and sent across the network every time someone watches it. For apps like this, the cost of storing and sending media is often the largest line on the bill, larger than the cost of the servers that build the feed.
Reading far outweighs writing. Many more people scroll than post, so the part of the system that builds a feed page runs enormously more often than the part that accepts a post. Anything slow or expensive on the scroll path gets multiplied by that difference.
A few accounts are enormous. Most creators have a few hundred followers, but a few have tens of millions. A design that works for the average creator can fall over the day one of those large accounts posts.
What problem are we solving?
The inputs are posts. Creators send photos and videos, each with a caption, and they expect the app to accept them even on a weak connection. The output is a feed page. Whenever someone opens the app or scrolls, the system must return a short, ordered list of posts from the people they follow, each with its caption, its author, and the links the phone needs to show the picture or play the video. Success looks like this: the creator sees "Posted" quickly and is never told it worked when it did not, the list arrives in a fraction of a second, the video starts playing within a few seconds, and when something is still being prepared the app shows that honestly instead of a blank space.
Three features of this problem make it harder than it looks. The files are large, so the cost of moving bytes matters as much as the cost of running servers. The work is lopsided, with a huge number of scrolls for every post, and with a few creators who are far larger than the rest. And "done" is not one moment, as the train story showed. Notice that none of these features says how to build it. We will not guess at a design yet. First we need to be clear about what the system must do and how well, so that every choice later has a reason behind it.
This page is one of the interview deep dives in the system design interview guides. If you want a version of this problem that has no video, read the Facebook feed guide first, since a text-only feed shares the same skeleton without the media.
How to approach
In an interview you do not begin by drawing boxes. You begin by turning a short, vague prompt into a clear contract: what the system does, how well it must do it, and what is out of scope. Only then do you size the problem, make the design decisions one at a time, and draw the result. The list below is the order this page follows.
How to design an Instagram-style feed in an interview
- Clarify the problem: whether you are building the home feed, Stories, or Explore; what "posted" must mean; how big the files and the audience are; and how exact the numbers on screen need to be.
- Write the functional requirements (what the system does) and the non-functional requirements (how fast, how big, how reliable).
- Estimate the size: how many feed opens and uploads per second, how many bytes leave the network, and how large the biggest creator is.
- Make the design decisions in order: when to say "posted", how files get uploaded, how video becomes playable, how posts reach follower feeds, how the largest creators are handled, how one feed page is built, how it is ordered, how likes are counted, and how Stories expire.
- Draw the picture those decisions produce, then walk one post and one feed page through it.
- Go deeper where the interviewer pushes: the backlog of video conversion, a viral post, failures, and what you measure.
Clarifying questions (say these in the room)
In a real interview the prompt is only a few words: "Design Instagram's feed." Before you design anything, ask questions until the problem is clear. Each answer below changes the design, which is why it is worth asking.
You: "Is this the home feed of posts from people I follow, or do we also need Explore, the page that suggests accounts I do not follow?"
Interviewer: "Home feed from follows. Explore can stay out of scope unless we expand."
That keeps you on one question: show me posts from the people I chose to follow. Suggesting content from strangers is a very different problem, with its own way of picking candidates, so you leave it for later.
You: "When the app says posted, does that mean the file is saved, or that every version of the video is ready to play?"
Interviewer: "Users expect a fast answer. Quality can land later."
This answer is the heart of the media half of the interview. It means "posted" is a promise that the post is safe, not a promise that playback is perfect. You will need a way to tell the app that the video is still being prepared, so write "posted does not mean playable" on the board.
You: "What kinds of media are there, and how big can they get? For example, photos plus videos of up to a minute or two?"
Interviewer: "Photos and short videos. Assume videos are up to a minute or two."
The sizes matter. A photo is a few megabytes at most. A one-minute video can be tens of megabytes. That difference is why video drives the storage, the conversion work and the network cost.
You: "Roughly how many people use it, how often do they open the feed, and how many posts are uploaded each day?"
Interviewer: "Think hundreds of millions of daily users, tens of millions of uploads a day, and far more reads than writes."
Those numbers feed the capacity estimate in the next section. They also tell you early that no single machine will be enough, and that the scrolling path will run far more often than the posting path.
You: "Are there accounts with tens of millions of followers? Do I need to handle them as a special case?"
Interviewer: "Yes. Call out the large accounts explicitly. Assume the largest has about 50 million followers."
You now owe the interviewer a plan for the day one of those accounts posts. A plan that treats every creator the same will not survive the question.
You: "Are Stories, the photos and videos that disappear after about a day, in scope?"
Interviewer: "Yes, mention expiry. Keep ordering shallow unless we push."
Stories are a separate product rule, a lifetime, and not only a post with a flag. You will give them their own short decision later.
You: "Does the feed have to be ranked by a model, or is newest-first acceptable if the ranking is slow? And how exact must like counts be?"
Interviewer: "Show a ranked feed if you can, but never an empty one. Like counts can be a little behind."
Two things come out of this. First, ordering is allowed to degrade, but the feed is never allowed to go blank. Second, exactness is a choice you can spend. A like total that is a few seconds old costs nothing in the product and saves a lot of work, so say the tradeoff out loud.
You: "I want to leave Explore, direct messages, payments, and training the ranking model out of scope so we can focus on upload, the home scroll, and what happens when things run late. Does that match?"
Interviewer: "Yes. Focus on the home feed and media at scale."
If the interviewer later asks about store brands, queue products, or a particular video format, you do not need to answer yet. Park those until the design decisions, where each one has a natural place.
Functional requirements
Functional requirements describe what the system does. From the answers above, the feed must:
- Accept a photo or a Reel. A creator uploads media with a caption, even on a weak connection, and gets a fast and truthful answer. The reason is trust: a post that vanishes or an upload that restarts from zero makes creators stop posting.
- Show a home feed of the people you follow. Each scroll returns a short page of posts with captions, authors and links to the media, and the next scroll continues where the last one stopped. This is the main thing users do.
- Show honest progress while video is being prepared. If a Reel is not fully ready, the post still appears and the app shows a picture or a lower quality version, not an empty box.
- Handle creators of any size. A creator with a few hundred followers and a creator with 50 million followers must both be able to post, and both posts must reach followers.
- Support likes and comments. People react to posts, and the totals show on the post.
- Support Stories. A story shows to followers and disappears after about 24 hours.
- Show profiles. Opening an account shows that account's posts.
Non-functional requirements
Non-functional requirements describe how well the system must do its job. They are the numbers and promises that shape the design.
- Fast feed. Most feed pages should return in under about 300 milliseconds, because the list has to feel instant. The media bytes are downloaded separately, so the list must not wait for them.
- Fast start of video. Playback should begin within a few seconds, even if the best quality is not ready yet.
- Fast "posted". The app must be able to answer the creator in about a couple of seconds, no matter how long video conversion takes.
- Scale. About a billion users, hundreds of millions of them active daily, and tens of millions of uploads a day. Reads, meaning feed opens, far outnumber writes.
- Availability. About 99.9% uptime. A slow part such as ordering or video conversion must not take the whole feed down, so each slow part needs a plan for what the user sees when it is late.
- Freshness with a stated lag. A new post may take a short while to reach every follower's feed. That is acceptable if the delay is small and measured, and it is not acceptable to promise instant worldwide visibility.
- Approximate counts. Like totals may be briefly behind the true number. This is a choice that saves a great deal of work and costs the product nothing.
- Cost control. Moving and storing media is the biggest cost, so the design must not copy large files around or send them through the servers that build the feed.
Out of scope (and why you park these)
Write a short out-of-scope list on the board so the interviewer sees you can bound the problem.
The full Explore or "For You" stack. Explore picks content from a huge pool of accounts you do not follow, using models run partly in advance and partly at request time. That is a different problem from showing posts from people you follow. Say that Explore can add candidates to the feed later, and leave it there unless the interviewer expands the scope.
Direct messages and calls. Messaging is shaped like a chat: order within one conversation, delivery receipts, and a connection that stays open. Park it unless asked.
Training the ranking model. You need the serving side: a bounded list of candidates goes in, scores come out, and a time limit applies. Building the data pipeline that trains the model is a separate interview.
Camera filters and effects. These run on the phone or in offline jobs and are not on the path that saves a post, so they cost nothing to leave out.
Instant worldwide visibility. A new post can take a short while to appear for everyone. If you promise that every follower sees it the moment the creator taps Share, you invent a harder problem than the one you were asked.
That is the requirements stage. If you want to practice it before reading on, try the requirements stage on Practice System Design (about 5–10 minutes), then come back for the sizing and the decisions.
Minute pacing (about 45–60 minutes)
| Minutes | Focus |
|---|---|
| 0–5 | Clarify the problem; write functional and non-functional requirements; agree out of scope |
| 5–12 | Capacity, then the design decisions and the high-level boxes with one post story and one scroll story |
| 12–25 | Upload, video conversion, and how posts reach feeds (the write path) |
| 25–40 | The scroll: candidates, links to media, ordering, cursor (the read path) |
| 40–50 | Deep dive on the questions the interviewer pushes, plus one production story |
| 50–60 | Questions and one tradeoff in depth |
In the room (how you open): "Before I draw anything I'd like to agree on what we are building. I'd start with the home feed of posts from people you follow, with photos and short videos, and treat Explore, messages and model training as out of scope. I'd ask what 'posted' must mean, because I think it should mean the post is safe and not that every video version is ready. I'd ask how many people scroll and how many post, and whether there are accounts with tens of millions of followers. Then I'll write the functional and non-functional requirements on the board, size the problem, and make the design decisions one at a time so every box I draw has a reason."
If you remember one thing: Ask first and write the requirements down. Only then do you design, and "posted" is not the same thing as "playable".
Capacity estimation
We now know what the system must do and roughly how many people use it. The next step is to find out how big the problem is, because the size decides which ideas are even allowed. Do not worry about getting exact numbers. The point is to see which things are huge and which are small, so you spend your effort where it matters.
The numbers below are estimates for the whiteboard, built from the scale in the requirements and a few stated assumptions. Tune them in the room.
| Input | Estimate | Design implication |
|---|---|---|
| Daily active people | About 300 million (assumed, within "hundreds of millions") | The scroll path is the hot path |
| Feed opens | 300M × about 10 a day ≈ 3 billion a day, about 35,000 a second on average, about 100,000 a second at peak (peak assumed at about 3× average) | Each feed page must be cheap, and any per-page work is multiplied by this |
| Uploads | About 30 million a day ≈ 350 a second on average, about 1,000 a second at peak | Writes are modest, so the post path can afford to be careful |
| Read to write ratio | About 3 billion feed opens to 30 million uploads, roughly 100 to 1 | Spend effort on the read path and push slow work to the background |
| Metadata per feed page | About 20 posts × about 1 KB ≈ 20 KB | The list itself is small, so it is not the cost problem |
| Media per feed open | Assume about 5 MB of photos and video actually fetched | About 15 PB a day, roughly 1.4 terabits a second on average, about 250 times the size of the lists |
| New media stored per day | About 30M uploads × about 5 MB original × about 3 for every version made ≈ 450 TB a day | Storage and conversion work grow every day and never shrink |
| Mailbox size | About 500 post ids × about 16 bytes ≈ 8 KB per person; about 1 billion people ≈ 8 TB | Small, because a mailbox holds ids and not posts |
| Fan-out writes (typical) | About 30M posts × about 200 followers ≈ 6 billion writes a day, about 70,000 a second | Large but spreadable across many machines |
| Fan-out writes (largest creator) | One post to 50 million followers = 50 million writes | At 100,000 writes a second this single post would take about 8 minutes of the whole system's attention |
| Feed time budget | About 300 ms at the 95th percentile (95 of every 100 feed pages finish at least this fast) | Candidates, metadata, links and ordering must all fit inside it |
What the numbers imply
- Bytes dominate, not requests. The list of posts is about 20 KB, while the media a person actually fetches is closer to 5 MB. That is a ratio of about 250 to 1, so the question "who sends the media files?" matters far more than "who sends the list?".
- Reads dominate writes. About 100 feed opens for every upload means anything slow should happen when a post is created, and anything repeated should be as cheap as possible when a feed is read.
- One account can break a plan that works for everyone else. An average post causes a few hundred writes, but the largest account causes 50 million. A plan that does a fixed amount of work per follower cannot be used for that account.
- Storage grows forever. Hundreds of terabytes of new media a day means the cost of storing every version of every video is a real design input, not a footnote.
- The feed has a budget. Within about 300 ms you must fetch candidates, load post details, build media links and order the page. Any step that cannot finish in its share of the time needs a fallback.
- These are estimates. Say they are assumptions and that you would confirm them with real traffic or a load test.
Checkpoint: Where do the bytes go, and why can the biggest creator not be handled the same way as an average one?
If you remember one thing: The numbers exist to show skew and bytes. Reads dominate, the biggest creator breaks the simple plan, and video dominates the bandwidth bill.
Design decisions
We now know what the system must do, how fast it must be, and roughly how big it is. Now we choose. Each decision below answers one question the requirements raised, and each one rules out an easier idea that would not survive those requirements. Read them in order, because every decision builds on the one before it.
Decision 1: When do we tell the creator "posted"?
The requirements said the answer to the creator should come in about two seconds, and that "posted" should mean the post is safe. The simplest idea is to do everything first and answer last: save the video, convert it into every size a phone might want, add the post to followers' feeds, and then say "posted".
That idea breaks the speed requirement. Converting a video into several sizes can take a long time, and the time depends on how busy the conversion machines are, not on the creator's phone. On a busy day the creator would wait minutes for a screen that should take two seconds, the request would likely time out, the app would retry, and the same video would be converted twice.
The alternative is to separate what must be true before we answer from what can happen afterwards. Before we answer, the system needs only two facts: the original file is safely stored, and a post record that points to it is saved. Everything else is work that can follow. So we choose to answer "posted" as soon as the file and the post record are safely stored. The post carries a processing state such as pending, which tells every later reader that the video is not fully ready. This is the first of the three clocks from the introduction, and it is the one the creator feels.
Decision 2: How does the file get from the phone to our storage?
The post has to be saved before we can answer, and the file is large. The simplest idea is for the phone to send the whole video to our API in one request, and for the API to write it to storage.
On a train with a weak signal, a long upload as one unbroken request often fails halfway through, and then the phone has to start again from the beginning. It also means large files pass through the servers that handle every other request, which wastes their capacity on carrying bytes.
The alternatives are to let the API accept the file in pieces, or to let the phone send the file straight to storage. We choose the second, in pieces. The phone asks the API for permission to upload, and the API answers with a set of short-lived upload addresses (often called signed URLs). The phone then sends the file, in chunks, directly to object storage, which is a service built to hold large files cheaply and reliably, and it can resume from the last finished chunk if the signal drops. Only when the file is stored does the phone call the Post API to create the post. The API therefore handles small requests, and the large bytes never pass through it. The cost is a few more moving parts, such as an upload session, tracking which chunks arrived, and cleaning up uploads that were abandoned.
Decision 3: How does the video become playable?
A freshly uploaded video is one big file in whatever format the phone made. It is not ready to be streamed to every kind of phone on every kind of connection. People on a slow connection need a small version and people on fast Wi-Fi want a sharp one, and the player should be able to switch between them while the video plays. This switching technique is called adaptive bitrate streaming (ABR), and the set of versions it chooses from is often called the ladder, with each version being one rung.
The simplest idea is to build every rung while the creator waits, which Decision 1 already ruled out. A second idea is to build a version only the first time someone asks for it. That makes the first viewer wait, and the first viewer of a popular post is not one person.
We choose to do the conversion in the background. After the file is stored, the system puts a conversion job on a queue, which is a waiting line that machines pull work from. A fleet of worker machines picks up jobs, builds a thumbnail and a poster frame first because they are cheap and let the app show something, and then builds the rungs one at a time, starting with the smallest. Each time an artifact is ready, the worker updates the post's processing state. A phone can start playing the smallest rung while the larger ones are still being made. The cost is that the queue can fall behind, so we will need to measure how old the oldest job is and decide who goes first.
Decision 4: How do posts reach follower feeds?
Now a post exists. The next question is how a follower's feed will find it. The simplest idea is to compute the feed when someone opens the app: look up everyone this person follows, find their recent posts, sort by time, and return the top of the list.
That works for someone who follows twenty accounts. Suppose a person follows 5,000 accounts. Every feed open becomes a search across thousands of accounts' posts, and with about 100,000 feed opens a second at peak, the cost multiplies out of reach. It cannot fit inside the 300 millisecond budget.
There are two ways to avoid computing the feed at the last moment. One is to prepare the feed in advance, so that when a creator posts, the system adds the new post to each follower's own list. This is called fan-out on write, because one write fans out to many lists. The other is to leave posts where they are and gather them when someone scrolls, which is fan-out on read, and which brings us back to the expensive search.
For ordinary creators we choose fan-out on write. Each follower gets a mailbox, an ordered list that holds the ids of recent posts and nothing else. The ids are tiny, about 16 bytes each, so the mailboxes stay small. The post's caption, author and media links live in a separate place and are looked up by id when a feed page is built. Because this fan-out is also work that can follow after "posted", it runs in the background through a queue, and it is safe to retry because adding the same id twice is ignored. The cost is that a new post reaches feeds a little after the creator sees "Posted". That is the third clock from the introduction, and the requirements agreed that a short, measured delay is acceptable.
Decision 5: What about the creator with 50 million followers?
Decision 4 is very good for the average creator and very bad for the largest one. One post from an account with 50 million followers would mean 50 million mailbox writes. The capacity section showed that even at 100,000 writes a second this takes about 8 minutes of the whole system's capacity, and it would delay everyone else's posts while it ran. This breaks the requirement that creators of any size must be able to post.
Two other ideas come to mind. We could still write to every follower but do it slowly, which just means that followers see the post very late. Or we could drop fan-out for everyone and compute every feed on read, which brings back the problem from Decision 4 for the 99% of accounts that do not have this problem.
We choose a mix. Ordinary creators are fanned out on write. For accounts above a size threshold, the system skips the fan-out and instead keeps each such creator's recent posts in one short list under the creator's own id. When a follower opens the feed, the feed service reads that person's mailbox and also merges in the recent posts of the few very large accounts they follow, which is fan-out on read for just those accounts. The exact threshold matters less than saying that a policy exists and naming what it protects: the queue, the storage and the other users' posts. The cost is extra work on every feed read, so we limit how many large accounts we merge for one person, which Decision 6 will make a rule.
Decision 6: How is one feed page built, and where do the media bytes go?
With posts reaching mailboxes, the question becomes what happens when someone opens the app. The simplest idea is to return the posts as they are stored, with the video inside, so the phone gets everything in one answer.
That fails the speed requirement and the cost requirement together. A single feed page with 20 posts could be hundreds of megabytes if the videos came with it, so the page could not arrive in 300 milliseconds, and our feed servers would pay to send every byte. It also means every person's page is different, so nothing about it can be copied and reused.
We choose to keep the feed small and to let the phone fetch the media from somewhere else. To build a page, the feed service takes the first batch of post ids from the person's mailbox, merges in the large accounts' recent posts, and caps the total, for example at a few hundred candidates, because ordering cannot look at everything a person has ever followed. It then looks up the details of those posts and their authors in one batch, removes posts from blocked or hidden accounts, and attaches a link for each media item. Those links point at a content delivery network (CDN), a set of servers spread around the world that keep copies of popular files close to the people who watch them. The phone follows the links and downloads the picture or video from a nearby server. The page the feed service returns carries captions, author names, processing states and links, so it is small, and the heavy part of the cost moves to a system built for it.
Decision 7: How do we order the page without making the scroll slow?
The page needs an order. The simplest idea is newest first, which is cheap and always works. Most products want more: a ranking model that scores each candidate and puts the ones a person is most likely to care about at the top.
Ranking has a cost that is easy to overlook. A model is another service, with its own load, and when it is slow every feed page is slow. If it is down, the page may fail entirely, and that is far worse than a less interesting order. This breaks the availability requirement, which said a slow part must not take the feed down.
We choose to give ranking a strict time limit and a fallback. The model scores only the capped set of candidates, which is why Decision 6 limited their number. If the model answers within its share of the time, the page uses its order. If it does not, the page uses newest first, or the last good order that was saved for that person. The person sees a slightly less personal feed instead of a spinner or an empty screen. The page also returns an opaque cursor, a code the phone passes back to ask for the next page, because the order can change between scrolls, and numbering pages by position would show duplicates or skip posts.
Decision 8: How do we count likes on a viral post?
A like looks like the smallest feature, but one very popular post can receive thousands of likes a second. The simplest idea is one counter per post that every like increases by one. All those increases land on one row in one place, which becomes a bottleneck, and the slowness spreads to the feed, because feed pages need to read that count.
The requirement said that like totals may be briefly behind, so exactness is not what we are paying for. We choose to split each popular post's counter into several smaller counters. Each like increases one of them, picked at random, and the total is the sum, which is computed and cached for a short time. A cache means a recent copy is kept so the feed does not recompute it for every reader. The cost is a total that can be a few seconds behind, which the product accepts, and a watchful eye on the single most popular posts. Likes must never be allowed to slow down the feed.
Decision 9: How do Stories expire?
Stories look like posts, and they use the same follow list and often the same video conversion. The difference is a product rule, which says they vanish after about 24 hours. The simplest idea is to treat a story as a post with a flag and hide it from the phone after a day.
Hiding it on the phone alone is not enough. A modified app could still show it, and the media files would sit in storage and on the CDN forever. We choose to make the server the authority on expiry. Each story is stored with an expires_at time, usually in its own table so that cleanup jobs are simple. A background sweeper deletes expired ones, and any read checks the time as well, so a story that has expired but has not been swept yet is still hidden. The time-to-live on the CDN copies is aligned with the expiry so that the files stop being served at about the same moment. The cost is a small amount of cleanup work and some extra bookkeeping for who has seen which story, which can be sampled or sent in batches to avoid a flood of tiny writes.
Putting the decisions together
Taken together, the nine decisions are the design. When a creator posts, the phone uploads the file in chunks straight to object storage and then asks the Post API to save the post, which answers "posted" as soon as the file and the post record are safe. Background workers then convert the video into playable versions, and a fan-out worker adds the post id to the mailboxes of the creator's followers, unless the creator is so large that readers merge that creator's posts in at scroll time. When someone opens the app, the feed service reads their mailbox, merges in the large accounts' recent posts, caps the candidates, loads post details, attaches CDN links and the current processing state, orders the page under a time limit with a newest-first fallback, and returns a small page with a cursor. Likes are spread across several counters, and Stories carry a server-side expiry.
In the room (a fuller opening you can actually say): "I'd answer 'posted' as soon as the original file is stored and the post record is saved, and I'd mark the video as pending, because converting it into playable sizes can take much longer than the creator should wait. The phone uploads in chunks straight to object storage so a weak signal only costs one chunk. A queue and a fleet of workers make the thumbnail and poster first and then the video versions, so a phone can start on a small version. For follower feeds, I'd add the post id to each follower's mailbox in the background for ordinary creators, and for the very largest creators I'd skip that and merge their recent posts in when someone scrolls. A feed page is a capped list of candidates, one batch to load post details, CDN links for the media, and an ordering step with a time limit and a newest-first fallback, so a slow model never blanks the feed. Likes use several counters per popular post, and Stories have a server-side expiry. If video conversion or ordering runs late, the feed still returns posts and says so honestly."
The next section draws these decisions as one picture and shows who owns what.
High-level architecture
The decisions above were made one at a time. This section puts them on one page as a picture: which boxes exist, who owns what, and how a post and a scroll travel through them. The deeper mechanics come later, so keep this at the level of a map.
What breaks if you merge everything
It is tempting to put every job into one service: keep the full post and the video file inside every follower's list, wait until every playable size exists before saying "posted", let ranking run as long as it wants, and send the video bytes through the same servers that build the feed. That combined design fails the requirements we just chose. It chokes the day a very large creator posts, stalls the whole app when the ranking model slows down, and turns the cost of sending media into the bandwidth bill of the feed API.
What works: thin orchestration, heavy bytes elsewhere
From the phone's point of view, scrolling home means asking for the next batch of posts after where it stopped. The phone receives a small JSON answer with captions, author fields, and links to the thumbnails and the video, not large files inside the answer. The device downloads the media separately from CDN servers close to it.
Who owns what:
- API and edge. Checks who is calling, applies rate limits and time limits to the services behind it, and starts upload sessions.
- Feed service. Builds the page on the read path: candidates, follow and block checks, post details, CDN links, ordering and the cursor. It is the place to cap work.
- Mailbox (timeline) store. Holds an ordered list of post ids for each viewer, split across machines by
viewer_id. - Post service. The source of truth for captions, author, time, visibility, media keys and the
media_processingstate. - Media pipeline. The workers that build thumbnails, poster frames and the video ladder, started from a queue after the upload.
- Object storage and CDN. The files themselves, and the servers near the viewer that cache the popular ones.
- Graph service. Who follows whom and who blocks whom. It is cached on the feed path, and blocks are checked again at read time.
- Fan-out workers. Read a queue and add post ids to mailboxes where the policy says to; each write is safe to repeat for the same
(viewer_id, post_id). - Ranker. Scores a capped list of candidates within a hard time limit.
Largest creators on the whiteboard: For authors you do not fan out, the feed service merges their recent posts into the candidate list. Draw that edge, or you will have drawn only fan-out on write and invited the follow-up you deserve.
[ Mobile client ]
→ [ Edge / API ] → [ Feed svc ] → [ Candidate store: mailboxes + optional merge ]
│ │ │
│ │ └──→ [ Ranker ] (timeout + fallback)
│ │
│ ├──→ [ Graph svc ] (follows, blocks)
│ │
│ └──→ [ Post svc ] → metadata only
│ │
│ ├──→ [ Media jobs ] → transcode / thumbs / ABR
│ │
│ └──→ [ Object store ] → [ CDN ] → (video/image bytes)
│
└── upload: [ Upload API ] → object store → enqueue transcode → post row durable
fan-out: [ Queue ] → workers → viewer mailboxes (idempotent)
In the interview: Narrate the read path first, which means the time budget, the maximum number of candidates, the ranker time limit and the shape of a CDN link. Then tell one write, which means a durable post, then background conversion, then background fan-out. Storage brand names come after the story makes sense.
The background half (say it): Video conversion, fan-out, notifications and search indexing are too slow for the request that saves a post. Use queues or event streams (for example events named PostCreated, TranscodeComplete and FanOutRequested) with at-least-once delivery, which means a message may arrive twice and must be harmless when it does, and make every worker repeat-safe. Hand work to the queue reliably with a transactional outbox, which saves the event in the same database transaction as the post, or with change data capture, which reads the database's own log. Do not use "commit the post, then send the message and hope" without a plan for the lost message.
If you remember one thing: The hot path is IDs, then details, then rules, then CDN links. Pixels never stream through the feed tier.
Core design approaches
The high-level picture rests on a few choices where the options are close. This section lays the options side by side, with what each gives you and what each costs, so that the decisions above can be defended when the interviewer asks "why not the other one?". Most of the interview is not picking a brand of database. It is walking forks where each choice trades speed, cost, complexity and failure behavior.
Upload and media processing
From Decision 1 through Decision 3, the write side already has a shape: the phone sends the file in pieces straight to storage, the API saves a post record as soon as that file is safe, and conversion happens afterward. In practice that means the client uploads chunks to object storage, the API creates a durable post row marked media_processing: pending, and background workers build the thumbnail, the poster frame and the set of playable sizes (the ladder). The row moves to partial and then ready as each piece lands.
| Decision | If you optimize for… | You usually accept… |
|---|---|---|
| Resumable, chunked upload | Weak mobile networks and large videos | More moving parts (session ids, part completion, cleaning up abandoned uploads) |
| Answer "posted" when metadata and file are durable | A fast "posted" feeling | Processing states in the API; clients show pending or partial honestly |
| Wait until every rung exists before answering | A simpler idea of "ready" | Terrible tail latency and a fragile "posted" answer at scale |
| Many rungs and renditions | Smooth playback and quality | Storage, conversion CPU, and more URLs to purge from caches |
| Fan-out inside the upload request | Immediate visibility | Spiky load; most designs queue fan-out after the row is durable |
Interview line: Separate "can we show something?" (a poster frame or a small version) from "is the full-quality ladder finished?".
Feed assembly (push, pull, hybrid)
Decisions 4 and 5 chose how a new post reaches the people who follow the creator. There are a few common policies, and the table below is the comparison you can defend when the interviewer asks why you did not pick only one of them.
| Policy | When it fits | Cost you accept |
|---|---|---|
| Push to follower mailboxes | Most creators (modest follower counts) | Storage and fan-out work when posting |
| Merge or pull recent posts by author | Very large creators | Extra work on the home read path |
| Partial fan-out to active users | The middle tier or an "online now" optimization | Stale mailboxes for people who are not active |
Push for the many ordinary creators (the long tail of accounts). For very large accounts, do not write the post into every follower's list. The exact size threshold matters less than saying there is a policy and naming what drives its cost, such as queue depth, storage, or how many people one post can affect.
Stories
Stories share a lot with feed posts, including the follow list and often the same media pipeline, but they differ in product rules, most of all in their short lifetime.
| Topic | Typical choice | Tradeoff |
|---|---|---|
| Lifetime | Fixed time-to-live (for example 24 hours) | Sweeper jobs versus delete-on-read; the server decides expiry |
| Storage model | Separate story rows or the same table with type=story | A separate table keeps expiry jobs simpler |
| Seen and replay state | High write volume if every view is stored | Sample it, batch it, or sync it later |
Interview line: Stories are time-limited inventory with their own expiry rules, not "a feed with a flag".
Ranking
Decision 7 already said the page needs an order, and that a slow model must not blank the feed. Treat ranking as a simple contract: a short, capped list of candidate post ids goes in, an ordered list comes out, under a hard time limit and safety rules.
Structural tradeoff: Choosing which posts are candidates is much cheaper than scoring everything a person has ever followed. If you mix the two, every feed fetch runs the full ranking model and the slowest pages fall apart. Cap the candidates, then rank. Say what happens when the ranker's time runs out: use newest-first, or the last good order saved for that person.
If you remember one thing: Choosing between push and merge and converting video in the background are the Instagram-shaped answers. Pure push or converting while the user waits both fail.
Data model
The architecture names a lot of boxes that store things, so the next question is what exactly each one holds. At this scale no single database is best for every access pattern. For each arrow in the picture, say which store is the source of truth, which is a cache, and which is derived and could be rebuilt.
What lives where
| Kind of data | Typical home | Why |
|---|---|---|
| Post and user records | Relational database or document store | Reliable create and update; indexes on author_id, created_at |
| Per-viewer feed candidates | Wide-column, key-value or tiered mailbox store, split by viewer_id | Huge number of lists; append on fan-out; range scan for the next page |
| Social graph | Edges table plus a heavy cache | Follows drive fan-out; blocks must be correct, so check them at read time |
| Media files | Object storage plus CDN | Bytes do not belong in database rows |
| Hot read path | In-memory cache (such as Redis), CDN for links | Very fast repeated reads of metadata; no durability required |
| Background work | Queues or an event log such as Kafka | Conversion, fan-out and notifications need backpressure and replay |
Example schemas (illustrative)
Posts are the source of truth for metadata and pointers:
post_id(primary key),author_id,caption,visibility,created_atmedia_processing(pending,partial,readyorfailed)media_manifest: the original key, ladder entries per version, poster key and thumbnail key
Mailbox (timeline), per viewer. Store ids, not whole posts:
- Key:
viewer_idplus a shard; an ordered list ofpost_id, with an optional score orinserted_at - Repeats are ignored for
(viewer_id, post_id), so fan-out retries do not duplicate posts
Graph edges:
follower_id,followee_id,created_atblocker_id,blocked_id,created_at
Stories (often a separate table):
- Media pointers plus
expires_atandstory_kind; seen state is optional or batched
Like counters:
post_idplus a smallshard_no, with acountfor each shard; the total is the sum, cached for a short time
Object storage layout
- Prefix by
post_idorauthor_id/post_idso deleting a post's files is simple. - Keep originals and derived artifacts under separate keys so conversion can retry each artifact on its own.
- CDN links are signed or stable, and are purged when a version is bad or a post is taken down.
Redis and caches (trimmed)
Redis is fast memory with an expiry time. It is not durable post storage unless you decide on purpose how it syncs.
Strong fits: a cache in front of hot post metadata and profiles; rate limiting; small, bounded per-user lists of recent merged posts; keys that make fan-out repeat-safe.
Risky fits: the entire mailbox of every user in Redis only, because memory explodes and recovery after a failover is hard. Production systems often use a wide-column store for mailboxes with Redis as a cache layer on top.
Interview land: A relational database (or similar) holds the authoritative posts, a mailbox store holds ids at scale, object storage holds the media, and Redis caches hot reads and powers rate limits.
Detailed design
We now know what is stored and where, so we can put the pieces in motion. This section follows one post from the moment a creator taps Share until her friends can scroll it, then one home-feed page load, and then the API those two paths use. Media is what makes this different from a text-heavy social feed: the path that stores captions and pointers must stay fast, while video conversion and delivery move on their own clock. Read it once as a story. The exact failure cases and the questions interviewers ask come in the deep dive right after it.
Write path (post and media)
On a phone with a weak signal, uploading a long Reel as one unbroken request often fails partway. So the client usually asks for upload addresses (or opens a chunked upload session), pushes the original file into object storage, and only then asks the Post API to create the post. That API call records who posted, the caption, who may see it, the time and the file keys, plus a processing flag such as media_processing: pending.
Success on that call means "we safely stored what we need to remember this post". It does not mean "every quality level of the video exists". Answering only after the converter has built every version would make posting time follow the worst backlog in the building. Instead, workers build the thumbnail, the poster frame and the ladder in the background, and they update the media manifest as each piece lands. The phone can show a poster frame and start playback on a small version while larger ones are still being made.
When product rules say the post may appear in followers' timelines, fan-out workers add the post id to follower mailboxes, and a retry cannot duplicate it. For very large creators the workers skip fan-out and rely on merging at read time, which is the same hybrid idea as in the Facebook feed, with even more pressure here because each item also points at large media. Search indexing, notifications and Story-specific fan-out follow through an outbox or an event stream, so a slow notifier cannot block "posted".
- The phone uploads chunks directly to object storage.
- The phone calls the Post API with the file keys and a caption; the API saves the post with
media_processing: pending. - The API answers success with the
post_idand the processing state. - A queue starts conversion jobs; workers add the poster, then rungs, and move the state to
partialand thenready. - A queue starts fan-out; workers add the id to mailboxes for ordinary creators, or skip it for very large ones.
Read path (home feed)
When someone opens Home, the feed service first knows who is scrolling and which mode they are in (following, or "for you" if that is in scope). It loads a bounded set of candidate post ids from that person's mailbox, plus any merged posts from very large creators they follow. The bound matters, because ranking cannot score everything everyone they follow has ever posted on every swipe.
Next it loads post details and author cards in one batch. It then removes blocked or hidden posts at read time, so a blocked account cannot slip through from an old mailbox entry. For each remaining post it picks which media links to return (a thumbnail, a poster, or a streaming manifest) based on the phone's abilities and the current media_processing state. Ordering runs only on that capped list, within a hard time limit. If the model is slow, the feed falls back to newest-first or a saved order instead of spinning on an empty screen. The response stays a small JSON page of ids, captions and CDN pointers, and the client fetches video bytes from the CDN on its own. An opaque cursor lets the next swipe continue without the errors of position numbers when the order moves.
- Identify the viewer and load their block and mute lists.
- Read the head of the mailbox and merge very large creators' recent posts, then cap the total.
- Load posts and authors in one batch; drop deleted or blocked ones.
- Build CDN links for each version and include
media_processingin each item. - Call the ranker with a deadline; if it times out, use newest-first or the last known order.
- Return a page of a fixed size plus an opaque
next_cursor.
In the room (spoken): "For a post: upload to object storage, save a durable post with processing pending, answer before the full ladder exists, then convert and fan out in the background. For a scroll: cap candidates, load details in one batch, build CDN links, order under a time limit, return a cursor. I never put video bytes in the feed JSON."
API design: what the phone calls and what it gets back
The feed has a public API that phones call, and a few internal calls that the services make to each other. This section covers both, as well as the errors and a small admin surface.
The calls a phone makes. This is an illustrative REST surface. GraphQL is fine if you discuss batching and the extra calls it can cause, since feeds make a bad graph of calls expensive.
POST /v1/media/uploads # or /uploads:init + chunked parts
POST /v1/posts
GET /v1/feed
GET /v1/posts/{post_id}
GET /v1/stories/reel
POST /v1/users/{user_id}/follow
DELETE /v1/users/{user_id}/follow
POST /v1/posts/{post_id}/like
GET /v1/posts/{post_id}/comments
Starting an upload: POST /v1/media/uploads. The response is an upload session id plus part addresses or signed upload targets. A signed address is a short-lived link that lets the phone send one file straight to storage, so the API never carries the bytes.
Creating a post: POST /v1/posts. The phone sends the caption and the file keys. A header named Idempotency-Key carries a unique id for this tap, so that if the network drops after the server saved the post and the phone retries, the server recognises the repeat and does not create a second post.
Reading the feed: GET /v1/feed. The query parameters are:
| Query param | Role |
|---|---|
cursor | Opaque continuation code; may carry ranker state |
limit | Page size, capped on the server (for example 20–50) |
mode | For example following versus for_you, if the product has both |
session_id | Optional; used for experiments or a snapshot of the order |
The answer looks like { "items": [ Post ], "next_cursor": "...", "has_more": true }. Each Post carries its media with a status (ready, processing or partial), links or playback descriptors for each version, counts, and a summary of the author. It never carries the video bytes.
GET /v1/feed
→ Edge/API: authenticate → rate limit
→ Feed svc: mailbox ids + merge → cap → batch load posts and authors
→ filter blocks → build CDN links → rank (timeout) → page + cursor
← small JSON; the phone then fetches bytes from the CDN
Stories. Stories are a separate resource with expiry hints in the response. The server is the source of truth for order, privacy and expiry.
Status codes and errors. 401 means the caller is not logged in, and it comes first. 429 means the caller is being throttled, and it should come with a Retry-After header that says how long to wait. 5xx means a service failed. Avoid leaking whether a blocked account exists when the policy requires it. The post-create call returns 201 with the post_id and the processing state, because that is the honest answer at that moment.
Admin and internal calls. A small internal API lets operators and other services do what the phone cannot. It can change the size threshold above which a creator is treated as "very large", purge a bad version of a video from the CDN, or take a post down. Mobile clients are versioned, and new fields such as media_processing states are added in a backward-compatible way so old apps keep working.
In the interview: Spend one minute on the repeat-safe post create, the cursor, media_processing in responses, and why likes do not own the feed's 95th percentile.
Deep dive: the questions an interviewer asks next
You have drawn the design and walked a post and a scroll through it. This is the point where a good interviewer starts digging, and the questions usually come in a fairly predictable order, because each answer raises the next one. Read this section as that conversation. Each question is followed by an answer you can give, with a hint at where the interviewer is likely to go next. When you can see the follow-up coming, say that next piece before they ask.
“You said the app answers ‘posted’ before the video is ready. What exactly is saved, and what comes back?”
Start with what goes wrong without it. A creator on a slow connection posts a 60-second Reel, and the API waits for the converter to build every version before it answers.
Upload done ──► API waits for full ladder ──► timeout / retry storm
│
└── user sees spinner; fan-out never starts
Post time now follows the worst backlog in the building. Requests time out, the app retries, the same video is converted twice, and the creator thinks the app is broken even though the upload worked. The better design commits two things and returns: the original file in object storage, and a post row that points to it with media_processing: pending. The API answers 201 with the post_id and that state, and the app shows a poster frame or an optimistic card.

Figure: Success on post is not success on every bitrate. The API contract must expose processing state; the client and CDN handle progressive quality.
A rough timeline for one Reel, using illustrative numbers, shows the three clocks:
t = 0 s creator taps Share (file already uploaded in chunks)
t = 2 s post row saved, API answers 201 "pending" ← posted
t = 4 s thumbnail and poster frame ready ← something to show
t = 20 s smallest video version ready ← playable
t = 90 s all versions ready ← "ready"
t = 10 s+ followers' mailboxes receive the post id ← visible (varies)
Where it goes next: "So what does a friend see in the minutes before the video is ready?"
“What does a friend see while the video is still being prepared?”
The feed item for that post carries a media_processing state and the links for whatever exists so far. If only the poster frame exists, the card shows the poster and a small "processing" hint. Once the smallest version is ready, the player can start on it, and it switches to bigger versions as they land, because of the adaptive streaming described in Decision 3. The key rule is that the post is never hidden or empty just because the video is not finished. In the room, say that the feed returns the post with a state, and the phone decides how to draw it.
{
"post_id": "p_123",
"media": {
"status": "partial",
"poster": "https://cdn.example/p_123/poster.jpg",
"playback": "https://cdn.example/p_123/manifest.m3u8"
}
}
Where it goes next: "What if the conversion queue falls behind for hours?"
“What if the conversion queue backs up for hours?”
Conversion capacity is finite, and a spike of uploads or a slow release can leave jobs waiting. The post still succeeds and the feed still works, but Reels stay on the poster frame. Three things keep this honest. First, priority lanes: recent, user-facing posts go first, and old backfill work waits. Second, small versions first: building the smallest rung before the rest means something plays early. Third, shedding: during an incident, relax non-critical work, such as extra rungs, and keep the essentials flowing. The signal to watch is the age of the oldest job in the queue, not the number of successful post creates. Post creates stay green during this failure, which is exactly why a chart of them lies.
Where it goes next: "Now a creator with 50 million followers posts. Walk me through it."
“A creator with 50 million followers posts. What happens?”
Start with the bad idea, which is always pushing to every follower. The creator taps Post and the workers try to do 50 million mailbox writes.
Post 201 ──► enqueue fan-out ──► 50M mailbox writes
│
└── queue age ↑ while API success looks fine
At 100,000 writes a second that is about eight minutes of the whole system's attention, and everyone else's posts wait behind it. Friends' feeds look stale while create-post dashboards stay green. The better design classifies the author. For ordinary creators it pushes post ids to mailboxes. For very large ones it appends the post to an author-indexed recent list and lets each reader's feed request merge those recent posts into the candidate set, optionally pushing only to people who were recently active.
Ordinary author → push post_id to follower mailboxes
Very large author → append to author's recent list; feed read merges it into candidates
Inside the box, watch queue age, writes per shard and time to first visibility, not only create success. If workers die halfway through, repeat-safe retries finish the long tail, and the merge still lets active readers see the creator's content from the author's list.
Where it goes next: "How do you decide who counts as very large, and what about people who follow thousands of accounts?"
“Where is the threshold, and what if someone follows thousands of very large accounts?”
There is no single correct threshold, and it is better to say that than to invent one. It depends on how much write capacity and storage you can afford for one post. A common approach is to pick a follower count where one post's fan-out would start to cause visible delay, and to make it a setting that can be changed without a release. The other side of the same coin is read cost. Merging a very large creator's posts costs work on every feed read, and a person who follows hundreds of such creators would make that cost large. So cap the fan-in: merge only the most recent posts from a limited number of large accounts per request, and push to the middle tier only for active viewers.
Where it goes next: "Now walk me through one feed page, with real numbers."
“Walk me through one feed page with real numbers.”
Say the budget is about 300 milliseconds at the 95th percentile. A plausible split is: authenticate and load block lists, about 20 ms; read the mailbox and merge, about 30 ms; load posts and authors in one batch, about 40 ms; build CDN links, a few milliseconds; ranking, a hard limit of about 100 ms; the rest as headroom for the network. Those numbers are illustrative, and you would set them from real measurements. The point is that each step has a share and the one with the most variation, ranking, has a hard cut-off. Candidates are capped at a few hundred, post details are loaded with one batch call, not one call per post, and no video bytes are in the response.
Where it goes next: "What happens when the ranker blows its share?"
“What if the ranker is slow or down?”
The page uses a fallback instead of waiting. After the deadline, the feed service drops the model result and orders by newest-first, or by the last good order that was saved for that viewer. A circuit breaker stops calls to a ranker that keeps failing, so the feed does not spend its time waiting on it, and a feature flag lets operators turn off a heavy model quickly after a bad release. The person sees a less personal feed, not a blank one. Keep two separate promises in your head: "the feed loads" is one, and "the order is perfect" is another, and only the first is allowed to be absolute.
Where it goes next: "You mentioned a cursor. Why not just use page numbers?"
“Why an opaque cursor and not page numbers?”
Page numbers assume the list stays still. In a ranked feed new posts arrive and the order moves between swipes. With page numbers a post can appear twice, or be skipped. A cursor is a code that the server hands out and the phone hands back, which can carry the last post seen, the time of the page, and the state of the ranker. The phone treats it as a black box. The server can then continue sensibly even though the order has moved. Be honest that it is best effort, and that an occasional repeated or skipped post is the accepted price.
Where it goes next: "One Reel goes viral. What melts first?"
“One Reel goes viral. What melts first?”
Usually not the feed servers. Millions of people multi-get the same post_id and fetch the same CDN object. If cached copies of that metadata expire at the same moment, every request misses together and hits the post store, which is a cache stampede. At the CDN, a popular file that expires at the edge sends a wave of requests to the original storage, and the cost of sending bytes jumps. The standard answers are request coalescing (often called singleflight: when many requests ask for the same missing item, only one goes to the source and the rest wait for it), jitter (a small random change in expiry times so they do not all line up), an origin shield (a middle layer that sits between the edges and storage so only one copy of each file is fetched), and serving a slightly stale copy while a fresh one loads. Watch origin requests and sent bytes per object key, not only the cluster average, which hides a hot key.
Where it goes next: "And the likes on that Reel?"
“How do you count a million likes on one post?”
One counter per post means all the likes land on one row, which becomes the hot spot, and the slowness leaks into the feed because pages read that count. Split it into several counters per post. Each like picks one at random, so the writes spread out, and the total is the sum, cached for a short time. Because the product accepts a count that is a few seconds behind, the cache can be generous. Rate-limit writes that look like abuse, and watch the busiest keys. The rule to state is that likes must never own the feed's 95th percentile.
Where it goes next: "Last piece: how does a Story actually disappear?"
“How does a Story disappear at 24 hours?”
The server stores expires_at on each story and treats it as the truth. A sweeper removes expired rows and files in the background, and every read also checks the time, so a story that has expired but has not yet been swept is still hidden. Align the CDN copy's time-to-live with the expiry so the files stop being served at about the same moment, and say that hiding a story only on the phone is not enough, because a modified app could still show it. Seen-by state is a lot of tiny writes, so sample it or send it in batches.
Say it in the interview: "Posted means the file and the post row are safe, and the video is converted in the background. Ordinary creators are pushed to mailboxes, very large ones are merged in at read time. A page is capped candidates, one batch of details, CDN links and a time-limited ordering step. If conversion or ranking is late, the post still appears, with a processing state."
Hot keys and conversion backlogs are also covered in Key challenges, and the metrics are in Observability and Bottlenecks and tradeoffs.
If you remember one thing: The deep dive is a conversation. Posted, playable and visible are three different clocks, and each answer is something you could have said before they asked.
Key challenges
The deep dive showed that each part of this design is simple once the idea behind it is clear. What makes the real system hard is how these parts interact under load and under failure. Six hard parts come up again and again. Name them early in the interview, because each one is a place the interviewer is likely to push.
| Challenge | What users see if it goes wrong | What to say in the interview |
|---|---|---|
| Conversion lag | "Posted", but the Reel stays on processing for hours | Answer on metadata; media_processing states; priority lanes for conversion |
| Fan-out for very large creators | Friends' feeds stuck while posting still "works" | Hybrid policy; queue-age alerts; merge on read |
| CDN and sending-cost hot key | One viral Reel stutters everywhere | Versions per resolution; origin shield; request coalescing; watch bytes per key |
| Moving order | Duplicate posts or gaps while scrolling | Opaque cursors; admit best-effort duplicates and skips |
| Stories expiry | Stories that should be gone, or new ones missing | Server-decided expiry; sweeper metrics; CDN manifest lifetime |
| Like hot keys | The feed is fine, but like counts are wrong or slow | Several counters per post; cached reads; rate-limited writes |
If you remember one thing: Video and skew dominate cost. Fan-out, conversion and sending bytes are not afterthoughts.
Scaling the system
Those hard parts get worse as traffic grows, so the next question is what happens when the number of people, posts and views multiplies. You do not have to wait for the interviewer to ask. Right after you finish the design, say the scaling story yourself, then be ready for the follow-ups.
What you can say upfront: "Mailboxes scale by splitting them across many machines by viewer id, so each machine owns a slice of the people. Post details split by post id or by author and time. Bytes scale through the CDN, not through bigger API responses. Conversion scales by adding workers, and I'd watch the oldest job's age to know when to add them. For viral posts I'd use request coalescing and jittered expiry on cached metadata. Merging very large creators' posts has a cap on how many creators are merged per request. Across regions I'd accept a short delay in visibility instead of promising instant global consistency."
That one paragraph answers most of what follows. Here are the follow-ups, in the order they usually come.
Interviewer: "Traffic doubles next quarter. What do you change?"
You: "The feed servers first, because they hold no important state. The mailboxes, the post store and the media all live elsewhere, so I add more feed servers behind the load balancer and nothing else has to change. Then I check the stores: how full the shards are, how old the conversion queue is, and the busiest keys. If there is headroom, nothing changes there either. Bytes are a separate lever, so I'd check the CDN hit rate before anything else."
Interviewer: "How do you scale the mailbox store?"
You: "I split it by viewer id, so each machine owns a range of people and a feed read touches one machine. Each mailbox holds only ids, so a billion people fit in a few terabytes before copies. I keep each mailbox short, because most people never scroll past a few hundred posts, and older entries can be rebuilt from the post store if someone scrolls far. The cost is that a viewer's mailbox can be briefly out of date after a failure, which I cover by merging in recent posts at read time."
Interviewer: "How do you scale the post details?"
You: "By post id, or by author and time, depending on the access pattern. Hot posts are cached in front of the store, with jittered expiry and request coalescing so a viral post does not stampede the database. Reads of a batch of ids should hit a cache first."
Interviewer: "What about the bytes?"
You: "That is the CDN's job. The feed returns links, the phone downloads from a nearby server, and popular files stay cached at the edge. I keep a small number of versions per video, because each extra rung multiplies storage, conversion work and the number of objects the CDN has to cache. An origin shield keeps the storage from being asked for the same file by every edge."
Interviewer: "Someone follows thousands of accounts. What does that do to the read path?"
You: "Their mailbox is just as small as anyone else's, because it holds ids and the push already did the work. The cost shows up in the merge for very large creators, so I cap how many of them I merge per request and prefer the ones they interact with most. Pushing only to active viewers for the middle tier also keeps the cost bounded."
Interviewer: "What about more than one region?"
You: "Follows and media replicate between regions with some delay, so eventual visibility is more honest than promising instant consistency for every mailbox row. A post made in one region may reach a distant follower a little later, and I'd measure that delay as a product number. Blocks are the exception, which I check at read time so a stale copy never shows blocked content."
If you remember one thing: The CDN scales bytes, mailboxes scale reads, and the conversion fleet scales the encoding backlog.
Failure handling
Scaling answers "what if there is more traffic". This section answers "what if something breaks". Again, say it first. Failures here come from the ranker, the conversion queue, the CDN, the fan-out queue and the follow service, and what impresses an interviewer is that the answer was decided before the failure happened.
What you can say upfront: "Every failure has a decision made in advance, and the rule is that the feed never goes blank. If the ranker is slow I use newest-first. If conversion is behind I return the post with a processing state, a poster frame or a small version. If the fan-out queue is behind, reads merge recent posts so readers still see new content. If the CDN or its origin has trouble on one viral object, I use an origin shield, request coalescing and regional fallback. If the follow service is degraded I filter blocks at read time and fail closed where abuse is a risk. And I alert on the age of the oldest job, not only on the success of post creates."
The follow-ups are about the details of those decisions.
Interviewer: "The ranking model is slow or down. What does the user see?"
You: "A feed ordered newest-first, or by the last good order saved for them. The page waits for the model only until its deadline, then moves on. After repeated failures a circuit breaker stops calling it, like a fuse, so the feed does not spend its time waiting on a dead service. The user sees a less personal feed, which is a degraded product and not an outage. An outage would be a spinner or an empty home, and I avoid that above all."
Interviewer: "Video conversion is hours behind. What happens?"
You: "The post succeeded, so the feed still lists it, with a processing state. The phone shows the poster frame or a small version. Operators put recent user-facing posts first, shed non-critical work like extra rungs, and watch the age of the oldest job. The thing I would never do is block posting or hide the post, because the creator's trust in the app is worth more than a perfect first view."
Interviewer: "The CDN or its origin has trouble with one hot Reel."
You: "One object can melt the origin even when the overall hit rate looks fine. I use an origin shield so only one request per file reaches storage, request coalescing for misses, jittered expiry so copies do not all expire together, and a slightly stale copy while a fresh one loads. If a region is unhealthy, I fail over to another. I watch origin requests and bytes per object key."
Interviewer: "The fan-out queue is behind. Friends are not seeing new posts."
You: "Posting still works, and followers see a stale top of the feed until the queue drains. I alert on queue age, not only on depth, and I let the read path merge recent posts so people see new content from the people they follow even before the mailbox write lands. I prioritise recent posts over a backlog drain, so today's posts are not stuck behind yesterday's."
Interviewer: "The follow and block service is degraded. Can a blocked user appear?"
You: "That is the failure where I choose carefully. I check blocks at read time against a cached list, and for sensitive cases I fail closed, meaning I hide the post instead of risking showing it. For low-risk cases a slightly stale list is acceptable. I would say plainly that this is a safety choice and not only a performance one."
Interviewer: "A worker crashes in the middle of fan-out. Do followers get the post twice, or never?"
You: "The queue delivers at least once, so the job runs again. Each write is keyed by viewer id and post id, so adding the same post twice is ignored, and nobody sees it twice. The post is also written with an outbox, so the event that starts fan-out is not lost if the service crashes right after saving the post."
| Scenario | What the user sees | What to build |
|---|---|---|
| Ranker slow or down | Spinner or empty home | Hard time limit; newest-first fallback; circuit breaker; feature flag for heavy models |
| Conversion backlog | Post succeeded; Reel stays on processing | Poster or small version first; alert on oldest job age; priority lanes |
| CDN or origin hot spot | One viral Reel stutters; origin errors | Origin shield; request coalescing; regional failover; watch origin per key |
| Fan-out backlog | Post succeeded; friends see a stale home | Alert on queue age; merge on read; read from stale mailboxes plus merge |
| Follow service degraded | A blocked user appears briefly | Circuit break; filter blocks at read; fail closed where abuse risk is high |
If you remember one thing: Never return an empty feed when conversion lags. Return posts with processing media states.
Observability (what you measure)
Once the system is live you need a way to tell whether it is healthy, and that takes more than the number of successful posts. Green create rates alone will lie while timelines feel stale or Reels spin on processing.
| Signal | Why it matters |
|---|---|
| Post create success versus oldest conversion job age | Explains "posted but the Reel is still processing" |
| Post create versus fan-out queue age | Explains "posted but friends do not see it" |
| Time to first visibility (sampled) | The product's freshness number |
| Ranker 99th percentile, timeout and fallback rate | Separates ranking health from feed availability |
| Candidates scored per request | Catches an unbounded merge |
| CDN origin requests and bytes per hot object key | Viral Reel stampede and cost |
Share of media_processing: pending in feed responses | Shows honest degradation |
| Empty feed and 5xx rate | Outages users can see |
Alert ideas: oldest conversion job above an agreed age; fan-out queue age rising while post creates stay green; ranker fallback rate above normal; one object key sending far more than the others.
Security and abuse
A feed is also a place where people try to abuse the system, so this section covers how to keep it honest. Authenticate every feed and create call. Check who may see a post (public, followers only, blocked) on read, and not only when the post was fanned out. Rate-limit upload, post creation, follow and like to slow spam and bot farms. Short-lived signed upload addresses, with limits on file type and size, reduce arbitrary file abuse. Treat ranking and moderation logs with care, and do not dump private captions into broadly readable analytics. Reporting and integrity systems that catch fake engagement and coordinated amplification belong beside the feed, and should not be synchronous mailbox rewrites.
Cost awareness
Every choice so far also has a price, and interviewers like to hear that you noticed. Every pushed mailbox row costs storage and write capacity until it is trimmed, and pushing a post of the largest creator to everyone is a cloud bill incident. Conversion CPU and CDN transfer often dominate systems shaped like this one, because video bytes are not free like text metadata. Many ladder rungs improve playback but multiply storage, conversion cost and the number of objects to cache. Caching post metadata reduces load on the post store but needs a plan for stampedes on viral ids. Choose explicitly whether to spend money on storage for work done in advance, CPU at read time for merging, or conversion and transfer for quality.
Green Dashboard. Angry Users. The Production Mindset System Design Interviews Expect.
Everything so far describes how the feed should work on a good day. This section is about a bad day, told as short stories from the people who carry the pager, the engineers on call. Textbooks teach boxes and arrows. On-call teaches something else: post creation can look healthy while Reels spin on processing and feeds feel stuck in yesterday.
A flat error chart can mean "everything is fine" or "nothing is being measured". A healthy-looking post-create rate can hide a conversion queue that is hours behind or a fan-out queue that is stuck. Interviewers like this gap because it separates a diagram from someone who has run the system.
Four problems that look fine on a dashboard:
| What the dashboard shows | What is actually happening |
|---|---|
| Post creates are green | Conversion is hours behind and Reels stay on the poster frame |
| Post creates are green | Fan-out is behind and friends see yesterday's feed |
| Feed servers are healthy | A ranking release has no time limit and is filling the thread pool |
| Average CDN hit rate is high | One viral file keeps missing and is flooding the origin |
Scene 1: Transcode backlog while posts "succeed"
The moment: A creator taps Share on a Reel after a big event. The app says "posted". Hours later the Reel still plays only on a poster frame or in low quality, and creators have begun to complain.
The trap: The machines that turn uploads into playable sizes can only do so much work. Posting and copying post ids to followers kept working, but building those playable sizes lagged. A dashboard that charts only successful creates hides the thing that matters, which is the age of the oldest conversion job.
upload → post row saved (201) → queue: [job][job][job]...[job] ← oldest job: 3 hours
│
dashboards: create 201s = green users: poster frame only
What to build: Alert on the oldest conversion job age. Give user-facing posts priority lanes. Serve small versions first. Report an honest media_processing state in the API. Keep a feature flag that relaxes non-critical encodes during incidents.
Scene 2: Fan-out backlog while posts "succeed"
The moment: A creator posts during a live event. Posting works. Friends refresh and still see yesterday's top post.
The trap: Fan-out runs in the background, and workers write at a finite speed. The time until a post becomes visible is a different promise than the time until the app says posted, and nobody was measuring it.
What to build: Alert on queue age and on the backlog of each shard. Merge on read while the queue drains. Give recent posts a priority lane over backlog drain.
Scene 3: A ranking release hangs the feed
The moment: After a ranking release, home screens spin, and unrelated screens feel slow.
The trap: The ranker is on the hot path without isolation. A missing time limit means waiting requests pile up and fill the edge's threads.
What to build: A hard ranking time limit, a circuit breaker, a newest-first fallback, and a kill switch for heavy models. Keep two separate promises: the feed loads, and the order is perfect.
Scene 4: A CDN stampede on one viral Reel
The moment: One Reel goes viral. The feed list still loads, but the slowest viewers wait much longer and the original storage starts returning errors, while the average cache hit rate still looks fine.
The trap: Every scroll asks for the same post details and the same media file from nearby servers. When those cached copies expire at the same moment, a herd of misses hits the original store together, and the cost of sent bytes jumps.
What to build: Request coalescing per key, an origin shield, jittered expiry, serving a stale copy while a fresh one loads, and watching origin requests and bytes per key, not only the cluster average.
In the interview: Pick one scene. Say what users felt, which metric lied, and what you would ship next. You do not need all four.
Bottlenecks and tradeoffs
Those stories all trace back to a small number of choices where you cannot have both things you want. Interviewers listen for whether you can name the tension, say what breaks, and pick a side on purpose. Here are the three that matter most for a media feed.
Encoding cost vs playback quality
The tension — Building more playable sizes (more rungs on the quality ladder) and prefetching them feel great on Wi‑Fi, but each version costs storage, conversion CPU and CDN cache space.
What breaks — The conversion queue backs up, and users see processing for a long time during incidents.
What teams do — Priority lanes, small versions first, shedding non-critical encodes, and honest media_processing states in the API.
Say in the interview — Separate "can show something" from "every quality level is finished".
Push fan-out vs read merge
The tension — Push makes the scroll cheap, but the largest creators make writes impossible.
What breaks — Queue depth and storage grow from one post.
What teams do — A hybrid policy by follower count, merging the author's recent list on read, and capping candidates.
Say in the interview — Name who you fan out to, not "Kafka".
Metadata path vs bytes path
The tension — Putting the media inside the feed JSON feels simple, but it destroys speed and the economics of sending bytes.
What breaks — The API's bandwidth bill, the 95th percentile on large responses, and the CDN can never cache a personalised answer.
What teams do — The feed returns links and a processing state, the client fetches versions from the CDN, and adaptive streaming handles partly built ladders.
Say in the interview — Ids and links on the hot path, pixels on the CDN.
If you remember one thing: Instagram tradeoffs are about bytes and skew, not only the feed algorithm.
Interview tips
You now have a full design and the tradeoffs behind it, so the last thing to practice is defending it when the interviewer pushes back. These six are the pushes that come up most after you finish the design.
Waiting for the video before saying "posted"
In the room
You might say: "When the creator taps Share, we convert the video into every size first, and then we tell the app it worked."
Interview Push: "A creator on a slow connection posts a 60-second Reel. What happens to the time it takes to post?"
Land here: Return success when the post record and the uploaded file are safely stored, and expose
media_processing: pendingin the API. The phone shows a poster frame and can start on a smaller version while larger ones land in the background (adaptive streaming). Blocking the request on conversion is a scale mistake, because post time then follows the worst backlog in the building. Say what the feed returns while the video is processing: the post with a state, never an empty timeline.
Fanning out to everyone
In the room
You might say: "When a creator posts, we copy the post into every follower's feed right away."
Interview Push: "A creator has 50 million followers. How many writes is that for one post?"
Land here: That is about fifty million writes into follower lists for one tap, if you copy the post to everyone. Use a hybrid instead: push post ids for ordinary creators, and for the largest accounts either merge their recent posts when someone scrolls or keep a short recent list under the author's id, and optionally push only to people who were recently active. Name the queue depth and how many people one post can affect, not only "we use Kafka".
Treating the feed as one join
In the room
You might say: "We can build the feed with one query: join posts with follows and sort by time."
Interview Push: "Someone follows 5,000 accounts. What does each swipe cost?"
Land here: Take a short list of candidate ids from the viewer's mailbox, merge in any very large creators they follow, then load those posts in one batch. Do not run a giant join of follows and posts on every swipe. Cap the candidates before ordering. The feed JSON carries pointers and CDN links, not video bytes.
Saying "we use a CDN" and stopping
In the room
You might say: "The videos are served from a CDN, so delivery is handled."
Interview Push: "A Reel goes viral. Which object melts, and what do you purge?"
Land here: Keep several versions per resolution, hand the phone signed links that expire, and put an origin shield between the edge caches and storage so one viral file does not flood the original store. A hot object key—one popular file everyone fetches—is the failure to watch, so monitor sent bytes and origin load per key, not only the API's request rate. Purge or invalidate each version when an encode is bad or a post is taken down.
Running the ranking model on the critical path
In the room
You might say: "The home feed calls the full ranking model every time, and waits for it."
Interview Push: "The feature store is slow. Does the scroll stop?"
Land here: Cap how many candidates enter ranking, give the model a hard time limit, and fall back to newest-first when it is late. Keep choosing candidates separate from scoring them. A perfect order that empties the feed is a product failure.
Treating Stories as posts with a flag
In the room
You might say: "A Story is a post with a flag, and the app hides it after a day."
Interview Push: "What happens at 24 hours?"
Land here: Give each Story a time-to-live the server enforces, often in its own table or API, with sweeper jobs that delete expired rows and files. Do not rely on the phone alone to hide it after a day. Align the CDN copy's lifetime with the metadata's expiry so the files stop being served at about the same moment.
Red flags to avoid without correcting yourself: "Block the post on conversion", "fan out to everyone", "full video in the feed JSON", "rank with no time limit", "Stories are only a flag".
After each push, close with one real part of the design you would build: processing states, the hybrid threshold, a repeat-safe write keyed by viewer id and post id, a ranker time limit, or CDN links per version, not "we'll scale it later".
What should stick
After working through the requirements, the decisions and the depth sections, you should be able to explain:
- Three clocks on a post. The app can say "posted" while the video is still being converted, and friends' feeds catch up on their own schedule.
- Two lanes. Light information (who posted, the caption, the post id) travels separately from heavy bytes (video files on a CDN).
- Copy a pointer, not the video. Put a post id into followers' lists where that is cheap, and for the largest creators merge on scroll instead of writing tens of millions of copies.
- Home stays bounded. Cap how many candidates enter ordering, so one slow ranker does not blank the feed.
- Degrade honestly. Processing states and newest-first beat empty cards when conversion or ranking lags.
Tell it in the room: "The upload lands the file and a post row first, and the answer does not wait for every video quality. Fan-out copies post ids for ordinary creators, and the largest creators are merged in on read. A scroll loads capped ids, fetches details, maps them to CDN links and orders them under a time limit. When processing lags, we show a processing state, not a blank card."
Quick check before a mock: (1) How many writes does one post from a creator with 50 million followers cause if you push it? (2) What does the API return before conversion finishes? (3) What does the feed do when the ranker is slow? → (1) about 50 million (2) 201 with media_processing: pending (3) falls back to newest-first or the last good order.
Practice next: Open Design Instagram Feed on Practice System Design and run a timed attempt using the clarifying questions and one post story, without peeking until you have a draft on the board.
Key Takeaways
- "Posted", "playable" and "visible in friends' feeds" are three separate promises, and the app should answer "posted" as soon as the file and post row are safe.
- Upload in chunks straight to object storage, convert video into playable versions in the background, and show honest processing states until it is done.
- Push post ids into followers' mailboxes for ordinary creators, and merge the largest creators' recent posts when someone scrolls (50 million followers would be 50 million writes).
- Build a feed page from capped candidates, one batch of post details and CDN links, with the media bytes never inside the feed response.
- Order the page under a hard time limit and fall back to newest-first, so a slow ranker never produces an empty feed.
- Split a viral post's like counter across several counters and cache the total, and let the server decide when Stories expire.
- Watch the age of the oldest conversion job, fan-out queue age, ranker fallback rate and bytes per hot object key, not only post-create success.
Related Topics
- Facebook Feed System Design — Text-heavy feed contrast: same hybrid fan-out and ranking bones without the media pipeline depth
- WhatsApp System Design — Messaging contrast: per-thread order vs feed fan-out and CDN-backed media pointers
- Distributed Cache System Design — Hot post metadata, stampede, and TTL jitter on viral IDs
- CDN Design — Edge caching, origin shield, and egress when every Reel references CDN URLs
- Rate Limiter System Design — Protecting upload, create, and follow from abuse
Quick revision notes
The problem in your own words. A photo and video feed has to let a creator post quickly and truthfully, and let followers scroll a fast, small list of posts. The hard parts are that video is large and slow to convert, that reads far outnumber writes, and that a few creators are huge.
The design in one breath. The phone uploads in chunks straight to object storage, and the Post API saves a post row with a pending processing state and answers right away. Background workers convert the video into playable versions, and fan-out workers add the post id to follower mailboxes, except for the largest creators, whose posts are merged in at read time. A feed page is a capped list of candidates, one batch of details, CDN links and an ordering step with a time limit and a newest-first fallback.
The choices you must be able to defend. Answer "posted" when the file and the post row are safe, not when every version exists. Push for the many, merge for the few. Keep media bytes out of the feed response. Give ranking a deadline and a fallback. Spread likes across several counters, and let the server decide when Stories expire.
The numbers worth remembering. One post from a creator with 50 million followers is 50 million writes if pushed. A feed page is about 20 KB, while the media behind it is roughly 250 times larger. Reads outnumber uploads by about 100 to 1. The feed has about 300 milliseconds at the 95th percentile. These are estimates and you would confirm them with real traffic.
The mistakes that cost points. Waiting for the whole ladder before answering, pushing to every follower, putting video in the feed JSON, ranking without a time limit, treating Stories as a flag, and only watching post-create success while conversion and fan-out queues grow.
Frequently asked follow-ups
- How does photo or Reel upload work end to end?
- How do following feed and Explore differ in this design?
- How do you handle a creator with tens of millions of followers?
- Where do Stories live and how do they expire?
- How do likes scale on a viral post?
Deep-dive questions and strong answer outlines
Walk through posting one photo or Reel.
The phone uploads the file in chunks straight to object storage using short-lived upload addresses or an upload session. The Post API then creates a durable post record with the media keys and marks it media_processing: pending. Return success when that record and the file are safely stored—not when every playable video size exists. Start conversion and thumbnail jobs in the background. When product rules allow visibility, workers add the post id to follower lists, ignoring a repeat of the same viewer and post. For very large creators, skip copying to every follower and merge their posts when someone scrolls. Search and notifications follow afterward, off the critical path.
Walk through reading one page of the home feed.
Load a capped set of candidate post ids from the viewer's list, plus any merge of very large creators they follow. Fetch those posts and authors in one batch. Drop blocked or hidden posts. Attach CDN links for each media version the phone can use (thumbnail, poster, or streaming playlist). Order under a hard time limit and fall back to newest-first if ranking is late. Return the page plus an opaque next_cursor. The feed JSON carries pointers and links—not multi-megabyte video inside the response.
How is Explore different from the following feed?
Following feed is driven by the social graph and hybrid fan-out or merge. Explore is a retrieval and rerank problem over a much larger candidate pool—often offline-generated candidates plus online rerank—not the same mailbox fan-out path. Unless the interviewer expands scope, treat Explore as out of scope or a separate recommendation surface.
How do Stories work at scale?
Short TTL (for example 24 hours), often separate storage or table from main feed posts. Fan-out to followers only; server-authoritative expiry with sweepers; CDN manifest TTL aligned with metadata TTL. Seen state may be sampled or batched to avoid write storms.
What happens when a Reel gets millions of likes?
Shard counters per post_id; rate-limit write amplification; cache read counts with eventual consistency. Hot keys on one post_id need coalescing and monitoring—likes must not own feed p95.
AI feedback on your design
After a practice session, InterviewCrafted summarizes strengths, gaps, and interviewer-style expectations—similar to a written debrief. See a static example report, then practice this problem to get feedback on your own answer.
FAQs
Q: Do I need to design GPU filters in the interview?
A: Usually no. Filters are client-side or async offline jobs—off the post ack critical path. Mention them in one sentence if asked, then return to upload durability, transcode queues, and feed read budgets.
Q: Are direct messages in scope?
A: DMs are a separate real-time messaging stack (closer to chat than feed). Unless the interviewer widens scope, park DMs and focus on home feed, upload, and optional Stories.
Q: How do Reels differ from photos on the delivery path?
A: Reels need several playable sizes so the phone can switch quality while watching (adaptive bitrate, or ABR), plus a small playlist of those segments, and they cost more to send from nearby servers. The feed still returns links and a processing state—the phone fetches the bytes from the CDN. Blocking "posted" until every quality level exists is a scale mistake.
Q: How is Instagram feed different from Facebook feed?
A: Both share hybrid fan-out, mailboxes of IDs, and ranking timeouts. Instagram adds a media-heavy layer: resumable upload, async transcode, variant URLs, and egress as a first-class cost. A Facebook-style answer that only discusses text posts and fan-out misses half the interview.
Q: Is Explore required in every Instagram interview?
A: No unless you agree scope in clarifying questions. Home and Stories are the common core. Explore is a separate candidate-generation and rerank problem—name it as out of scope unless they push.
Q: What should I alert on in production?
A: Transcode oldest job age, fan-out queue depth, time from post create to first mailbox visibility, ranker p99 and timeout rate, CDN origin QPS per hot object key, and feed empty-error rate—not only post create 201s.
Practice interactively
Open the practice session to use the canvas and stages, then review AI feedback.