System Design

How real systems
are actually built.

Interactive architecture breakdowns of systems used by billions. Explore animated data flows, component trade-offs, and the exact tech stack behind each design.

5Systems
20Concepts
40+Components
LiveAnimated Flows
Interactive Architectures
WhatsApp
Real-time Messaging

End-to-end encrypted messaging at 2 billion users. From client to XMPP gateway to Cassandra-backed message store — see every hop in the message journey.

Signal-protocol E2E encryption & key management
Persistent WebSocket connections & presence service
Group fan-out, media CDN, push notifications
WebSocketCassandra KafkaRedis APNS / FCME2E Encryption
Netflix
Video Streaming

Global streaming at 270M subscribers. Adaptive bitrate delivery, multi-region CDN, recommendation engine, and the Open Connect backbone powering every play.

Adaptive bitrate (ABR) & Open Connect CDN
Microservices on AWS with Eureka service discovery
Collaborative filtering & ML recommendation engine
CDNKafka CassandraAWS MicroservicesSpark
YouTube
Video Platform

500 hours of video uploaded every minute. Explore the upload pipeline, transcoding farm, global CDN, and recommendation system that drives 70% of watch time.

Video ingestion, transcoding & multi-quality encoding
Bigtable metadata storage & global load balancing
Deep learning recommendation & ad targeting
GCPBigtable Pub/SubCDN TranscodingML Recommend
Instagram
Social Media Platform

2 billion monthly users sharing 100M+ photos daily. See how the feed ranking, media pipeline, follower graph, and Stories infrastructure all fit together.

Media upload pipeline & multi-CDN delivery
Social graph sharding & follower fan-out
Feed ranking via ML & Stories ephemeral storage
PostgreSQLCassandra RedisS3 RabbitMQElasticsearch
AI Agents
LLM Orchestration System

Multi-agent AI orchestration — how LLMs plan, use tools, call APIs, manage memory, and chain reasoning steps. The architecture behind autonomous AI systems.

Planner → Tool Router → Executor agent loop
Vector DB memory & RAG knowledge retrieval
Observation feedback, retry logic & guardrails
LLMRAG Vector DBTool Use Multi-AgentOrchestration
System Design Concepts
Phase 1 Foundation — appears in every interview
Phase 1
Load Balancer
Traffic Distribution

Simulate Round Robin, Weighted RR, Least Connections, and IP Hash algorithms. Watch requests fly across servers in real time with per-server load meters.

Round RobinLeast Connections Health ChecksIP Hash
Phase 1
Caching
Latency Reduction

Tune cache capacity, eviction policy (LRU / LFU / FIFO), and access pattern. Watch hit rates and average latency update live as your cache warms up.

LRULFU Cache AsideWrite-Through
Phase 1
Database Design
Normalization

Step through 1NF → 2NF → 3NF normalization with real table examples. See redundancy shrink and understand update/insert/delete anomalies visually.

1NF / 2NF / 3NFER Diagram AnomaliesForeign Keys
Phase 1
Database Indexing
Query Performance

Compare full table scan vs B-Tree index traversal on tables from 1K to 1M rows. See the O(n) vs O(log n) difference play out visually with rows-scanned counters.

B-TreeFull Scan Composite IndexCovering Index
Phase 1
DB Replication
High Availability

Spin up 1–4 replicas and toggle Sync / Async / Semi-Sync modes. Watch replication lag appear in async, fail a replica to test HA, and route reads to replicas.

Primary-ReplicaAsync / Sync Replication LagFailover
Phase 1
Database Sharding
Horizontal Scaling

Distribute records across 2–6 shards with Hash, Range, or Directory strategies. Type any key to see exactly which shard it lands on — and watch hot shards turn red.

Hash ShardingRange Sharding Hot ShardResharding
Phase 2 Distributed Systems — separates mid-level from senior
Phase 2
Consistent Hashing
Distributed Routing

Place servers on a virtual ring with N virtual nodes each. Add/remove servers and watch only the minimal keys remap — no global reshuffle needed.

Hash RingVirtual Nodes Redis ClusterDHT
Phase 2
CAP Theorem
Distributed Trade-offs

Inject a network partition and watch CP systems reject reads while AP systems serve stale data. See why you can only pick 2 of 3 guarantees.

CP / AP / CANetwork Partition ConsistencyAvailability
Phase 2
Message Queues
Async Communication

Kafka vs RabbitMQ — tune producers, partitions, and consumer groups. Simulate lag building up and watch consumers fall behind in real time.

KafkaRabbitMQ Consumer GroupsPartitions
Phase 2
Event-Driven Architecture
Decoupled Systems

Publish events to a bus and watch multiple subscribers react in parallel. Toggle comparison mode to see request-response vs event-driven latency side by side.

Pub/SubEvent Bus Dead Letter QueueFan-out
Phase 2
Distributed Locks
Concurrency Control

Watch services compete for a Redis lock with TTL. Crash the holder mid-operation and see the lock expire and transfer. Toggle to Redlock for 5-node quorum mode.

Redis SET NXRedlock TTLLeader Election
Phase 2
Distributed Transactions
Saga Pattern

Run a saga across Order → Payment → Inventory → Shipping. Inject a failure at any step and watch compensating transactions roll back the whole saga automatically.

SagaChoreography OrchestrationCompensation
Phase 3 Reliability — discuss these proactively
Phase 3
Rate Limiter
Traffic Control

Token Bucket, Leaky Bucket, Fixed Window, Sliding Window — watch requests get accepted or throttled with a live 429 rejection counter and fill-level gauge.

Token BucketSliding Window 429 Too Many ReqBurst
Phase 3
Retries & Backoff
Fault Tolerance

Set failure probability and compare No Retry vs Fixed vs Exponential vs Jitter. See the thundering herd spike collapse into a smooth load curve when jitter is added.

Exponential BackoffJitter Thundering HerdTransient Failure
Phase 3
Circuit Breaker
Cascading Failure Prevention

Tune failure threshold and recovery timeout. Watch the circuit flip Closed → Open → Half-Open with a live state machine and failure-rate gauge.

Closed / Open / Half-Open Fail FastHystrix
Phase 3
Idempotency
Safe Retries

Send 3–5 duplicate payment requests with and without an idempotency key. See duplicates pile up on one side and get deduplicated on the other — side by side.

Idempotency-KeyUUID DeduplicationPOST Safety
Phase 4 Microservices — production-grade architecture
Phase 4
API Gateway
Entry Point

Toggle Auth, Rate Limiting, Caching, and Transform features. Watch each feature light up as requests flow through the gateway pipeline — inject failures to see 401, 429, and 503 responses.

RoutingAuth Rate LimitingSSL Termination
Phase 4
Service Discovery
Dynamic Routing

Scale instances up and down, kill one mid-flight, and watch the registry detect the health check failure and route around it. Toggle client-side vs server-side discovery.

ConsulEureka Health ChecksClient-Side
Phase 4
Authentication
JWT / OAuth 2.0

Step through JWT auth, OAuth 2.0 Authorization Code, and Client Credentials flows. See the JWT decoded live, simulate token expiry, and watch the refresh token flow trigger.

JWTOAuth 2.0 Refresh TokenStateless Auth
Phase 4
Monitoring & Observability
Metrics / Logs / Traces

Inject error spikes, latency spikes, or memory leaks. Watch alerts fire on the metrics chart, ERROR lines stream in the log feed, and a slow span appear in the distributed trace waterfall.

PrometheusELK Stack JaegerDistributed Traces