Design a Social Feed
"Design a news feed" is the social-graph prompt Google asks most. It shows up under a dozen names: Twitter's timeline, an Instagram feed, a Facebook News Feed, a generic activity stream. They are all the same shape underneath. A user follows other accounts, and those accounts post. When our user opens the app, we have to assemble the posts from everyone they follow into one ranked list, fast. The interviewer usually lets you pick the product, then pushes on how you build that one screen.
Anchor on the asymmetry first, because the design turns on it. People read their feed far more than they post to it. A typical user posts maybe half a time a day and refreshes the app dozens of times, so reads outnumber writes by something like a hundred to one. That gap is the single most important fact in the room. It pushes you to spend real work when a post is created so that reading a feed is cheap. The three architectures below are just three different answers to where that work should happen.
- 2 diagrams
- 5 sections
- about 40 min
Premium lessonGoogle interview guide
These took digging.
What candidates walked out with, from 20,000+ reports, forum threads behind logins and write-ups in Chinese. Then solved step by step.
100 companies. Checked every month.
Unlock all 100 companies$49 a year · less than $1 a week · Cancel anytime
Google interview guideKnow what Google asks before you walk in.
34 coding · 7 system design · 47 behavioral questions
Get their questions first.
InterviewLegend is independent and not affiliated with or endorsed by any company it covers.