Home Knowledge Base Neon

Neon is a serverless Postgres database platform that separates storage and compute, offering instant auto-scaling, branching, and a generous free tier designed for modern cloud-native applications that need flexibility without operational overhead.

What Is Neon?

Why Neon Matters

Key Features

Instant Auto-Scaling:

Database Branching:

Connection Pooling:

Point-in-Time Recovery:

Read Replicas:

Quick Start Workflow

# Install CLI
npm install -g neonctl

# Create new project
neonctl projects create --name my-app

# Get connection string for main branch
neonctl connection-string main

# Connect with psql
psql postgresql://user:[email protected]/main

# Create a development branch
neonctl branches create --name dev-feature

# Test changes, then delete when done
neonctl branches delete dev-feature

Development Branching Pattern

<svg viewBox="0 0 351 112" xmlns="http://www.w3.org/2000/svg" style="max-width:100%;height:auto" role="img"><rect x="0" y="0" width="351" height="112" rx="12" fill="#0d1117"/><g font-family="ui-monospace,SFMono-Regular,Menlo,Consolas,&quot;Liberation Mono&quot;,monospace" font-size="14"><text xml:space="preserve" x="20" y="31.7"><tspan fill="#c9d1d9">main (production)</tspan></text><text xml:space="preserve" x="20" y="50.7"><tspan fill="#c9d1d9">  </tspan><tspan fill="#6e7681">├──</tspan><tspan fill="#c9d1d9"> feature-auth (for auth changes)</tspan></text><text xml:space="preserve" x="20" y="69.7"><tspan fill="#c9d1d9">  </tspan><tspan fill="#6e7681">├──</tspan><tspan fill="#c9d1d9"> feature-api (for API changes)</tspan></text><text xml:space="preserve" x="20" y="88.7"><tspan fill="#c9d1d9">  </tspan><tspan fill="#6e7681">└──</tspan><tspan fill="#c9d1d9"> staging (pre-production)</tspan></text></g></svg>

Code Example

// Node.js with Drizzle ORM
import { drizzle } from "drizzle-orm/node-postgres";
import { Pool } from "pg";

const pool = new Pool({
  connectionString: process.env.DATABASE_URL
});

const db = drizzle(pool);

// Queries
const users = await db.select().from(usersTable).where(eq(usersTable.active, true));

// Transactions
await db.transaction(async (tx) => {
  await tx.insert(ordersTable).values(order);
  await tx.update(inventoryTable).set({qty: sql`qty - 1`});
});

Use Cases

Web Applications:

Development Workflows:

Cost-Sensitive Projects:

Multi-Environment:

Global Applications:

Pricing Structure

Free Tier (Generous):

Pro ($19/month):

Business ($69/month):

Scale (Custom):

Integration Ecosystem

ORMs:

Frameworks:

Platforms:

Performance Metrics

Neon vs Alternatives

FeatureNeonRDS AuroraSupabaseRailway
Serverless
Branching
Free Tier
Self-hosted
Easy Setup

Best Practices

1. Use branching: One branch per feature/PR for testing 2. Leverage auto-scaling: Let compute handle traffic spikes 3. Connection pooling: Always use built-in pooling 4. Monitor usage: Track compute hours in dashboard 5. Set up backups: Enable automated backups 6. Use read replicas: Scale reads independently 7. Clean up branches: Delete test branches when done 8. Set scale limits: Prevent runaway costs with compute limits

Common Patterns

Development Workflow: 1. Create branch for feature (neonctl branches create feature-x) 2. Deploy app against branch 3. Run tests on branch 4. Merge to main when approved 5. Delete branch automatically

Multi-Tenant Apps:

Webhooks & Events:

Neon reimagines database infrastructure for the serverless era — eliminating capacity planning headaches while offering Git-like development workflows that make databases as developer-friendly as code repositories.

neonserverlesspostgres

Explore 500+ Semiconductor & AI Topics

From EUV lithography to CUDA optimization — search the full knowledge base or chat with our AI assistant.