Topics/System Design

System Design

98 articles

Distributed Systems Architecture & Large-Scale Trade-offs

System Design involves engineering distributed software architectures that scale gracefully to millions of concurrent users while remaining resilient, available, and maintainable.

Level: Intermediate to Advanced
7 Core Subtopics

Track Curriculum

Subtopics & Modules

7 Modules Available
Module 01
3 Q&A
Intermediate

System Design Fundamentals

Scalability (vertical vs horizontal), availability (99.999%), latency vs throughput, and SLA/SLOs.

20 min readStart Guide
Module 02
3 Q&A
Intermediate

Load Balancing & Reverse Proxies

L4 vs L7 load balancers, Round-Robin, Least Connections, Consistent Hashing, and Nginx/HAProxy.

22 min readStart Guide
Module 03
3 Q&A
Intermediate

Multi-tier Caching Strategies

CDN edge caching, browser caching, Redis cache patterns, cache invalidation, and LRU algorithms.

24 min readStart Guide
Module 04
3 Q&A
Advanced

Message Queues & Event Streams

Decoupled asynchronous processing, Apache Kafka, RabbitMQ, Pub/Sub, and event-driven architecture.

28 min readStart Guide
Module 05
8 Q&A
Advanced

Microservices & Service Mesh

Distributed systems architecture, 12 principles, design patterns (Saga, CQRS, Outbox), service mesh with Envoy, and production resilience.

35 min readStart Guide
Module 06
3 Q&A
Intermediate

API Gateway & Rate Limiting

Token Bucket, Leaky Bucket, Sliding Window Counter algorithms, request routing, and SSL termination.

24 min readStart Guide
Module 07
3 Q&A
Advanced

Distributed Storage & Consensus

Consensus algorithms (Raft, Paxos), DynamoDB quorum writes, vector clocks, and distributed locks.

32 min readStart Guide
Track Question Bank
26 Questions Across Modules

Interview Questions by Module Topic

Select a module to view its related questions, or explore all modules organized by seniority level

Filter by Module Topic:
01
Module Topic•3 Questions under this topic

System Design Fundamentals

Full Guide & Mechanics

What is the difference between Vertical Scaling (Scale Up) and Horizontal Scaling (Scale Out), and what physical and financial ceilings does vertical scaling hit?

In-Depth Technical Answer

**Vertical Scaling (Scale Up)** adds more computing resources (RAM, CPU cores, NVMe SSDs) to a single machine. It requires zero application code changes, introduces no network distributed latency, and maintains trivial single-node database ACID transactions. However, it hits hard physical limits (you cannot buy a server with 10,000 CPU cores), suffers from single-point-of-failure (SPOF) downtime during hardware upgrades, and costs grow exponentially at the high end. **Horizontal Scaling (Scale Out)** adds more commodity server nodes behind a load balancer. It offers virtually limitless scaling potential, cost efficiency (commodity hardware), and high availability (if server 1 crashes, traffic shifts to servers 2-10). However, it introduces distributed complexity: stateless API architectures, network serialization latency, distributed database sharding, and eventual consistency trade-offs.

Practical Code Examplescaling_tradeoffs.txt
Text
Vertical Scaling (Scale Up):
[ Server: 4 Core / 16GB ] ---> Upgrade ---> [ Monster Server: 128 Core / 2TB RAM ]
Cost: Exponential ($$$$) | Downtime: Required | Failure: 1 Machine dies = Entire site down!

Horizontal Scaling (Scale Out):
Incoming Traffic ---> [ Load Balancer ]
                        ├─── [ Node 1: 4 Core ]
                        ├─── [ Node 2: 4 Core ]
                        └─── [ Node 3: 4 Core ]
Cost: Linear ($) | Downtime: Zero | Resilience: Any node dies = 0% downtime!

🔍 Code Mechanics (Text): Modern production systems scale horizontally at the stateless application tier, while scaling vertically first at the database tier before introducing sharding.

Senior Architectural TakeawayScale up initially for simplicity, but design stateless application tiers from day one to scale out horizontally across commodity instances.

What is the CAP Theorem, and why does the PACELC Theorem provide a more realistic model for real-world distributed databases like DynamoDB, Cassandra, and MongoDB?

How do you architect an active-active multi-region system achieving 99.999% availability ('five nines') while preventing split-brain data corruption?

02
Module Topic•3 Questions under this topic

Load Balancing & Reverse Proxies

Full Guide & Mechanics

What are the core technical differences between Layer 4 (Transport) and Layer 7 (Application) Load Balancers, and when is each preferred?

How does Consistent Hashing with Virtual Nodes work, and why does it prevent catastrophic cache invalidation when servers are added or removed?

How do you architect a Zero-Downtime Blue/Green and Canary deployment routing pipeline with automated health check circuit breakers?

03
Module Topic•3 Questions under this topic

Multi-tier Caching Strategies

Full Guide & Mechanics

What are the differences between Cache-Aside, Write-Through, and Write-Back (Write-Behind) caching patterns, and when should you choose each?

What is a Cache Stampede (Thundering Herd Problem), and how do Probabilistic Early Expiration (XFetch) and Distributed Mutex Locks prevent database collapse?

How do you architect an enterprise Multi-Tier Cache Invalidation pipeline across Browser, Edge CDN, and Redis clusters without serving stale inventory during flash sales?

04
Module Topic•3 Questions under this topic

Message Queues & Event Streams

Full Guide & Mechanics

What are the fundamental architectural differences between a Traditional Message Broker (RabbitMQ) and a Distributed Commit Log (Apache Kafka)?

How do you guarantee Idempotent Message Processing under At-Least-Once delivery semantics using Idempotency Keys and database transactions?

How do you implement the Transactional Outbox Pattern with Change Data Capture (Debezium) to guarantee atomic database updates and event publishing without distributed 2PC transactions?

05
Module Topic•8 Questions under this topic

Microservices & Service Mesh

Full Guide & Mechanics

How do you handle distributed transactions across microservices without a monolithic database, and why is Two-Phase Commit (2PC) avoided?

How do you implement the Circuit Breaker pattern in production microservices using Resilience4j and Spring Boot?

How do you implement distributed tracing across 10+ microservices using OpenTelemetry and Jaeger to debug tail latency?

What is the Strangler Fig Pattern, and how do you migrate a legacy monolith to microservices with zero downtime?

How does Mutual TLS (mTLS) work in a Service Mesh, and how do you enforce Zero-Trust network security between microservices?

How do you version microservice APIs without breaking consumers, and what is Consumer-Driven Contract Testing (Pact)?

When should an organization NOT use microservices, and what are the hidden operational costs?

How do developers run, test, and debug microservices locally without running 20 containers simultaneously?

06
Module Topic•3 Questions under this topic

API Gateway & Rate Limiting

Full Guide & Mechanics

What are the core responsibilities of an API Gateway, and how does the Backend-for-Frontend (BFF) pattern optimize mobile and web client consumption?

How does the Sliding Window Counter algorithm prevent traffic bursts at window boundaries, and why are Redis Lua scripts required for distributed enforcement?

How do you design a robust Circuit Breaker state machine (Closed, Open, Half-Open) with exponential backoff and fallback degradation to isolate failing services?

07
Module Topic•3 Questions under this topic

Distributed Storage & Consensus

Full Guide & Mechanics

What causes Database Replication Lag in Primary-Replica architectures, and how do you achieve 'Read-Your-Own-Writes' consistency?

How does Quorum Consensus (R + W > N) guarantee strong consistency in leaderless distributed storage engines like Amazon DynamoDB and Apache Cassandra?

How does the Raft Consensus Algorithm handle network partitions, leader elections, and log reconciliation to prevent split-brain dual-leader states?