Neon (database)
Neon is a fully managed, serverless PostgreSQL database platform that separates storage from compute and supports instant, copy-on-write database branching, letting developers create isolated database copies for development, testing, or…
Definition
Neon is a fully managed, serverless PostgreSQL database platform that separates storage from compute and supports instant, copy-on-write database branching, letting developers create isolated database copies for development, testing, or preview environments in seconds without duplicating the underlying data.
Overview
Neon re-architects PostgreSQL for a cloud-native, serverless operating model by splitting the traditional monolithic database into separate storage and compute layers. Compute nodes run standard PostgreSQL but can scale to zero when idle and automatically resume on the next connection, which allows usage-based billing where customers pay for actual compute time rather than a continuously running instance — closer to how serverless functions are billed than traditional always-on database hosting. The defining feature of Neon is branching: because Neon's storage layer is built on a copy-on-write architecture (conceptually similar to how Git branches a codebase), creating a new branch of a database — a full, independently writable copy including all existing data — takes seconds and consumes negligible additional storage until the branch's data diverges from its parent. This makes it practical to spin up a fresh database branch for every pull request, feature branch, or test run, then discard it afterward, addressing a long-standing pain point where realistic database testing required either a shared staging database (with contention and data-pollution risk) or expensive, slow full-copy provisioning. Neon exposes a standard PostgreSQL wire-protocol connection, meaning existing ORMs, drivers, and tools work without modification, alongside a serverless HTTP/WebSocket driver (`@neondatabase/serverless`) optimized for edge and serverless runtimes (like Vercel Edge Functions or Cloudflare Workers) where traditional long-lived TCP connections are impractical or unavailable. Neon competes with other modern managed Postgres providers and is frequently adopted alongside serverless and edge-first application stacks (Next.js, Vercel, Cloudflare) specifically for its branching model and scale-to-zero economics, positioning it as infrastructure well matched to preview-environment-heavy, CI/CD-driven development workflows.
Key Features
- Fully managed, standard-compatible serverless PostgreSQL
- Separates storage and compute for independent scaling
- Compute can scale to zero when idle and auto-resume on connection
- Instant, copy-on-write database branching for dev/test/preview environments
- Standard PostgreSQL wire protocol — existing drivers and ORMs work unmodified
- Serverless HTTP/WebSocket driver optimized for edge runtimes
- Usage-based billing tied to actual compute consumption
- Popular pairing with Vercel, Cloudflare, and other serverless/edge stacks
Use Cases
Alternatives
Frequently Asked Questions
From the Blog
Using database read replicas and connection pooling
Scale reads safely: routing queries to replicas, handling replication lag and read-your-writes, sizing connection pools and spotting pool exhaustion.
Read More Cloud & CybersecuritySQL Injection Explained and How to Prevent It
Understand SQL injection: how attackers exploit database queries, why it happens, and the parameterized-query defense that reliably prevents it every time.
Read More Cloud & CybersecurityWhat Is Caching and How Redis Works
Caching stores frequently used data in fast memory to cut latency and database load. Learn how caching works and why Redis is the go-to in-memory store.
Read More Cloud & CybersecurityWhat Is SQL Injection and How to Prevent It
SQL injection lets attackers manipulate your database by smuggling code into inputs. Learn how it works and how parameterized queries stop it cold.
Read More