●SYSTEM DESIGN VISUAL ENCYCLOPEDIA & INTERACTIVE SIMULATOR

System Design Visual Encyclopedia

Explore distributed systems topics with interactive packet-flow visualizations, step-by-step explanations, engineering trade-offs, and real-world examples.

RECOMMENDED READING TRACK

Looking for a sequential, step-by-step reading flow?

Follow the complete learning path in order, with practical analogies and interview takeaways throughout.

Start the learning path→
INTERACTIVE LAB ENVIRONMENT

System Simulator Playground

Fires real visual packets across simulated microservices
●SYSTEMBLOCKS SIMULATION LABORATORY
Traffic Distribution Blueprint
PACKET LOSS: 0
CONCEPT: TRAFFIC DISTRIBUTION

Load Balancing & Elastic Scale

A Load Balancer intercepts incoming requests from the internet and distributes them across multiple backend nodes to prevent any single server from overheating.

SERVERS1 Node
ALGORITHMDirect
STATUSHEALTHY
TRAFFIC GENERATION

Single Server Bottleneck

High traffic easily exhausts server compute limits.

LIVE SIMULATION TELEMETRY
Trigger actions above to observe live system events.
COMPREHENSIVE CURRICULUM

Visual Architecture Catalog(151 topics)

Filter Difficulty:
🌐
1. FoundationsBeginnerUNLOCKED

DNS & Global Ingress Networking

Translates domain names to IP addresses via hierarchical tree lookups, utilizing BGP Anycast to direct users to the topologically closest network PoP.

⚡DNS Resolution Sequence● LIVE FLOW
1
Client Browser
Queries domain.com (UDP:53)
↓
2
Recursive Resolver
Checks ISP / Cloudflare cache
↓
3
Root & TLD Server
Delegates to authoritative NS
↓
4
Authoritative DNS
Returns Anycast IP with TTL
KEY TAKEAWAY: Anycast maps multiple physical edge servers to a single public IP, letting BGP route packets along the lowest AS-hop path.
PRO:Global low-latency resolution, edge DDoS mitigation.
CON:DNS caching TTL delays emergency disaster failover propagation.
USED IN:
Cloudflare 1.1.1.1AWS Route 53Google 8.8.8.8
💻
1. FoundationsBeginnerUNLOCKED

Client-Server Communication Model

Foundational distributed computing paradigm where client applications initiate request packets and distributed servers listen and compute responses.

⚡Client-Server Request/Response Lifecycle● LIVE FLOW
1
Client Device
HTTP/HTTPS GET payload
↓
2
Network Internet
TCP/IP routing hops
↓
3
Application Server
Executes controller logic
↓
4
Database Tier
ACID read/write commit
KEY TAKEAWAY: Decouples client user interfaces from data persistence and business domain computations.
PRO:Centralized access control, unified database security, independent client releases.
CON:Central server represents a single point of failure without load balancing.
USED IN:
Web BrowsersMobile iOS/Android AppsREST/gRPC Backends
🧱
1. FoundationsIntermediateUNLOCKED

Monolith to Microservices Evolution

Decomposes a single unified deployment unit into autonomous, independently deployable services organized around business bounded contexts.

⚡Strangler Fig Migration Flow● LIVE FLOW
1
Legacy Monolith
Serves 100% of traffic on single DB
↓
2
API Gateway Router
Splits 10% traffic to new microservice
↓
3
Target Microservice
Processes isolated domain logic
↓
4
Monolith Deprecation
Remaining features fully migrated
KEY TAKEAWAY: Microservices solve organizational scaling and release velocity, but exchange code simplicity for network complexity.
PRO:Autonomous team deployments, localized technology stacks, isolated failure blast radiuses.
CON:Requires distributed tracing, circuit breakers, and network latency overhead.
USED IN:
NetflixAmazonUberKubernetes
📈
2. Compute & ScalingBeginnerUNLOCKED

Vertical vs Horizontal Scaling

Vertical scaling upgrades a single node (CPU/RAM). Horizontal scaling adds stateless worker nodes across an autoscaling pool behind a load balancer.

⚡Horizontal Cluster Expansion Flow● LIVE FLOW
1
CPU Metric > 80%
CloudWatch triggers alarm
↓
2
Autoscaler Controller
Orders +4 container replicas
↓
3
Health Check Probe
Pod passes /ready in 5s
↓
4
Load Balancer Target
Spreads 25,000 QPS across 8 nodes
KEY TAKEAWAY: Stateless application servers scale horizontally with near-linear cost; databases eventually require sharding.
PRO:Horizontal scaling has no hardware ceiling and offers high resilience.
CON:Requires stateless services and centralized distributed caches (Redis).
USED IN:
Kubernetes HPAAWS EC2 Auto ScalingGoogle Cloud Run
⚖️
2. Compute & ScalingIntermediateUNLOCKED

Load Balancing (Layer 4 vs Layer 7)

Distributes incoming client requests across a pool of backend servers using algorithms like Round Robin, Least Connections, and IP Hash.

⚡L7 Load Balancer Request Distribution● LIVE FLOW
1
Client Ingress
HTTPS request hits VIP
↓
2
L7 Load Balancer
Inspects path /api/orders
↓
3
Least-Conn Algorithm
Picks Server #3 (12 conns vs 90)
↓
4
Backend Server #3
Executes request in 18ms
KEY TAKEAWAY: Layer 4 routes raw TCP/UDP packets with zero payload inspection; Layer 7 parses HTTP headers, paths, and cookies.
PRO:Prevents single-node overload, enables zero-downtime rolling upgrades.
CON:Adds a network hop; stateful servers require sticky session affinity.
USED IN:
AWS ALB/NLBHAProxyNGINXCloudflare
🛡️
2. Compute & ScalingBeginnerUNLOCKED

Reverse Proxy (NGINX / Envoy)

An intermediary proxy server that sits in front of web servers to terminate TLS, compress payloads (Brotli/Gzip), cache responses, and hide internal network topologies.

⚡Reverse Proxy Ingress Pipeline● LIVE FLOW
1
Public Internet
Sends TLS 1.3 ClientHello
↓
2
Reverse Proxy
Terminates TLS & checks rate limit
↓
3
Cache Evaluation
Cache MISS -> forwards upstream
↓
4
Internal Pod
Receives decrypted HTTP/2 request
KEY TAKEAWAY: Reverse proxies face the internet to protect servers; Forward proxies face clients to protect internal enterprise users.
PRO:Centralizes SSL cert renewals, rate limiting, and static file caching.
CON:Misconfiguration can cause security leakage or header strip errors.
USED IN:
NGINXEnvoy ProxyTraefikCaddy
🚪
2. Compute & ScalingIntermediateUNLOCKED

API Gateway Pattern

Single unified gateway entry point for microservices that handles JWT verification, rate limiting, protocol translation (REST to gRPC), and request routing.

⚡API Gateway Routing & Auth Flow● LIVE FLOW
1
Mobile Client
Sends JWT in Authorization header
↓
2
API Gateway
Validates JWT signature & Token Bucket
↓
3
Protocol Translation
Converts JSON REST -> Protobuf gRPC
↓
4
Microservices Mesh
Routes to User, Order, & Payment Svcs
KEY TAKEAWAY: Prevents client devices from making 20 individual microservice requests across cellular connections.
PRO:Centralized security, telemetry, and rate limiting enforcement.
CON:Can turn into a monolith bottleneck if domain business logic leaks inside.
USED IN:
KongAWS API GatewayNetflix ZuulApache APISIX
🗄️
3. Data & StorageBeginnerUNLOCKED

SQL Relational vs NoSQL Engines

SQL databases enforce structured schemas and ACID transactions with relations. NoSQL systems optimize for flexible schemas, horizontal partition scale, and eventual consistency.

⚡Storage Paradigm Selection Flow● LIVE FLOW
1
Incoming Write Request
Order checkout transaction
↓
2
Relational SQL Node
Multi-table JOIN & ACID lock
↓
3
NoSQL Document Store
Single-document write <2ms
KEY TAKEAWAY: Use SQL for relational integrity (financial ledgers); use NoSQL for massive key-value or document scale (clickstreams, user profiles).
PRO:SQL provides robust JOINs and ACID; NoSQL provides seamless horizontal sharding.
CON:SQL sharding is complex; NoSQL lacks cross-table ACID transactions without distributed locks.
USED IN:
PostgreSQLMySQLMongoDBDynamoDBCassandra
🌲
3. Data & StorageIntermediateUNLOCKED

B-Tree & B+Tree Indexing

Self-balancing search tree data structure that keeps data sorted and allows searches, sequential access, insertions, and deletions in logarithmic O(log N) time.

⚡B+Tree Index Traversal Step● LIVE FLOW
1
WHERE id = 42
Index lookup query
↓
2
Root Page Node
Evaluates ranges [1-50] vs [51-100]
↓
3
Internal Branch
Follows page pointer to [35-45]
↓
4
Leaf Node Page
Fetches exact row pointer from disk in 1 I/O
KEY TAKEAWAY: B+Trees store all table data pointers in leaf nodes linked horizontally, making range queries (BETWEEN x AND y) lightning fast.
PRO:Reduces disk page reads from millions to 3-4 I/O lookups.
CON:Every write requires page split balancing and index maintenance.
USED IN:
PostgreSQL B-TreeMySQL InnoDBSQLite
🏛️
3. Data & StorageAdvancedUNLOCKED

ACID Transactions & Isolation Levels

Guarantees Atomicity (all-or-nothing), Consistency (rules preserved), Isolation (concurrent safety), and Durability (WAL commits survive power loss).

⚡Two-Phase ACID Transaction Commit● LIVE FLOW
1
BEGIN Transaction
Allocates unique TxID in engine
↓
2
DML Writes & Row Locks
Updates account balances in RAM buffer
↓
3
WAL fsync Flush
Writes delta log to non-volatile disk
↓
4
COMMIT & Lock Release
Changes visible to concurrent readers
KEY TAKEAWAY: Isolation levels trade performance for anomalies: Read Uncommitted (dirty reads) -> Read Committed -> Repeatable Read -> Serializable (strict 2PL).
PRO:Prevents double-spending and ledger inconsistencies.
CON:Higher isolation levels introduce row locking, deadlocks, and reduced write throughput.
USED IN:
PostgreSQLOracleSpannerCockroachDB
🔺
3. Data & StorageIntermediateUNLOCKED

CAP Theorem (Consistency vs Availability)

In any distributed data store, network partitions (P) are inevitable. When a partition occurs, the system must choose between Consistency (CP) or Availability (AP).

⚡Partition Decision Matrix● LIVE FLOW
1
Network Partition Event
Switch failure cuts Region A & B connection
↓
2
CP System Path
Rejects writes to prevent split-brain state
↓
3
AP System Path
Accepts writes locally; syncs via CRDTs later
KEY TAKEAWAY: You cannot choose CA in distributed systems because network cables and routers will inevitably fail.
PRO:Provides an unambiguous framework for distributed tradeoffs.
CON:Forces architects to accept either downtime errors (CP) or stale reads (AP) during netsplit.
USED IN:
CP: Spanner, ZooKeeper, etcdAP: Cassandra, DynamoDB, CouchDB
👯
3. Data & StorageIntermediateUNLOCKED

Database Replication (Leader-Follower)

A primary leader node accepts all write transactions and streams change logs to secondary read replicas to scale read QPS and enable high availability.

⚡WAL Streaming Replication Pipeline● LIVE FLOW
1
Client Write
INSERT INTO orders ...
↓
2
Primary Leader Node
Commits locally and appends to WAL
↓
3
Binlog Streamer
Replicates delta bytes over TCP
↓
4
Read Replica #1 & #2
Replays WAL to serve read traffic
KEY TAKEAWAY: Asynchronous replication offers fast writes but introduces replication lag and stale reads; synchronous replication guarantees zero data loss at higher write latency.
PRO:Multiplies read throughput 10x; provides instant disaster failover.
CON:Replication lag can cause users to not see their own just-written data.
USED IN:
PostgreSQL Streaming ReplicationMySQL BinlogAWS Aurora