Series / System Design

System Design for Database Engineers

System design notes centered on data boundaries, failure modes, consistency, queues, caches, backpressure, capacity, and database-backed product workflows.

152 posts System Design

Who This Is For

Backend engineers and senior engineers preparing for system design interviews or designing real systems — focused on the data layer decisions that interviews and design docs routinely get wrong.

What You Will Be Able to Do

  • Explain CAP theorem in operational terms, not theoretical ones
  • Choose the right isolation level for a given consistency requirement
  • Design idempotency and exactly-once semantics across distributed writes
  • Model queue vs cache vs database tradeoffs with specific failure modes for each

Prerequisites

You write backend code and have some exposure to distributed systems concepts. This series fills in the gaps, not the basics.

Start Here

All Posts

15 min read
L3 Reference Guide

MongoDB Index Internals: B-Tree Page Splits, the ESR Rule, and Plan Cache Invalidation

MongoDB's query planner depends on a precisely ordered B-Tree index to avoid COLLSCAN and in-memory sort stages. This post explains B-Tree page split mechanics, the ESR compound index ordering rule, how the plan cache works and when it invalidates, and the diagnostic sequence — from explain() to $indexStats — that identifies which indexes are costing you more than they save.

13 min read
L3 Reference Guide

MongoDB Query Performance Workflow: Deconstructing explain() Plans, Plan Cache Tournaments, and WiredTiger Cache Contention

A comprehensive diagnostic workflow for production MongoDB query degradation. This guide analyzes query planner mechanics, plan cache tournament eviction, WiredTiger ticket starvation, in-memory sort aborts, and index selectivity forensics to identify and resolve query stalls within minutes.

16 min read
L3 Reference Guide

MongoDB WiredTiger Cache Internals: Eviction Pressure, OS Page Cache Interaction, and Working Set Sizing

WiredTiger's internal cache uses direct I/O and holds uncompressed B-Tree pages in a private memory pool separate from the OS page cache. Understanding its eviction thread architecture, reconciliation pipeline, and MVCC update chains is the difference between a MongoDB instance that absorbs working-set growth and one that silently enters foreground eviction — stalling application threads mid-operation.

13 min read
L3 Reference Guide

Hub-and-Spoke Network Topology for Oracle Database@Azure: Isolating Exadata in a Zero-Trust VNet Architecture

Oracle Database@Azure's delegated subnet model breaks naive flat-network designs at scale. This post details the hub-and-spoke VNet topology, Azure Firewall integration, and cross-subscription routing that enables 5,000 microservices to reach Exadata while maintaining zero-trust East-West traffic inspection.

14 min read
L3 Reference Guide

Dual Control Plane Orchestration: Provisioning Oracle Database@Azure Across Microsoft and OCI APIs

Oracle Database@Azure requires coordinated operations across two cloud control planes that have different APIs, authentication models, asynchronous propagation delays, and failure modes. This post details the Temporal-based dual control plane state machine that handles cross-cloud provisioning without orphaned infrastructure.

15 min read
L3 Reference Guide

Zero-Trust Oracle Database Security on Oracle AI Database@AWS: mTLS, Security Groups, and Identity-Bound Access

Oracle AI Database@AWS colocates Exadata hardware on the AWS VPC backbone, eliminating the physical perimeter between application containers and the database. This post details the security architecture — AWS Security Group orchestration, Kubernetes mTLS injection, Oracle TCPS enforcement, and certificate lifecycle automation — that reinstates the zero-trust boundary inside a flat VPC.

14 min read
L3 Reference Guide

Closed-Loop Oracle Remediation: Designing the Human Authorization Mesh for Autonomous Database Agents

Autonomous LLM agents can investigate Oracle incidents, diagnose root causes, and generate precise remediation commands in seconds. Allowing them to execute those commands directly in production is operationally catastrophic. This post details the stateful approval mesh — cryptographic nonce challenge, Okta-verified Slack approval, STS token issuance, and structured action API — that enforces human authorization for every destructive Oracle operation.