Episode 9 — System Design / 9.7 — System Design Foundations

9.7 — Exercise Questions: System Design Foundations (HLD)

Practice questions for all five subtopics in Section 9.7. Mix of short-answer, estimation, diagrams, and trade-off analysis. Try each without looking back at the lesson files first.

How to use this material (instructions)

  1. Read lessons in orderREADME.md, then 9.7.a through 9.7.e.
  2. Answer closed-book first — only reopen a lesson after you have written something.
  3. Show your math — for estimation questions, write out every step (order of magnitude counts).
  4. Draw diagrams — for architecture questions, use paper or a whiteboard tool (Excalidraw, Miro).
  5. Redo misses — retry wrong items the next day (spaced repetition).
  6. Interview prep — pair with 9.7-Interview-Questions.md for polished wording.

9.7.a — What Is HLD? (Q1–Q8)

Q1. In your own words, define High-Level Design in two sentences. What question does HLD answer?

Q2. List six building blocks of HLD and give a one-line explanation for each.

Q3. What is the difference between HLD and LLD? Fill in this table:

DimensionHLDLLD
Scope
Key decisions
Diagram type
Interview trigger

Q4. Explain the difference between a monolithic and a microservices architecture. Give one advantage and one disadvantage of each.

Q5. What is an API Gateway and what are its four main responsibilities?

Q6. Name three caching strategies and explain when each is appropriate.

Q7. What is the difference between synchronous and asynchronous communication between services? Give a real-world example of each.

Q8. Draw a simple architecture diagram for a blogging platform (like Medium) with at least: clients, load balancer, 2 services, a database, and a cache. Label every arrow.


9.7.b — Requirements Analysis (Q9–Q16)

Q9. What is the difference between functional and non-functional requirements? Give two examples of each for a ride-sharing app (Uber).

Q10. Why should you always start a system design interview by clarifying requirements? What can go wrong if you skip this step?

Q11. Explain the CAP theorem in plain language. Why is "CA" (consistent + available without partition tolerance) not practical in distributed systems?

Q12. What is the difference between strong consistency and eventual consistency? Give one use case where each is appropriate.

Q13. Fill in the availability table:

AvailabilityDowntime per Year
99%
99.9%
99.99%
99.999%

Q14. What is the difference between SLI, SLO, and SLA? Give an example of each for an e-commerce website.

Q15. For a photo-sharing app (Instagram), classify these as P0 (must have), P1 (nice to have), or out of scope for a 45-minute interview:

  • Upload photos
  • View feed
  • Like and comment
  • Direct messages
  • Stories
  • Reels
  • Ad targeting
  • Search users

Q16. You are designing a chat application. List five questions you would ask the interviewer before starting your design.


9.7.c — Breaking Into Components (Q17–Q24)

Q17. Name five heuristics for deciding where to draw service boundaries.

Q18. What is a shared database anti-pattern? Why is it problematic, and what is the alternative?

Q19. Compare synchronous (REST/gRPC) and asynchronous (queue/event) communication. Fill in:

AspectSynchronousAsynchronous
Latency for caller
Coupling
Failure handling
Use case example

Q20. What is a distributed monolith? How is it different from a real monolith, and why is it worse?

Q21. What is the Backend for Frontend (BFF) pattern? When would you use it?

Q22. What is the Strangler Fig pattern? Describe the migration process in 3-4 phases.

Q23. Draw a component diagram for an e-commerce system with at least these services: Product, Order, Payment, Inventory, and Notification. Show the data stores and how they communicate (sync vs async).

Q24. What is a dependency map and why should you create one during system design? What are you looking for when you review it?


9.7.d — Capacity Estimation (Q25–Q34)

Q25. A social media app has 50M MAU with 30% daily active. Each user views their feed 8 times/day and posts 1 update/day. Calculate:

  • DAU
  • Read QPS
  • Write QPS
  • Peak QPS (3x multiplier)

Q26. An image hosting service receives 10M photo uploads/day. Each photo is 3 MB. Calculate:

  • Write QPS
  • Daily storage
  • Monthly storage
  • Yearly storage
  • Yearly storage with 3x replication

Q27. A messaging app has 200M DAU. Each user sends 30 messages/day (average 200 bytes per message). Calculate:

  • Total messages per day
  • Write QPS
  • Daily storage
  • Yearly storage
  • Cache needed for hottest 20% of daily messages

Q28. Fill in the powers of 2 table:

PowerApproximate ValueName
2^10
2^20
2^30
2^40

Q29. A URL shortener uses base62 encoding ([a-z, A-Z, 0-9]). How many unique URLs can be generated with:

  • 6-character codes?
  • 7-character codes?
  • 8-character codes? If the system generates 100M URLs/month, how long until a 7-character code space is exhausted?

Q30. A video streaming platform has 500M DAU. Each user watches 3 videos/day (average 10 minutes at 5 Mbps bitrate). Calculate:

  • Total video views per day
  • Peak concurrent viewers (assume 10% of DAU are watching simultaneously)
  • Peak bandwidth needed

Q31. What is the 80-20 rule (Pareto principle) and how does it apply to cache sizing? Give a numerical example.

Q32. What are the latency numbers every engineer should know? List at least 5 operations with their approximate latencies (e.g., RAM access, SSD read, network round trip).

Q33. Explain why media (images/videos) dominates storage and bandwidth in most consumer applications. Give a comparison between text-only and media-rich storage for a social app.

Q34. A ride-sharing app has 10M DAU. Each ride involves: 1 request (500 bytes), 100 location updates (200 bytes each), 1 trip record (2 KB). Calculate daily storage and QPS for location updates at peak hour (assume 5% of DAU are active simultaneously).


9.7.e — Interview Approach (Q35–Q42)

Q35. List the 5 phases of a system design interview with their time allocations. What is the purpose of each phase?

Q36. You are asked: "Design WhatsApp." Write out your requirements phase — list the functional requirements (P0 and P1), non-functional requirements, and out-of-scope items.

Q37. List 5 common mistakes candidates make in system design interviews. For each, explain why it is a problem and how to avoid it.

Q38. How should you respond when an interviewer asks "What about X?" (e.g., "What about security?" or "What if the DB goes down?"). Describe the 4-step response framework.

Q39. What does it mean to "narrate as you draw" during a system design interview? Why is this important? Write a sample narration for drawing a chat service architecture.

Q40. You are designing a system and you realize mid-interview that your initial approach has a major flaw. What should you do?

Q41. Compare push model (fan-out on write) vs pull model (fan-out on read) for a social media timeline. When would you use each? What is the hybrid approach?

Q42. You have completed your high-level design. The interviewer asks you to "wrap up." What four things should you cover in your wrap-up?


Answer Hints (short)

QHint
Q1HLD answers "How is the system organized?" — services, databases, communication, scaling
Q5Routing, authentication, rate limiting, protocol translation
Q11Network partitions WILL happen; real choice is CP vs AP
Q17Single responsibility, data ownership, rate of change, scaling needs, DDD bounded contexts
Q20Split into services but coupled: must deploy together, shared DB, synchronous chains
Q25DAU=15M; Read QPS = 15M*8/86400 ≈ 1,389; Write QPS ≈ 174
Q2962^7 = 3.5T; at 100M/month ≈ 2,917 years
Q31Cache 20% of data to serve 80% of requests
Q35Requirements (5m) → Estimation (5m) → HLD (15m) → Deep Dive (15m) → Wrap Up (5m)
Q38Acknowledge → State Impact → Propose Fix → Trade-off

← Back to 9.7 — System Design Foundations (README)