System Design

System Designarticles

Deep dives into distributed systems, scalability patterns, and architecture decisions that hold up under real-world load. 243 articles and counting.

How Amazon Aurora Works Internally: The Log-Is-the-Database Architecture, Quorum Writes, and Storage-Compute Separation Behind Cloud-Native SQL
System Design ·

How Amazon Aurora Works Internally: The Log-Is-the-Database Architecture, Quorum Writes, and Storage-Compute Separation Behind Cloud-Native SQL

A deep dive into Aurora's storage-compute separation, the log-is-the-database design that pushes redo log processing to storage nodes, quorum-based replication across 6 copies in 3 AZs, protection group architecture, fast cloning, Serverless v2 scaling mechanics, and honest tradeoffs versus RDS, self-managed PostgreSQL, CockroachDB, and Cloud Spanner.

How CockroachDB Works Internally: Distributed SQL, Raft Consensus Per Range, and the Architecture Behind Serializable Transactions at Global Scale
System Design ·

How CockroachDB Works Internally: Distributed SQL, Raft Consensus Per Range, and the Architecture Behind Serializable Transactions at Global Scale

A deep dive into CockroachDB's internals: the 512MB range-based data model with automatic splitting, per-range Raft replication, MVCC timestamp ordering with hybrid logical clocks, DistSQL physical planning, serializable transactions with timestamp refreshes, closed timestamps for follower reads, online schema changes using multi-version schema descriptors, and production considerations for hotspots and write amplification.

How Container Runtimes Work Internally: Namespaces, Cgroups, and the OCI Stack From Docker Run to Process Isolation
System Design ·

How Container Runtimes Work Internally: Namespaces, Cgroups, and the OCI Stack From Docker Run to Process Isolation

Containers are not virtual machines and they are not magic. They are a thin composition of Linux kernel primitives: namespaces, cgroups, and a layered filesystem. This article traces exactly what happens between docker run and a running process, covering the OCI spec, containerd, runc, overlay filesystems, and container networking at the kernel level.

How YugabyteDB Works Internally: DocDB Storage, Tablet Splitting, and the Dual API Architecture That Scales PostgreSQL Horizontally
System Design ·

How YugabyteDB Works Internally: DocDB Storage, Tablet Splitting, and the Dual API Architecture That Scales PostgreSQL Horizontally

A deep dive into YugabyteDB internals covering the DocDB storage engine built on RocksDB LSM trees, per-tablet Raft consensus, YSQL and YCQL dual query layers, distributed MVCC with hybrid logical clocks, automatic tablet splitting and rebalancing, xCluster multi-region replication, and production considerations for hotspots, connection pooling, and schema design.

How Cloud Spanner Works Internally: TrueTime, Paxos Replication, and the Globally-Distributed Architecture Behind Consistent Reads at Any Scale
System Design ·

How Cloud Spanner Works Internally: TrueTime, Paxos Replication, and the Globally-Distributed Architecture Behind Consistent Reads at Any Scale

A deep dive into Cloud Spanner's internals: TrueTime and bounded clock uncertainty, Paxos-based replication with leader leases, the read/write transaction protocol, snapshot reads without locks, interleaved table hierarchies, non-blocking schema changes, and production considerations for split management and hotspot avoidance.

How Memcached Works Internally: Slab Allocation, the LRU Eviction Engine, and the Multi-Threaded Architecture Behind Sub-Millisecond Caching
System Design ·

How Memcached Works Internally: Slab Allocation, the LRU Eviction Engine, and the Multi-Threaded Architecture Behind Sub-Millisecond Caching

A deep-dive into Memcached internals for senior engineers. Covers the slab allocator with chunk sizing and fragmentation tradeoffs, the four-tier HOT/WARM/COLD/TEMP LRU system, the libevent-based multi-threaded architecture with worker threads and the item lock table, hash table expansion mechanics, the text/binary/meta protocols, consistent hashing on the client side, and production considerations including slab rebalancing and UDP reflection mitigations.

How Qdrant Works Internally: HNSW Indexing, Segment Architecture, and the Rust-Based Vector Engine Behind Production Similarity Search
System Design ·

How Qdrant Works Internally: HNSW Indexing, Segment Architecture, and the Rust-Based Vector Engine Behind Production Similarity Search

A deep-dive into Qdrant's internals for senior engineers. Covers the segment lifecycle with immutable segments and WAL-backed mutable storage, HNSW graph construction with ef_construct and m parameters, scalar/product/binary quantization tradeoffs, the query planner's pre-filter vs post-filter decision logic, distributed mode with Raft-based shard management, and production tuning for memory-mapped vs in-memory storage.

How Neon Works Internally: Pageserver Architecture, Branch-Based Storage, and the Compute-Storage Separation That Makes Serverless Postgres Possible
System Design ·

How Neon Works Internally: Pageserver Architecture, Branch-Based Storage, and the Compute-Storage Separation That Makes Serverless Postgres Possible

A deep dive into Neon's serverless Postgres architecture covering the Pageserver's LSN-indexed layer storage, Safekeeper WAL quorum, compute-storage separation with vanilla Postgres, copy-on-write branching, autosuspend mechanics, and production considerations for connection pooling and cost control.

How TiDB Works Internally: Distributed SQL, Raft-Based Storage, and the HTAP Architecture That Scales MySQL Horizontally
System Design ·

How TiDB Works Internally: Distributed SQL, Raft-Based Storage, and the HTAP Architecture That Scales MySQL Horizontally

A deep-dive into TiDB internals for senior engineers. Covers the SQL layer parsing MySQL-compatible queries and generating distributed execution plans, TiKV's Raft-based multi-region storage engine with RocksDB underneath, the Placement Driver for timestamp allocation and region scheduling, TiFlash's columnar replica for real-time HTAP workloads, and a production migration guide with tradeoffs against CockroachDB, Vitess, PlanetScale, and Aurora.

How Valkey Works Internally: Multi-Threaded I/O, RDMA Networking, and the Fork That Is Replacing Redis in Production
System Design ·

How Valkey Works Internally: Multi-Threaded I/O, RDMA Networking, and the Fork That Is Replacing Redis in Production

A deep-dive into Valkey internals for senior engineers. Covers the Linux Foundation fork origin, the multi-threaded I/O pipeline diverging from Redis 7's model, RDMA networking for data center deployments, cluster slot migration improvements, RESP protocol compatibility, and a production migration guide with tradeoffs against Redis, Dragonfly, KeyDB, and Memcached.

How FoundationDB Works Internally: Ordered Key-Value Storage, Serializable Transactions, and the Simulation Testing Framework That Proves Correctness
System Design ·

How FoundationDB Works Internally: Ordered Key-Value Storage, Serializable Transactions, and the Simulation Testing Framework That Proves Correctness

A deep-dive into FoundationDB internals for senior engineers. Covers the five-role cluster architecture, the optimistic concurrency control protocol driven by the Sequencer, the log-structured storage engine, multi-Paxos coordination, the deterministic simulation testing framework that found hundreds of bugs before release, the layer concept for higher-level data models, and production considerations.

How Supabase Works Internally: PostgREST, GoTrue Auth, Realtime Subscriptions, and the PostgreSQL Platform Architecture
System Design ·

How Supabase Works Internally: PostgREST, GoTrue Auth, Realtime Subscriptions, and the PostgreSQL Platform Architecture

A deep dive into how Supabase stitches together PostgREST, GoTrue, a Realtime server, S3-compatible storage, Deno Edge Functions, and Kong into a coherent backend platform on top of PostgreSQL.