MongoDB

System Design Interview Framework

A battle-tested framework for approaching any system design interview — from requirements gathering to deep-dive on bottlenecks and tradeoffs.

S

srikanthtelkalapally888@gmail.com

System Design Interview Framework

A structured approach to system design interviews helps you deliver comprehensive, impressive answers in 45-60 minutes.

Step 1: Clarify Requirements (5 min)

Always ask before designing!

Functional requirements:

  • What are the core features?
  • What is out of scope?

Non-functional requirements:

  • Scale: How many users? Requests per second?
  • Latency: What's acceptable p99?
  • Availability: 99.9% or 99.99%?
  • Consistency: Strong or eventual?

Step 2: Capacity Estimation (5 min)

DAU: 10M users
Requests: 100 req/user/day → 10M × 100 / 86400 ≈ 12K req/sec
Peak: 3x average → 36K req/sec

Storage: 1KB per record × 10M records/day × 365 = 3.6 TB/year
Bandwidth: 12K req/sec × 1KB = 12 MB/sec

Step 3: High-Level Design (10 min)

Draw the basic architecture:

Clients → CDN → Load Balancer → API Servers
                                    ↓
                              Cache (Redis)
                                    ↓
                              Database

Step 4: API Design (5 min)

Define key API endpoints:

POST /posts         Create post
GET  /feed          Get user feed
PUT  /posts/:id     Update post
DEL  /posts/:id     Delete post

Step 5: Data Model (5 min)

Key tables/collections:

users(id, name, email, created_at)
posts(id, user_id, content, media_url, created_at)
follows(follower_id, followee_id)

Step 6: Deep Dive (20 min)

Pick 2-3 most interesting/challenging components:

  • How does feed generation work at scale?
  • How do we handle hot spots in the database?
  • What's the caching strategy?
  • How do we handle failures?

Common Bottlenecks and Solutions

DB overloaded      → Add read replicas + caching
Single server      → Horizontal scaling + load balancer
Slow writes        → Message queue + async processing
Hot keys in cache  → Local cache + randomized TTL
Cross-region lag   → Multi-region deployment + CDN

Design Principles Checklist

  • Single points of failure eliminated?
  • Can each component scale independently?
  • How does the system behave under partial failure?
  • What data is cached and for how long?
  • How are consistency trade-offs handled?
  • What's the monitoring strategy?

Common Mistakes

  • Starting to code immediately
  • Designing everything perfectly on first pass
  • Not considering failure scenarios
  • Ignoring non-functional requirements
  • Over-engineering from the start

Conclusion

Great system design interviews demonstrate clear thinking, structured approach, and awareness of trade-offs. Practice the framework on 20+ problems to build intuition.

Share this article