Script Valley
System Design: APIs, Caching & Scalability
System Design End-to-EndLesson 6.1

How to approach a system design interview question

requirements gathering, capacity estimation, API design first, component selection, trade-off articulation, back-of-envelope calculation, iterative design

How to approach a system design interview question

System design interview framework

The Framework

System design interviews evaluate structured thinking and trade-off awareness. They have no single correct answer. Follow a consistent framework every time.

Step 1: Clarify Requirements (5 min)

Never start designing immediately. Ask: who are the users? What are the core features (functional requirements)? What scale: requests per second and data volume? What are the non-functional requirements: latency SLA, availability target, consistency needs? Write them down visibly before drawing anything.

Step 2: Capacity Estimation (5 min)

# Example: URL shortener
# 100M URLs created/day = ~1,200 writes/second
# 10:1 read/write ratio = 12,000 reads/second
# 500 bytes/URL x 100M = 50GB/day storage
# Conclusion: DB hit 12,000/sec without caching — need Redis

Step 3: API Design, Components, Trade-offs

Design the API contract first — it forces clarity on what the system does. Then select components: which database, do you need a cache, a queue, a CDN? Articulate every trade-off explicitly such as choosing SQL for consistency at the cost of horizontal write scale. Interviewers reward explicit trade-off reasoning above all else.

Up next

Designing a URL shortener system end-to-end

Sign in to track progress