Build better systems
Deep dives into system design, architecture patterns, and modern engineering practices.
How Mixture of Experts Works: Sparse Gating, Expert Routing, and the Architecture Behind Efficient Large Language Models
A deep dive into MoE architecture: how the gating network routes tokens to experts, top-k selection, load balancing losses, capacity factor, token dropping, expert parallelism for serving, and the real production tradeoffs between dense transformers and sparse MoE models.
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 Rspack Works Internally: Webpack-Compatible Module Graph, Rust Compilation Pipeline, and the Incremental Build Architecture Behind the Fastest Webpack Replacement
A deep dive into Rspack's Rust-based architecture, module graph construction, SWC transformation pipeline, webpack compatibility layer, incremental compilation, and what the tradeoffs look like for teams migrating from webpack.
How Turbopack Works Internally: Incremental Computation, Function-Level Caching, and the Rust-Based Bundler Architecture Behind Next.js
A deep dive into Turbopack's architecture covering the Turbo engine's incremental computation model, function-level caching, Rust-based module resolution, granular HMR invalidation, SWC integration, persistent caching, and how it compares to webpack, Vite, esbuild, and Rspack.
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
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
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
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
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
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
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
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.