Comparisons

System Design Comparisons

26 side-by-side comparisons of common system design choices, with key differences, when to use each, and a verdict.

Comparisons

ACID vs BASEACID describes strict transactional guarantees of relational databases; BASE describes the relaxed, availability-first model many NoSQL stores adopt.B-Tree vs LSM-TreeB-trees update data in place and are read-optimized (the classic SQL index); LSM-trees batch writes into sorted files and compact them, optimizing for high write throughput.Batch Processing vs Stream ProcessingBatch processing runs over large bounded datasets on a schedule (high throughput, high latency); stream processing handles events continuously as they arrive (low latency, real-time).Cache-Aside vs Write-ThroughCache-aside lazily fills the cache on a read miss; write-through writes to the cache and database together so the cache is always warm and consistent.Cassandra vs MongoDBCassandra is a masterless, write-optimized wide-column store for huge scale and availability; MongoDB is a document database with flexible schemas and richer queries.Horizontal scaling vs Vertical scalingVertical scaling means a bigger machine; horizontal scaling means more machines. Vertical is simplest; horizontal is how you scale past one box and survive failures.JWT vs SessionSession auth stores state on the server and gives the client an opaque ID (easy to revoke); JWT is a self-contained signed token the server can verify without a lookup (stateless, harder to revoke).Kafka vs RabbitMQKafka is a distributed, replayable commit log built for high-throughput event streams; RabbitMQ is a flexible message broker built for routing tasks to consumers.Kafka vs SQSKafka is a self-managed, replayable, partitioned event log built for high-throughput streams; SQS is a fully-managed AWS queue built for simple, durable task distribution.L4 load balancing vs L7 load balancingAn L4 load balancer routes by IP/port (transport layer); an L7 load balancer understands HTTP and can route by path, host, headers or cookies.Latency vs ThroughputLatency is how long one request takes; throughput is how many requests you handle per unit time. Optimizing one can hurt the other.Long Polling vs WebSocketsLong polling fakes real-time over ordinary HTTP by holding requests open; WebSockets keep one persistent connection for true low-latency, two-way messaging.Monolith vs MicroservicesA monolith is one deployable codebase; microservices split the system into many independently-deployed services. The trade is simplicity vs independent scaling and team autonomy.Normalization vs DenormalizationNormalization splits data into related tables with no duplication (clean writes, more joins); denormalization duplicates data to avoid joins (fast reads, harder writes).Optimistic locking vs Pessimistic lockingPessimistic locking blocks others while you hold a lock; optimistic locking lets everyone proceed and detects conflicts at write time via a version check.PostgreSQL vs MySQLTwo mature open-source relational databases. Postgres leans feature-rich and standards-correct; MySQL leans simple and fast for read-heavy web workloads.Process vs ThreadA process is an isolated program with its own memory; a thread is a lighter unit of execution that shares memory with other threads in the same process.Redis vs MemcachedBoth are in-memory key-value stores used as caches. Redis adds rich data structures, persistence and replication; Memcached is a leaner, multithreaded pure cache.REST vs GraphQLREST exposes resources at fixed endpoints; GraphQL exposes one endpoint where the client asks for exactly the fields it needs.REST vs gRPCREST sends human-readable JSON over HTTP/1.1 and is universal; gRPC sends binary Protobuf over HTTP/2 with codegen and streaming, and is faster for service-to-service calls.Sharding vs ReplicationReplication copies the same data to multiple nodes; sharding splits different data across nodes. One scales reads and adds redundancy; the other scales writes and storage.Single-Leader vs Multi-LeaderSingle-leader replication routes all writes through one node (simple, no write conflicts); multi-leader accepts writes on several nodes (better availability and write locality, but conflicts to resolve).SQL vs NoSQLSQL databases give you relations, joins and ACID transactions on a fixed schema; NoSQL trades some of that for flexible schemas and easier horizontal scale.Strong consistency vs Eventual consistencyStrong consistency means every read sees the latest write; eventual consistency means replicas converge over time. The trade is correctness vs availability and latency.TCP vs UDPTCP is a reliable, ordered, connection-based protocol; UDP is a lightweight, connectionless protocol that trades reliability for low latency.WebSockets vs Server-Sent EventsWebSockets give a full two-way persistent channel; Server-Sent Events give a simpler one-way server→client stream over plain HTTP with automatic reconnect.
Part of SystemLore — browse the Academy, Library, Agentic AI systems, Glossary, and "X vs Y" comparisons. Open the interactive Comparisons.