Day 30 Exercises
Full System Design Practice
Practice end-to-end system design with the same format as real interview rounds.
Requirements Clarification Practice
An interviewer says "Design Instagram." You have 5 minutes to ask clarifying questions. The goal is to understand the requirements well enough to make justified architecture decisions.
Tasks
- List 6-8 clarifying questions you would ask (with the reason why each matters).
- Given answers: 100M DAU, 50M photos/day, 500M reads/day, photos never deleted — calculate storage requirements for 5 years.
- What consistency model is appropriate for the photo feed? Why?
- Identify the 3 hardest sub-problems in Instagram's design based on these requirements.
Back-of-Envelope Estimation
Design a URL shortener (like bit.ly). Before drawing any architecture, estimate the scale requirements.
Tasks
- Estimate daily short URL creations (reads are 100:1 to writes).
- Calculate storage required for 10 years (URL record schema + sizes).
- Calculate peak QPS for reads (assume 10:1 peak:average ratio).
- Based on your estimates, justify whether you need: caching, database sharding, CDN, multiple regions.
Trade-off Analysis
You're designing a notification system for a mobile app. The team debates two approaches: (A) push notifications via APNs/FCM, (B) long polling from mobile clients every 10 seconds.
Tasks
- Compare the two approaches on: battery impact, server load, latency, reliability.
- Design a hybrid approach that combines the best of both.
- How does the design change if 80% of users have the app in background (not foreground)?
- What failure mode does each approach handle better?
Full Design: Uber-Scale Ride Matching
Design the core matching system for a ride-sharing app: 5M rides/day in 50 cities, driver-to-rider matching in under 15 seconds, drivers send GPS location every 4 seconds.
Tasks
- Calculate driver location update QPS (assume 500K active drivers at peak).
- Design the geospatial index for finding nearby drivers (what data structure? what store?)
- Design the matching algorithm: how do you match a rider to the best driver?
- How do you handle a city where all drivers are busy during a surge?