How to create effective architecture diagrams and design scalable systems in interviews.
Finished this lesson?
Sign in to save your progress across devices.
Tip: use ← and → to move between lessons.
Was this lesson helpful?
Rehearse this with a Staff+ engineer
45-minute mock with a Staff+ engineer who interviews at your target company. Premium members save $20.
The high-level design is the heart of your system design interview. This is where you translate requirements, entities, and APIs into a visual architecture that interviewers can evaluate. Done well, it demonstrates your ability to think at scale and make sound technical decisions.
Your high-level design should answer: "How do the major components work together to satisfy the requirements?"
You're not writing code. You're creating a blueprint that:
The high-level design typically takes 15-20 minutes of a 45-minute interview. It's where most candidates are evaluated, so invest time in getting it right.
Most system designs use a combination of these components:
| Common Architecture Components | |
|---|---|
| Name | Description |
| Clients | Web, mobile, or API consumers that initiate requests |
| Load Balancer | Distributes traffic across servers, handles SSL termination |
| API Gateway | Authentication, rate limiting, routing, request transformation |
| Application Servers | Stateless services that process business logic |
| Cache | In-memory storage for frequently accessed data (Redis, Memcached) |
Follow this framework to build your high-level design:
Draw how data moves through your system for the core use case:
Client → Load Balancer → API Server → Database
↘ Cache
Many systems have different read and write patterns:
Write Path (Create Tweet):
Client → LB → API Server → Database
→ Message Queue → Async Workers (notifications, timeline fanout)
Read Path (View Timeline):
Client → LB → API Server → Cache (hit?) → Return
(miss?) → Database → Update Cache → Return
Based on your scale requirements, add appropriate scaling:
Show you've thought about reliability:
What you should emphasize varies by your target level:
| High-Level Design Expectations by Level | |
|---|---|
| Name | Description |
| Mid-Level (L4) | Draw a clear, complete diagram with all major components. Explain data flow for core use cases. Show basic scaling (LB, replicas). |
| Senior (L5) | Separate read/write paths. Discuss caching strategies. Introduce async processing. Explain database choice and sharding approach. |
| Staff+ (L6+) | Consider multi-region architecture, consistency guarantees, failure modes, and operational concerns. Discuss evolution and tech debt. |
| Engineering Manager | Focus on team boundaries aligned with architecture, deployment strategies, monitoring, and how the design enables team autonomy. |
Let's walk through a complete example:
┌─────────────┐
│ Clients │ (Web, iOS, Android)
└──────┬──────┘
│
▼
┌─────────────┐
│ CDN │ (Static assets, profile images)
└──────┬──────┘
│
▼
┌─────────────┐
│Load Balancer│
└──────┬──────┘
│
▼
┌─────────────┐
│ API Gateway │ (Auth, rate limiting)
└──────┬──────┘
│
▼
┌─────────────────────────────────────┐
│ Application Services │
│ ┌─────────┐ ┌─────────┐ ┌────────┐ │
│ │ Tweet │ │ User │ │Timeline│ │
│ │ Service │ │ Service │ │Service │ │
│ └────┬────┘ └────┬────┘ └────┬───┘ │
└───────┼───────────┼───────────┼─────┘
│ │ │
▼ ▼ ▼
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│Tweet Cache │ │ User Cache │ │Timeline │
│ (Redis) │ │ (Redis) │ │Cache(Redis) │
└──────┬──────┘ └──────┬──────┘ └──────┬──────┘
│ │ │
▼ ▼ ▼
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Tweet DB │ │ User DB │ │ Graph DB │
│ (Sharded) │ │ (Sharded) │ │ (Follows) │
└─────────────┘ └─────────────┘ └─────────────┘
Tweet Service → Kafka → Timeline Fanout Workers → Timeline Cache Updates
→ Notification Workers → Push to devices
→ Search Indexer → Elasticsearch
Know these patterns and when to use them:
| Timeline Generation Strategies | |
|---|---|
| Name | Description |
| Fan-out on Write | Pre-compute timelines when a tweet is posted. Fast reads, slower writes. Good for users with few followers. |
| Fan-out on Read | Compute timeline when requested. Slower reads, faster writes. Good for celebrities with millions of followers. |
| Hybrid | Fan-out on write for regular users, fan-out on read for celebrities. Twitter's actual approach. |
Separate read and write models when their patterns differ significantly:
Decouple services with events:
Order Service → "OrderPlaced" event → Message Queue
↓
Payment Service ← consumes event
Inventory Service ← consumes event
Notification Service ← consumes event
Architecture Decision Practice
You're designing a notification system that needs to send 100 million notifications per day. How would you architect this?
Consider: What happens if sending fails? How do you handle different channels (push, email, SMS)?
Key Architecture Decisions:
Message Queue as the backbone: Use Kafka for durability and high throughput
Channel-specific workers:
Retry and dead-letter queues:
Choose the right database for each use case:
| Database Selection | |
|---|---|
| Name | Description |
| PostgreSQL/MySQL | Structured data with relationships, ACID transactions. Users, orders, payments. |
| MongoDB | Flexible schemas, document storage. Product catalogs, content management. |
| Redis | Caching, sessions, rate limiting, leaderboards. Sub-millisecond access. |
| Cassandra | High write throughput, time-series data, wide-column. IoT, logging, metrics. |
| Elasticsearch | Full-text search, log analysis, analytics dashboards. |
Every critical component should have redundancy:
# Bad - single database
API Servers → Database
# Good - replicated database
API Servers → Primary DB ← replicates → Replica DB
↘ Replica DB
Popular content creates hot spots. Solutions:
Start simple, add complexity only when justified:
"I'll start with a straightforward design and then discuss optimizations for scale..."
Don't just draw boxes. Explain why:
"I'm using Kafka here instead of SQS because we need exactly-once semantics and the ability to replay events..."
If you can't explain why a component is there, remove it. Interviewers notice when candidates add components they don't understand.
Structure your walkthrough:
Draw as you talk. A silent candidate drawing is awkward. Narrate your thought process continuously.
Your high-level design gives the blueprint. Now it's time for deep dives, where you'll be asked to zoom into specific components and solve detailed problems.
| Database |
| Persistent storage - SQL for relationships, NoSQL for flexibility |
| Message Queue | Async processing, decoupling services (Kafka, RabbitMQ, SQS) |
| CDN | Edge caching for static content and reducing latency globally |
| Object Storage | Blob storage for images, videos, files (S3, GCS) |
| Search Index | Full-text search capabilities (Elasticsearch, Algolia) |
Rate limiting per user:
Template service:
Diagram:
Services → Kafka → Router → Push Queue → Push Workers → APNs/FCM
→ Email Queue → Email Workers → SendGrid
→ SMS Queue → SMS Workers → Twilio
↓ (failures)
Retry Queue → Back to channel queues
↓ (max retries)
Dead Letter Queue → Alerting
| Neo4j |
| Graph relationships. Social networks, recommendation engines, fraud detection. |