Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Neon 11 min read Case study mediumAdept

How we systematically improved our reliability

After two control-plane incidents in one week, each triggered by an external dependency failure that turned into a self-reinforcing loop, Neon rebuilt how it runs reliability for Lakebase Postgres across 70+ cells on three clouds. Postmortems now start with quantified impact, track detection and mitigation times, and use branching 5 Whys trees that end in specific, closable action items. The fixes, more than 30 over three months, covered query-plan regressions and long-running transactions in the control-plane Postgres, inherited TCP timeout and connection-pool defaults, and broken backpressure and fairness under load. To catch failures before they reach customers, each change now gets a risk score (probability × impact) that sets how many checks it must pass across design, build, release and operate, including premortems, rollback tests, staged rollouts and on-call drills.

Related posts

  • How Neon's lakebase architecture stays resilient to cloud failures

    Neon mediumAdept

    Neon (and Databricks Lakebase) hardens its serverless Postgres against cloud failures by keeping Postgres compute stateless over zone-redundant storage, so failed computes are replaced instantly without hot standbys or WAL replay. Because agents now start tens of millions of databases daily, the start/suspend path of the control plane is being split into a minimal-dependency data plane controller. Further measures include avoiding cloud provider control planes on the hot path via pre-allocated bare-metal pools and a custom autoscaling virtualization layer, and cell-based regions that limited a May 2026 us-east-1 AZ incident to ~13% of databases. Chaos testing, whole-AZ disconnect simulations targeting under 30s of downtime, and per-database SLIs with 99.99% monthly attainment tracking round out the approach.

  • Failure is inevitable: Learning from a large outage, and building for reliability in depth at Datadog

    Datadog Engineering mediumAdept

    A March 2023 unsupervised global update knocked out connectivity to 50–60% of Datadog's Kubernetes nodes, yet the platform appeared fully down because services were designed to stop rather than show partial data. Instead of only fixing the trigger, Datadog rebuilt for graceful degradation. Changes include persisting data at intake before acknowledging receipt, letting pipelines skip backlogs to serve live data first, retries with backoff and earlier dead-letter queues, Kubernetes PriorityClass and faster autoscaling, removing a shared Cassandra tag cache from the critical path, cluster-local Vault instances, break-glass paths around circular recovery dependencies, and automated chaos testing. The general lessons are to persist early, prioritize real-time data, avoid global control systems, and scrutinize retries and caches.

  • Incident Report: April 23rd, 2025

    Railway mediumAdept

    A Google Cloud SQL maintenance window took Railway's networking control plane Postgres read replica offline for about 10 minutes, destabilizing edge, private networking and TCP proxy traffic across all regions, worst in Asia. Control plane instances crashed on database connection errors because of improper error handling, and each restart evicted the in-memory routing cache, which could not be refetched while Postgres was down. Slow cache warming delayed recovery until 09:28 UTC. Planned fixes include regional control planes to limit blast radius, graceful handling of DB errors, a persistent routing cache as a fallback, faster startup, and Cloud SQL maintenance settings that keep primary and replica from being maintained at the same time.

  • Incident Review: Pageserver outage in us-east-1

    Neon mediumAdept

    A sudden EC2 instance failure took down a Neon pageserver in us-east-1, leaving about 0.4% of projects unable to read uncached pages for 30 minutes to 2 hours. No data was lost because S3 holds durable storage and secondary locations were pre-warmed. Recovery was slow for three reasons: alerting had a human in the loop and took about 30 minutes, a semi-manual script took about 40 minutes to migrate 17,037 projects, and roughly 20 projects with in-flight operations needed manual fixes. The fix is moving all projects to the Storage Controller, a reconciliation-loop scheduler with its own heartbeats that treats every pageserver call as fallible and fails work over in seconds without human intervention.

  • Incident Report: September 22nd, 2025

    Railway mediumAdept

    A schema change removing an unused column was partially reverted by a later code change, breaking a core API and leaving Railway's project canvas stuck loading. After a 15-minute fix, the backlog of queued deployments flooded the Control Plane, whose PgBouncer pooler had been silently upgraded several versions when Railway moved off deprecated Bitnami images. The new version consumed abnormal CPU and memory under load, likely from a changed default configuration. Deployments were shed by tier and the database scaled up, but recovery came only after rolling PgBouncer back, which gave a 100x performance improvement. Follow-ups include CI schema compatibility checks, PgBouncer metrics alerting, phased pooler upgrades, and moving Control Plane storage off Postgres.

The quest for software engineering knowledge.

Look:
Layout: