Free lesson · Mobile System Design Interviews
Social Feed App - Problem & Discovery
Think Before You Speak: 30 Seconds Inside an Engineer's Brain
Imagine an interviewer says: "Design the mobile client for a social media feed, like Instagram's home feed."
Here's what's racing through an experienced engineer's mind in the first 30 seconds:
- What am I actually building? A screen where users scroll through posts, not the entire backend system.
- What's hard about this? Loading a million posts smoothly without crashing the app. Managing images. Working offline. Handling when you like a post really fast.
- What questions should I ask? The interviewer is testing whether I think before I code.
- What does success look like? A smooth, responsive feed that users can scroll through for hours without frustration.
The key insight: Don't assume you understand the problem. Ask questions first.
What Is a Social Feed App?
Let's start with the basics. A social feed is the scrolling list of posts you see when you open Instagram, Twitter, or Facebook. Each post might have:
- An author's name and profile picture
- Post text content
- Images or videos
- A timestamp ("2 hours ago")
- Interaction buttons: like, comment, share
- Maybe the comment count, like count, and a snippet of recent comments
The feed keeps going: When you scroll down, new posts load automatically. It's like an endless list (developers call this "infinite scroll"). Users should never hit a "dead end" where there's nothing left to scroll to—or at least not until they've seen hundreds of posts.
The mobile context: We're building this for phones (iOS and Android), not a web app. This means we care about battery, data usage, memory, and smooth animations on devices with varying processing power.
The Problem Statement
Your task: Design the mobile client architecture for a social media feed application. Users should be able to:
- See a chronological (or ranked) feed of posts
- Scroll infinitely through posts
- Like, comment, and share posts
- See post details
- Create new posts with text and images
- Access the app even when offline
- Have a smooth, snappy experience
The scope: We're focusing on the mobile client (the app itself), not the backend server or the algorithm that decides which posts appear first. We'll talk to the backend through APIs, but we're not designing that system.
Step 1 in Action: Mock Interview
Let's watch a candidate think through this problem with an interviewer. Notice how the candidate asks clarifying questions—this is the most important skill in system design interviews.
Candidate: "Thanks for the problem. Before I dive in, I want to make sure I understand what we're building. Let me ask a few clarifying questions."
Interviewer: "Great, go ahead."
Candidate: "First, what types of content can users post? Just text and images, or video too?"
Interviewer: "Good question. Start with text and images for simplicity. Videos are a variation we can discuss later if you want."
Candidate: "Perfect. Next—what interactions do users expect? Can they like, comment, and share posts?"
Interviewer: "Yes, all three. In fact, likes and comments are the most important—users see like counts and comment counts prominently."
Candidate: "Got it. Now, about the feed itself: should it be chronological—newest posts first—or do we rank posts algorithmically, like showing posts with more engagement higher?"
Interviewer: "Excellent question. Let's keep it chronological to start. Ranking is a complexity we can add later."
Candidate: "Understood. One more important question: does the app need to work when there's no internet? Offline support?"
Interviewer: "Yes, the user should be able to see previously loaded posts even without internet. They can't fetch new posts, but they can read what's already loaded."
Candidate: "Smart. So the app should cache posts locally. Last few questions: what's the scale? Are we talking thousands of users, millions, or billions?"
Interviewer: "Let's assume the app has 100 million monthly active users, but focus on what a single user experiences, not the server-side scale."
Candidate: "And we're building for both iOS and Android?"
Interviewer: "Yes, the architecture should work for both platforms."
Candidate: "Great! One final thing: are we handling creating posts in this case study, or just viewing?"
Interviewer: "Viewing is the priority. Mention creating posts in your architecture, but we'll focus more on the feed viewing experience."
Functional Requirements
Based on the conversation above, here's what our app must do:
- View Feed: Display a chronological feed of posts, newest first
- Infinite Scroll: Automatically load more posts as the user scrolls down
- See Post Details: Tap a post to see full content, all comments, and more metadata
- Like Posts: Tap a heart icon to like/unlike a post; see updated like count immediately
- Comment on Posts: Write and submit comments; see new comments appear in the feed
- Create Posts: Write text, add images, and publish to the feed
- Offline Support: View previously loaded posts without internet
- Handle Images: Load and display images in posts efficiently without slowing the app
- Pull-to-Refresh: Swipe down to get the latest posts
Non-Functional Requirements
These are the invisible requirements—they're about how well the app works, not what it does:
- Performance: Feed scrolling should feel smooth (60 frames per second on most devices). Opening a post should be instant or nearly instant.
- Memory Efficiency: The app shouldn't crash or slow down even if the user scrolls for 30 minutes straight.
- Battery Efficiency: Fetching data and displaying images shouldn't drain the battery noticeably in a 1-hour session.
- Network Efficiency: The app should use caching intelligently to avoid re-downloading the same posts and images.
- Offline Capability: Users can read cached posts without internet, but can't fetch new ones.
- Scalability (Client-Side): The app should handle feeds with thousands or millions of posts gracefully.
- Responsiveness: UI should feel snappy; taps should register immediately, and loading spinners should appear quickly.
Out of Scope
What we're not designing in this case study:
- The backend server, databases, or APIs (we'll use hypothetical APIs)
- User authentication (we assume users are already logged in)
- The recommendation/ranking algorithm
- Content moderation or safety features
- Push notifications
- Real-time updates (like live like counts changing as others like a post)
- Analytics and tracking (though it's important in real apps)
- Direct messaging or notifications system
- User profiles and follow functionality (though we'll see user info in posts)
🔗 Building on Previous: Remember the 5-step framework from Module 2? We're starting at Step 1 (Problem & Discovery). You should write down the functional and non-functional requirements, then move to Step 2 (API Design). The toolbox from Module 3 will help us decide which caching strategies to use—we'll revisit that later.
UI Sketch Description
Here's what the key screens look like (imagine taking a screenshot of these):
Feed Screen:
- Top: username, profile picture, time stamp ("2h ago")
- Middle: post content (text + image)
- Bottom: buttons for like (heart icon), comment (speech bubble), share (arrow), and options menu
- Below the buttons: "1.2K likes", "342 comments" text
- The whole thing scrolls infinitely
Post Detail Screen:
- Larger version of the post
- All comments visible in a scrollable list below
- A text input at the bottom to add a new comment
Create Post Screen:
- Large text input: "What's on your mind?"
- Button to add images from the camera or camera roll
- "Post" button at the top-right
- Shows a preview of the text and images
What's Next?
You've discovered the problem. Next, we'll design the API that the mobile app will call to fetch posts and submit interactions. This is Step 2 of the framework: API Design.