How System Design Interviews Work
What interviewers really evaluate
Core technical concepts
The 4-step framework
Communication tips
Ticketmaster: Concert booking/Flight booking system
| They Evaluate | They Look For |
|---|---|
| Problem-Solving | Structured thinking, clarifying questions |
| Technical Depth | Trade-offs, not just buzzwords |
| Communication | Clear explanations, diagrams |
| Trade-off Analysis | Pros and cons of decisions |
It's Not About the "Perfect" Solution
POST /bookings → Create
GET /bookings/:id → Read
PUT /bookings/:id → Update
DELETE /bookings/:id → Delete
Status Codes:
Why Cache?
Where?
┌─────────────┐
│Load Balancer│
└──────┬──────┘
┌─────────┼─────────┐
▼ ▼ ▼
┌───────┐ ┌───────┐ ┌───────┐
│Server1│ │Server2│ │Server3│
└───────┘ └───────┘ └───────┘
Strategies:
In distributed systems, choose two of three: Consistency, Availability, Partition Tolerance.
Interview Quote: "For payments, I choose CP (PostgreSQL) - better an error than a duplicate charge. For the activity feed, AP (Cassandra) is fine - users tolerate stale data."
| Choice | Prioritizes | Best For | Examples |
|---|---|---|---|
| CP | Consistency | Payments, bookings | PostgreSQL, MongoDB |
| AP | Availability | Feeds, caching | Cassandra, DynamoDB |
Since network partitions are unavoidable, the real choice is:
| Technique | Use When | Example |
|---|---|---|
| Idempotency Keys | Retries possible | Payments |
| Optimistic Locking | Low contention | Seat booking |
| Pessimistic Locking | High contention | Inventory |
Code Example:
UPDATE seats SET status = 'booked', version = version + 1
WHERE seat_id = 123 AND version = 5;
Trade-off: "Sharding adds complexity but unlocks write scalability beyond replicas."
Trade-off: "Sharding adds complexity but unlocks write scalability beyond replicas."
| Partitioning | Sharding |
|---|---|
| Same database | Different databases |
| Simpler queries | Complex cross-shard queries |
| Limited scale | Massive scale |
┌─────────────┐ ┌─────────────────┐
│ WRITES │────▶│ Write Database │
│ (Commands) │ │ (PostgreSQL) │
└─────────────┘ └────────┬────────┘
│ Sync
┌─────────────┐ ┌────────▼────────┐
│ READS │◀────│ Read Database │
│ (Queries) │ │ (Elasticsearch)│
└─────────────┘ └─────────────────┘
Use When: Read patterns differ significantly from write patterns.
Store events, not state:
Event 1: SeatReserved { seat_id: 123, user_id: 456 }
Event 2: PaymentProcessed { booking_id: 789 }
Event 3: BookingConfirmed { booking_id: 789 }
Interview Tip: "For audit requirements, I would use event sourcing."
Infrastructure layer for microservices:
| Feature | Benefit |
|---|---|
| mTLS | Secure service-to-service communication |
| Retries/Timeouts | Automatic resilience |
| Observability | Distributed tracing, metrics |
| Traffic control | Canary deployments, A/B testing |
Interview Tip: "For microservices communication, a service mesh handles cross-cutting concerns."
Circuit Breaker:
Dead Letter Queue:
1. Requirements 2. High-Level 3. Deep Dive 4. Scale
(5 min) (10 min) (15-20 min) (10 min)
│ │ │ │
▼ ▼ ▼ ▼
Clarify Big Picture Database Bottlenecks
Constraints Diagram API 1M+ users
Functional: What should it do?
Non-Functional: How well?
Content:
User → Load Balancer → API Gateway → Services → Database
│
Cache
Include:
Database Design
API Design
Critical Path
Identify Bottlenecks:
Strategies:
✅ Do:
❌ Don't: