System Design Tradeoffs
20 tradeoff comparisons. Understanding tradeoffs is what separates junior from senior engineers.
Top 15 System Design Tradeoffs
System design is fundamentally about making tradeoffs. There is no perfect architecture — every decision involves choosing between competing concerns.
Vertical vs Horizontal Scaling
Vertical scaling (scale up) adds more resources to a single machine. Horizontal scaling (scale out) adds more machines.
Concurrency vs Parallelism
Concurrency is dealing with multiple tasks at once (interleaving). Parallelism is doing multiple tasks at once (simultaneously).
Long Polling vs WebSockets
Both enable near-real-time communication between client and server. Long polling keeps an HTTP connection open until new data is available.
Batch vs Stream Processing
Batch processing handles data in large chunks at scheduled intervals. Stream processing handles data continuously as it arrives.
Stateful vs Stateless Design
Stateless services do not store client state between requests — each request is independent.
Strong vs Eventual Consistency
Strong consistency guarantees that after a write completes, all subsequent reads return the updated value.
Read-Through vs Write-Through Cache
Read-through caches fetch data from the origin on cache miss. Write-through caches update the origin synchronously on every write.
Push vs Pull Architecture
In push architecture, the server sends data to clients when events occur (WebSockets, webhooks, push notifications).
REST vs RPC
REST organizes APIs around resources (nouns) with standard HTTP methods. RPC organizes APIs around actions (verbs) with custom method names.
Synchronous vs Asynchronous Communication
Synchronous communication blocks the caller until the response is received (HTTP request-response).
Latency vs Throughput
Optimizing for low latency (fast individual requests) often conflicts with optimizing for high throughput (maximum requests per second).
SQL vs NoSQL — How to Choose the Right Database
Relational databases offer ACID transactions, mature tooling, and powerful query languages.
When to Choose Monolith vs Microservices
A monolith is a single deployable unit — simple to develop, test, and deploy. Microservices decompose functionality into independently deployable services.
TCP vs UDP — Choosing the Right Transport Protocol
TCP provides reliable, ordered delivery with flow control and congestion management. UDP provides raw speed with minimal overhead.
Consistency vs Availability
The CAP theorem forces distributed systems to choose between consistency and availability during network partitions.
Caching vs Database Reads
Caches deliver sub-millisecond reads from memory but add complexity around invalidation and consistency.
Event-Driven vs Request-Driven
Request-driven architectures use synchronous calls where the client waits for a response.
Pre-computation vs On-Demand Computation
Pre-computation trades storage and freshness for read speed by calculating results ahead of time.
Denormalization vs Normalization
Normalization eliminates data redundancy by decomposing tables and enforcing referential integrity.