Features
- Serverless PostgreSQL with scale-to-zero
- Database branching for development and CI
- Autoscaling compute based on load
- Built-in connection pooling with pgbouncer
Pros
- True serverless — scales to zero when idle
- Instant database branching for dev/test workflows
- Full PostgreSQL compatibility
Cons
- Cold start latency when scaling from zero
- Storage-compute separation adds some latency
- Newer platform with less production track record
Overview
Neon is a serverless PostgreSQL platform that separates storage and compute, enabling features impossible with traditional PostgreSQL: instant branching, scale-to-zero, and autoscaling. It provides the full PostgreSQL experience with the operational simplicity of a serverless platform.
Neon’s branching feature creates copy-on-write clones of your database instantly, making it trivial to create preview environments, test migrations, or run CI against a real database. When your database isn’t in use, it scales to zero, and you only pay for what you use.
When to Use
Neon is ideal for development workflows that benefit from database branching, for applications with variable traffic that benefit from scale-to-zero, or when you want serverless PostgreSQL without managing infrastructure. It pairs well with Vercel and other serverless platforms.
Getting Started
npm install @neondatabase/serverless
import { neon } from "@neondatabase/serverless";
const sql = neon(process.env.DATABASE_URL);
const users = await sql`SELECT * FROM users WHERE active = true`;