Skip to content
advancedPhase 53 · Amazon System Design Interview

How to Draw Architecture

Create clear, labeled architecture diagrams during interviews.

30m
0 problems
Topic Progress0%

Diagram Components & Symbols

Standard Symbols Every Interviewer Expects

In a system design interview, your diagram is your primary communication tool. Amazon interviewers expect clean, consistent symbols. Here is the universal vocabulary:

Symbol Represents Example
Rectangle Service / Microservice User Service, Order Service, Payment Service
Cylinder Database (persistent storage) PostgreSQL, MySQL, DynamoDB
Diamond Load Balancer / Decision Point ALB, NLB, API Gateway
Rounded Rectangle Cache Redis, ElastiCache, Memcached
Parallelogram External System / Third-party Stripe API, SendGrid, S3
Cloud External Service / Internet AWS, CDN (CloudFront)
Arrow (solid) Synchronous data flow (HTTP, gRPC) REST API call, request/response
Arrow (dashed) Asynchronous data flow (queues, events) SQS message, Kafka event
Double-headed arrow Bidirectional communication WebSocket connection
Dotted line Polling / Periodic check Health check, cron job

Service Symbols in Detail

Rectangles (Services):

  • Use a single rectangle per service
  • Keep consistent sizing — all services should be roughly the same width
  • If a service has sub-components, use a larger rectangle containing smaller ones (nested rectangles)
  • Example: ┌─────────────────┐
    │ Order Service │
    └─────────────────┘

Cylinders (Databases):

  • The cylinder is universally recognized for databases
  • Always specify the type inside or below: PostgreSQL, DynamoDB, MongoDB
  • Use separate cylinders for separate databases — do NOT put multiple DB types in one cylinder
  • For replicated databases, draw one cylinder and add x3 or replicas label

Diamonds (Load Balancers):

  • Diamonds represent routing decisions and load balancers
  • Label with the type: L7 LB (Application Load Balancer) or L4 LB (Network Load Balancer)
  • Place between clients and services, or between services and databases for read distribution

Rounded Rectangles (Caches):

  • Caches sit between the application layer and the database
  • Label with technology: Redis, Memcached
  • Note eviction policy if relevant: LRU, TTL=5min

Drawing ASCII Symbols on Whiteboard

On a physical whiteboard or digital tool, use these ASCII patterns:

Service:    ┌──────────────┐
            │  API Gateway  │
            └──────────────┘

Database:   ╭──────────────╮
            │   DynamoDB    │
            ╰──────────────╯

Cache:      (──────────────)
            (   Redis       )
            (──────────────)

Load Bal:   ◇◇◇◇◇◇◇◇◇◇◇◇◇◇
            ◇   ALB        ◇
            ◇◇◇◇◇◇◇◇◇◇◇◇◇◇

Arrow:      ──────────────►
            (sync call)

Dashed:     - - - - - - - -►
            (async/queue)

Component Groups

Organize your diagram into logical layers. Amazon interviewers love this structure:

  1. Client Layer (top or left): Mobile app, Web browser, IoT device
  2. Edge/CDN Layer: CloudFront, Route 53, WAF
  3. API Layer: API Gateway, Load Balancer, Rate Limiter
  4. Service Layer: Business logic microservices
  5. Data Layer: Databases, caches, object storage
  6. Messaging Layer: SQS, SNS, Kafka (between services)

Draw horizontal lines or use spacing to visually separate these layers.

Common Symbols Mistake: Inconsistency

The biggest mistake candidates make is using different symbols for the same concept. Pick ONE symbol for databases and use it everywhere. Amazon interviewers will notice inconsistency and it signals lack of attention to detail.

Layout Best Practices

Left-to-Right vs Top-to-Bottom

There are two dominant layout patterns. Choose ONE and stick with it:

Left-to-Right (Horizontal Flow):

Client → LB → Services → Database
  • Best for: Simple request-response flows
  • Advantage: Mirrors how users think about requests (client sends, server receives)
  • Use when: You have 3-4 layers and want to show data flowing through the system

Top-to-Bottom (Vertical Flow):

Client
  ↓
Load Balancer
  ↓
Services
  ↓
Database
  • Best for: Complex systems with many services at each layer
  • Advantage: More horizontal space for multiple services side by side
  • Use when: You have many services in the service layer

Amazon's Preference: Most Amazon interviewers prefer top-to-bottom because it gives you room to show multiple services in parallel at each layer.

The 5-Layer Layout Template

Always start with this skeleton before filling in details:

┌─────────────────────────────────────────────────────────┐
│                     CLIENT LAYER                        │
│   ┌──────────┐   ┌──────────┐   ┌──────────┐          │
│   │  Mobile  │   │   Web    │   │   CLI    │          │
│   └────┬─────┘   └────┬─────┘   └────┬─────┘          │
└────────┼──────────────┼──────────────┼─────────────────┘
         │              │              │
┌────────▼──────────────▼──────────────▼─────────────────┐
│                     EDGE LAYER                          │
│   ┌──────────────┐   ┌──────────────┐                  │
│   │   Route 53   │   │ CloudFront   │                  │
│   └──────┬───────┘   └──────┬───────┘                  │
└──────────┼──────────────────┼──────────────────────────┘
           │                  │
┌──────────▼──────────────────▼──────────────────────────┐
│                      API LAYER                          │
│   ┌──────────────┐   ┌──────────────┐                  │
│   │  API Gateway │   │     ALB      │                  │
│   └──────┬───────┘   └──────┬───────┘                  │
└──────────┼──────────────────┼──────────────────────────┘
           │                  │
┌──────────▼──────────────────▼──────────────────────────┐
│                    SERVICE LAYER                        │
│   ┌──────────┐  ┌──────────┐  ┌──────────┐            │
│   │  User    │  │  Order   │  │ Payment  │            │
│   │ Service  │  │ Service  │  │ Service  │            │
│   └────┬─────┘  └────┬─────┘  └────┬─────┘            │
└────────┼──────────────┼──────────────┼─────────────────┘
         │              │              │
┌────────▼──────────────▼──────────────▼─────────────────┐
│                     DATA LAYER                          │
│   ╭──────╮   ╭──────╮   ╭──────╮   (──────)          │
│   │ User │   │Order │   │Payment│   Redis  │          │
│   │  DB  │   │  DB  │   │  DB  │   Cache  │          │
│   ╰──────╯   ╰──────╯   ╰──────╯   (──────)          │
└─────────────────────────────────────────────────────────┘

Spacing and Alignment Rules

  • Equal spacing between components at the same layer
  • Align services horizontally at the same layer
  • Group related components close together
  • Leave gaps between layers to show boundaries clearly
  • Center your diagram on the whiteboard — don't start at the top-left corner

Handling Multiple Services

When you have many services, use this approach:

  1. Draw the main flow first (client → API → primary service → database)
  2. Add secondary services on the sides
  3. Use arrows to connect them to the main flow
  4. Show communication patterns (sync vs async)
         ┌──────────┐
         │ Notif.   │
         │ Service  │
         └────┬─────┘
              │ (async via SQS)
┌──────┐  ┌──▼───┐  ┌──────┐  ╭──────╮
│Client├─►│ API  ├─►│Order ├─►│ Order│
└──────┘  │ GW   │  │ Svc  │  │  DB  │
          └──────┘  └──┬───╯  ╰──────╯
                       │
                  ┌────▼────╮
                  │ Payment │
                  │ Service │
                  ╰────┬────╯
                       │
                  ╭────▼────╮
                  │ Payment │
                  │   DB    │
                  ╰─────────╯

Whiteboard Real Estate

On a physical whiteboard:

  • Use the top 1/3 for client/edge layers
  • Use the middle 1/3 for API and service layers
  • Use the bottom 1/3 for data layer
  • Reserve the right side for annotations and scaling notes
  • Start with pencil for the structure, then trace over with marker for final

Common Layout Mistakes

  1. Cramming everything in one corner — Use the entire whiteboard
  2. Overlapping components — If it looks messy, redraw it
  3. Curved arrows — Use straight lines; curved lines look unprofessional
  4. Missing directional arrows — Every connection needs an arrow showing data flow direction

Labeling & Annotation

Essential Labels for Every Component

Every component in your diagram MUST have:

  1. Service/Component Name — What it is (e.g., Order Service)
  2. Technology — What you use (e.g., PostgreSQL, Redis)
  3. Protocol — How components communicate (e.g., HTTP/REST, gRPC)
  4. Data Flow Direction — Which way data moves

Example of properly labeled component:

┌────────────────────┐
│   Order Service    │
│   (Java, Spring)   │
└─────────┬──────────┘
          │ gRPC
          ▼
╭────────────────────╮
│   Order Database   │
│   (DynamoDB)       │
╰────────────────────╯

Label Placement Rules

  • Service name: Inside the rectangle, centered
  • Technology: Inside or directly below the component
  • Protocol: On the arrow between components
  • Data type: On the arrow or next to it (e.g., JSON, Protobuf)
  • Port numbers: Only if relevant to the discussion (e.g., :443)

Protocol Labels

Always label your arrows with the communication protocol:

Protocol When to Use Label
HTTP/REST Standard API calls HTTP REST
gRPC Internal service-to-service gRPC
WebSocket Real-time bidirectional WS
AMQP Message queues (SQS) AMQP
MQTT IoT messaging MQTT
SQL Database queries SQL

Data Store Labels

Always specify the data store type AND its purpose:

╭──────────────────╮
│   User DB        │
│   (PostgreSQL)   │  ← Primary user data
│   Primary + 2    │
│   Read Replicas  │
╰──────────────────╯

╭──────────────────╮
│   Session Cache  │
│   (Redis)        │  ← Active sessions, TTL=30min
│   Cluster Mode   │
╰──────────────────╯

╭──────────────────╮
│   Product Index  │
│   (Elasticsearch)│  ← Full-text search
╰──────────────────╯

Annotation Best Practices

Use annotations for information that doesn't fit in the diagram:

  1. Scaling notes: Scales horizontally, Sharded by userId
  2. Consistency notes: Eventual consistency, Strongly consistent
  3. Capacity notes: 10K QPS, 99.99% SLA
  4. Security notes: TLS 1.3, OAuth 2.0

Place annotations on the right side of the diagram or in callout boxes:

┌──────────┐      ┌──────────┐
│   API    ├─────►│  Order   │
│  Gateway │      │ Service  │├────┐
└──────────┘      └──────────┘     │
                                   │
                              ┌────▼────┐
                              │  Order  │
                              │   DB    │
                              ╰─────────╯

                              ┌──────────────────┐
                              │  ANNOTATIONS:    │
                              │  - Sharded by    │
                              │    orderId       │
                              │  - 5K QPS writes │
                              │  - 20K QPS reads │
                              │  - Eventual      │
                              │    consistency   │
                              └──────────────────┘

Amazon-Specific: What They Look For

Amazon interviewers specifically check for:

  1. Service ownership: Each service has a clear boundary and responsibility
  2. Data flow clarity: You can trace a request from client to database
  3. Technology justification: You label technologies AND explain why
  4. Scalability indicators: Labels showing how components scale
  5. Failure handling: Annotations showing retry logic, circuit breakers

Common Labeling Mistakes

  1. Unlabeled arrows — Interviewer doesn't know the protocol
  2. Missing technologyDatabase without specifying SQL vs NoSQL
  3. Too many labels — Label the important things, not everything
  4. No data flow direction — Arrows without direction are meaningless
  5. Inconsistent naming — Call it User Service everywhere, not UserService, user-service, UserSvc

Step-by-Step: Drawing a Chat Application Diagram

Let's practice with a complete example — a WhatsApp-like chat system:

Step 1: Identify the layers

  • Client: Mobile app (sender and receiver)
  • Edge: WebSocket server (for real-time)
  • API: Message service, User service
  • Data: Message DB, User DB, Cache
  • Messaging: Queue for async delivery

Step 2: Draw the layout (top-to-bottom)

┌──────────────────────────────────────────────────────┐
│                   CLIENT LAYER                        │
│    ┌──────────┐              ┌──────────┐            │
│    │ Sender   │              │ Receiver │            │
│    │  Phone   │              │  Phone   │            │
│    └────┬─────┘              └────▲─────┘            │
└─────────┼─────────────────────────┼──────────────────┘
          │ WebSocket               │ WebSocket
┌─────────▼─────────────────────────▼──────────────────┐
│                  WEBSOCKET LAYER                      │
│    ┌──────────────────────────────────────┐          │
│    │     WebSocket Gateway (WS Server)    │          │
│    │     (Node.js, Socket.io)             │          │
│    └────────────────┬─────────────────────┘          │
└─────────────────────┼────────────────────────────────┘
                      │ HTTP REST
┌─────────────────────▼────────────────────────────────┐
│                   API LAYER                           │
│    ┌──────────┐  ┌──────────┐  ┌──────────┐         │
│    │ Message  │  │  User    │  │  Auth    │         │
│    │ Service  │  │ Service  │  │ Service  │         │
│    └────┬─────┘  └────┬─────┘  └────┬─────┘         │├──────┤
└─────────┼──────────────┼──────────────┼───────────────┘
          │              │              │
┌─────────▼──────────────▼──────────────▼───────────────┐
│                    DATA LAYER                          │
│    ╭────────╮  ╭────────╮  ╭────────╮  (────────)    │
│    │Message │  │ User   │  │  Auth  │  Redis Cache   │
│    │  DB    │  │  DB    │  │  DB    │  (Sessions)    │
│    │(Dynamo)│  │(Postgr)│  │(Postgr)│                │
│    ╰────────╯  ╰────────╯  ╰────────╯  (────────)    │
└──────────────────────────────────────────────────────┘
          │
┌─────────▼───────────────────────────────────────────┐
│                  MESSAGING LAYER                     │
│    ┌─────────────────────────────────────┐          │
│    │     SQS Queue (Dead Letter)         │          │
│    │     (Failed message retries)        │          │
│    └─────────────────────────────────────┘          │
└─────────────────────────────────────────────────────┘

Step 3: Label data flows

  • Sender → WebSocket Gateway: WebSocket (real-time)
  • WebSocket Gateway → Message Service: HTTP REST
  • Message Service → Message DB: DynamoDB write
  • Message Service → SQS: Async retry
  • Receiver ← WebSocket Gateway: WebSocket push

Step 4: Add annotations

  • Message DB: Sharded by chatId, 99.99% availability
  • Redis: User online status, last seen, active chats
  • SQS: Dead letter queue for failed deliveries
  • WebSocket Gateway: Sticky sessions, 100K concurrent connections

This complete diagram tells the interviewer: you understand the problem, you know the components, you can design the data flow, and you can justify your technology choices.

Practice Problems

0/3solved
Design How to Draw Architecture System

Design a scalable How to Draw Architecture system. Cover high-level architecture, data model, and API design.

Solution
// Complete system design:
// - Functional + Non-functional requirements
// - Capacity estimation
// - Data model (SQL/NoSQL choice)
// - API endpoints
// - Component architecture
// - Scaling strategy
// - Monitoring & reliability
How to Draw Architecture Scaling

How would you scale How to Draw Architecture to handle 10x the current load? Identify bottlenecks and solutions.

Solution
// Scaling approach:
// 1. Load balancing
// 2. Database sharding/replication
// 3. Cache layer (Redis)
// 4. CDN for static assets
// 5. Async processing (queues)
// 6. Microservices decomposition
How to Draw Architecture Failure Modes

Analyze potential failure modes for How to Draw Architecture and design mitigation strategies.

Solution
// Failure mitigation:
// 1. Redundancy (multi-AZ)
// 2. Circuit breakers
// 3. Retry with backoff
// 4. Dead letter queues
// 5. Health checks
// 6. Graceful degradation

Quiz

1. In a system design diagram, what symbol represents a database?

Question 1 options

2. Which layout direction do most Amazon interviewers prefer for system design diagrams?

Question 2 options

3. What should you label on arrows between components?

Question 3 options

4. What is the most common diagramming mistake in system design interviews?

Question 4 options

5. Which layer should contain Redis or Memcached in your diagram?

Question 5 options

Flashcards

Question

What symbol represents a load balancer in system design diagrams?

Answer

A diamond. Load balancers route traffic and make routing decisions, which is why the diamond (decision point) symbol is used. Label it with the type (L7 for Application LB, L4 for Network LB).

Question

What are the 5 standard layers in an Amazon system design diagram?

Answer

1) Client Layer (mobile, web, CLI), 2) Edge Layer (Route 53, CloudFront, WAF), 3) API Layer (API Gateway, ALB), 4) Service Layer (microservices), 5) Data Layer (databases, caches, object storage).

Question

What's the difference between solid and dashed arrows in diagrams?

Answer

Solid arrows represent synchronous communication (HTTP, gRPC, REST). Dashed arrows represent asynchronous communication (SQS messages, Kafka events, fire-and-forget). This distinction is critical for showing data flow patterns.

Question

What information should every labeled component include?

Answer

1) Service/component name, 2) Technology used (PostgreSQL, Redis, etc.), 3) Protocol on arrows (HTTP, gRPC), 4) Data type if relevant (JSON, Protobuf). This ensures the interviewer understands your design choices.

Question

How should you handle multiple services at the same layer?

Answer

Draw them side by side with equal spacing, align them horizontally, use consistent sizing, and connect them to the layers above and below with appropriate arrows showing communication patterns.

Question

What should you put on the right side of your diagram?

Answer

Annotations and scaling notes that don't fit in the diagram itself. This includes: scaling strategy (horizontal/vertical), consistency model, capacity estimates (QPS), security notes, and any important design decisions.

Revision Notes

Key Takeaways

  • 1.Consistent symbols are non-negotiable — pick one symbol per component type and stick with it
  • 2.Top-to-bottom layout gives you the most space for complex Amazon systems
  • 3.Every arrow MUST be labeled with the communication protocol
  • 4.Organize into 5 layers: Client, Edge, API, Service, Data
  • 5.Annotations on the right side show depth without cluttering the diagram
  • 6.Practice drawing clean diagrams on whiteboard before the interview
  • 7.Start with the main flow, then add secondary services and async patterns
  • 8.Amazon wants to see that you can communicate complex systems visually

Interview Tips

  • Draw the skeleton (boxes and arrows) first, then fill in labels — don't try to draw everything at once
  • When you add a service, explain WHY it's needed and what protocol it uses
  • Use the whiteboard's full space — start in the center and expand outward
  • If you make a mistake, don't erase everything — cross it out and redraw cleanly
  • Point to components as you explain them — this shows confidence and clarity
  • After drawing, walk the interviewer through a request flow: 'A user sends a request, it hits the Load Balancer, goes to...'
  • If the interviewer asks you to add something, draw it in without erasing existing components
  • Practice the chat app diagram from this chapter — it covers all the patterns you need

Cheat Sheet

Architecture Diagram Cheat Sheet

Symbols (Memorize These)

  • Rectangle → Service/Microservice
  • Cylinder → Database (SQL/NoSQL)
  • Diamond → Load Balancer
  • Rounded Rectangle → Cache (Redis/Memcached)
  • Cloud → External Service/Internet
  • Parallelogram → Third-party System
  • Solid Arrow → Sync call (HTTP, gRPC)
  • Dashed Arrow → Async (SQS, Kafka)

5-Layer Template

  1. Client Layer (Mobile, Web, CLI)
  2. Edge Layer (Route 53, CloudFront)
  3. API Layer (API Gateway, ALB)
  4. Service Layer (Microservices)
  5. Data Layer (DB, Cache, S3)

Layout Rules

  • Top-to-bottom preferred (more horizontal space)
  • Equal spacing between same-layer components
  • Start in the center of whiteboard
  • Use entire board, not just one corner
  • Reserve right side for annotations

Labeling Rules

  • Service name + technology inside component
  • Protocol on every arrow (HTTP, gRPC, WS)
  • Data type on arrows if relevant
  • Annotations on right side for scaling, consistency

Common Mistakes to Avoid

  • Inconsistent symbols across diagram
  • Missing protocol labels on arrows
  • Unlabeled databases (SQL vs NoSQL?)
  • Curved arrows (use straight lines)
  • Missing data flow direction
  • Cramming in one corner of whiteboard

Amazon Interviewer Checklist

✓ Clean, readable diagram
✓ Consistent symbols throughout
✓ Data flow traceable from client to DB
✓ Technology labels with justification
✓ Scalability annotations
✓ Failure handling shown