High-Level Design
Drawing the architecture-the most visual part of your interview.
1The Blueprint Analogy
High-level design (HLD) is the system architecture showing major components, their interactions, and data flow. It's the 30,000-foot view before diving into details.
2Core Components
Every system needs some combination of these building blocks:
Client
Web app, mobile app, API consumer
Load Balancer
Distributes traffic across servers
Web/App Servers
Handle business logic
Database
Persistent storage (SQL/NoSQL)
Cache
Fast data access (Redis/Memcached)
Message Queue
Async processing (Kafka/SQS)
CDN
Static content delivery
Blob Storage
Images, videos, files (S3)
3Drawing the Diagram
Tip: Talk while you draw. "The request hits the load balancer, which routes to one of our app servers..."
4Example: URL Shortener HLD
Architecture Components
┌─────────────────────────────────────────────────────────────┐
│ │
│ ┌──────┐ ┌────────────┐ ┌──────────────────┐ │
│ │Client│────▶│ CDN │────▶│ Static Assets │ │
│ └──────┘ └────────────┘ └──────────────────┘ │
│ │ │
│ ▼ │
│ ┌────────────┐ │
│ │Load Balancer│ │
│ └────────────┘ │
│ │ │
│ ▼ │
│ ┌──────────────────────────────────────┐ │
│ │ App Servers (x3) │ │
│ │ • Create short URL │ │
│ │ • Redirect to long URL │ │
│ └──────────────────────────────────────┘ │
│ │ │ │
│ ▼ ▼ │
│ ┌────────┐ ┌──────────────┐ │
│ │ Cache │◀───────▶│ Database │ │
│ │(Redis) │ │(URL mappings)│ │
│ └────────┘ └──────────────┘ │
│ │
└─────────────────────────────────────────────────────────────┘5Common Patterns
Read-Heavy System
LB → Servers → Cache → Read Replicas → Primary DB
Twitter feed, news sites, product catalog
Write-Heavy System
LB → Servers → Queue → Workers → DB
Logging, analytics, IoT data ingestion
Real-Time System
WebSocket Server ↔ Pub/Sub ↔ Subscribers
Chat, live scores, notifications
Media-Heavy System
Upload → Queue → Processor → CDN + Blob Storage
Instagram, YouTube, image sharing
6Mistakes to Avoid
Too Much Detail
Don't show every microservice. Start high-level, add detail when asked.
No Labels
Label your components and data flows. 'This box' is not helpful.
Missing Data Flow
Show how data moves. Arrows matter. Request path vs response path.
Forgetting Scale
If you said 10K QPS, show multiple servers. Single boxes don't scale.
Kitchen Sink
Adding every component you know. Start simple, add as needed.
7Key Takeaways
?Quiz
1. You're designing a read-heavy system. First component after load balancer?
2. Your diagram has 5 boxes but no arrows. Problem?