System Design ⚡ Recently updatedUpdated on Jun 30, 2026 — this content may still be evolving.
System Design: Mock Interview (45 Minutes)
Use this script with a friend. One person is interviewer, one is candidate. Switch roles after.
Setup: Whiteboard, paper, or Excalidraw. Candidate must draw and talk simultaneously.
Rules:
- Candidate asks clarifying questions before designing
- Interviewer pushes on tradeoffs (“what if 10x users?”)
- No reading from notes during design sections
Section 1: Warm-up (5 min)
- “What does scalability mean to you?”
- Follow-up: “Vertical vs horizontal — when would you pick each?”
- “Explain caching in a web app. Where would you put cache layers?”
- Follow-up: “What happens when cached data is stale?”
- “What’s the CAP theorem? Give a real example.”
Interviewer: Candidate should use concrete examples, not textbook definitions only.
Section 2: API & Backend Fundamentals (8 min)
- “Design a REST API for a blog — posts and comments. What endpoints would you create?”
- Follow-up: “How do you paginate a list of 100,000 posts?”
- “Walk me through what happens when a user logs in.”
- Follow-up: “Session cookie vs JWT — which would you use and why?”
- “When would you choose SQL vs NoSQL?”
Section 3: Main Design Challenge — URL Shortener (20 min)
Interviewer reads:
“Design a URL shortener like bit.ly. Users submit a long URL and get a short link. Visiting the short link redirects to the original. Assume 10 million stored URLs and 100 million redirects per month.”
Candidate should:
- Ask 2–3 clarifying questions (custom aliases? analytics? auth?)
- Give rough estimates (RPS, storage)
- Draw architecture diagram
- Explain short code generation
- Walk through the redirect path (emphasize caching)
- Mention security (open redirect, rate limiting)
Interviewer follow-ups (pick 2–3):
- “How do you generate unique short codes?”
- “301 vs 302 redirect — which and why?”
- “How do you track click analytics without slowing redirects?”
- “What if one short link gets 1 million clicks in an hour?”
- “How would you prevent someone from creating links to malicious sites?”
Evaluation criteria:
- Asked clarifying questions before designing
- Drew a clear diagram with data flow
- Identified read-heavy pattern and cached appropriately
- Mentioned tradeoffs without being asked
- Gave realistic student-scale answer (not over-engineered)
Section 4: Frontend or Real-Time (7 min)
Pick ONE based on role:
Option A: Frontend (for frontend-focused candidates)
“Design the frontend for an infinite-scroll social feed. 20 posts per page, images, like button.”
Follow-ups:
- “How do you manage state?”
- “How do you handle a user liking a post — optimistic UI?”
- “What if the list has 10,000 posts?”
Option B: Real-Time (for fullstack candidates)
“How would you add real-time chat to this social app?”
Follow-ups:
- “WebSocket vs polling?”
- “How do messages reach users on different servers?”
- “What happens when a user reconnects after disconnect?”
Section 5: Scale & Tradeoffs (5 min)
- “Your URL shortener is successful — 100x more traffic. What breaks first?”
- “How would you monitor this system in production?”
- “What’s one thing you’d do differently if you rebuilt from scratch?”
Evaluation Rubric
| Area | 1 (Weak) | 3 (Good) | 5 (Strong) |
|---|---|---|---|
| Requirements | Jumps to solution | Asks some questions | Structured clarifying questions |
| Architecture | Vague boxes | Clear diagram | Data flows labeled, justified choices |
| Depth | Surface buzzwords | Explains key components | Tradeoffs, scale path, security |
| Communication | Silent drawing | Talks through design | Engaging, checks in with interviewer |
| Realism | Designs for Google scale | Student-appropriate | ”Start simple, scale when needed” |
Debrief (5 min)
Candidate asks:
- Which parts of the design were weak?
- Did I ask enough clarifying questions?
- Was my diagram clear?
- Did I mention caching and security?
Interviewer gives:
- One thing done well
- One thing to improve
- Suggested file to study:
design-a-url-shortener.mdor whichever design was weakest
Bonus Round (If Time Permits)
Interviewer: “Design Instagram’s home feed in 10 minutes.”
Candidate covers: pull vs fan-out, caching, image CDN, cursor pagination.
See design-a-social-media-app.md for reference answer.
Self-Practice (No Partner)
- Set a 25-minute timer
- Open Excalidraw
- Design URL shortener from memory
- Record yourself on phone
- Watch back — did you ask questions first? Did you mention cache?