neonConfig | neonConfig configures WebSocket-based Pool and Client connections in Neon’s serverless driver. Use it for settings such as WebSocket construction, pipelining, and proxy behavior. |
fetchConnectionCache | Const |
Branching | Neon branching creates isolated copy-on-write database branches from current or historical states. Child changes are stored independently, enabling safe development, testing, CI/CD, and recovery workflows. |
Database branching | Neon database branching creates isolated copy-on-write clones of a database for development, testing, CI/CD, or recovery. A branch can start from the current or a retained historical state and then diverges independently. |
Compute endpoint | Const |
Autoscaling | Neon Autoscaling adjusts compute resources up or down as database load changes. Set minimum and maximum CU bounds for a primary compute or read replica; scaling occurs without manual intervention or restarts. |
Scale to zero | Neon Scale to Zero suspends an inactive Postgres compute after a timeout and resumes it when a query arrives. It reduces compute usage for intermittently used databases, with a brief startup delay on the first query after suspension. |
Read replicas | Const |
Connection pooling | Neon connection pooling uses PgBouncer in transaction mode to multiplex many client connections over fewer PostgreSQL connections. Select it with a connection string whose endpoint ID has the -pooler suffix; use a direct connection when session state is required. |
PgBouncer | Const |
Point-in-time restore | Const |
Logical replication | Neon logical replication enables PostgreSQL’s publisher-subscriber change streaming for a project. It permanently changes wal_level to logical and restarts all computes when enabled. |
Project | Const |
Role | A Neon role is a branch-scoped PostgreSQL role used for database access and ownership. Neon provides role management through the Console, CLI, API, or SQL, with different default privileges depending on the creation method. |
Connection string | A Neon connection string is a standard PostgreSQL URL containing the selected role, password, hostname, and database name. Obtain it from the Console or CLI, store it as DATABASE_URL, and pass it to a PostgreSQL client. |
Pooled connection | Const |
Direct connection | A direct connection connects straight to Postgres without PgBouncer. Use it for stable, long-lived sessions and operations that require session state, such as migrations or LISTEN/NOTIFY. |
Time Travel queries | Const |
Schema diff | Neon Schema Diff compares the SQL schemas of two branches and displays their differences side by side. It is available in the Console, CLI, API, and GitHub Actions workflows. |
Protected branches | Neon protected branches safeguard production or sensitive data by blocking destructive branch, compute, and project operations. They can also trigger fresh child-branch credentials and optionally restrict access through IP Allow. |
Autosuspend | Const |
IP Allow | IP Allow restricts connections to a Neon project so that only explicitly trusted IP addresses or ranges can connect. It is available on the Scale plan and supports individual addresses, ranges, and CIDR notation. |
Organizations | Const |
Monitoring | Neon’s Monitoring dashboard in the Console presents system and database metrics as graphs. Choose a branch and compute, then use the Postgres, Storage, or Functions tabs to inspect the relevant data. |
Neon Auth | Const |
Neon RLS | Neon RLS uses PostgreSQL Row-Level Security to restrict table rows according to the authenticated user. Tables exposed through the Neon Data API must have RLS enabled and policies configured. |
JWT authorize | Neon authorizes end users through the Data API with JWTs. The token determines the PostgreSQL role used for the query, while GRANT permissions and Row-Level Security control access. |
Stack Auth integration | Const |
Vercel integration | Const |
Drizzle integration | Drizzle integrates with Neon by using Neon's serverless driver as Drizzle's database backend. In serverless applications, create a client with @neondatabase/serverless and pass it to Drizzle's Neon HTTP adapter. |
Prisma integration | Connect Prisma ORM to Neon with @prisma/adapter-neon. Use a pooled URL for application queries and a direct URL for Prisma CLI operations such as migrations and schema pushes. |
HTTP driver | Neon’s HTTP driver uses the neon() function from @neondatabase/serverless to issue Postgres queries through HTTP fetch requests. It is designed for serverless and edge runtimes, especially for single queries and non-interactive transactions. |
WebSocket driver | The Neon serverless driver supports WebSocket-based PostgreSQL access through Pool and Client. Use this transport for interactive transactions, sessions, or node-postgres compatibility; use HTTP by default for simpler queries. |
Postgres.js | Const |
node-postgres | Const |
serverless driver | Neon’s serverless driver lets JavaScript and TypeScript applications query Postgres from serverless and edge runtimes over HTTP or WebSockets. Use neon() over HTTP by default, reserving Pool or Client for sessions, interactive transactions, or pg compatibility. |
Compute units | Compute Units (CUs) measure the size and processing capacity of a Neon compute. Each CU provides approximately 4 GB of RAM plus associated CPU and local SSD resources. |
Autoscaling range | An autoscaling range defines the minimum and maximum Compute Units for a Neon compute. Neon scales within those bounds as workload changes, subject to an 8 CU maximum spread. |
Suspend timeout | suspend_timeout_seconds sets the inactivity delay before a Neon compute scales to zero. The default is 300 seconds; supported plans can customize it, disable suspension with -1, or use 0 for the plan default. |
Primary branch | In current Neon terminology, “primary branch” is called the project’s default branch. It is the root branch created with each project and serves as the normal origin for new branches. |
Default branch | Neon’s default branch is the project’s designated branch for default workflows and implicit branch creation. It starts as the root branch, but you can move the designation to another existing branch. |
Branch reset | Const |
Branch restore | Const |
Schema-only branch | A schema-only branch copies a source branch's database structure without its row data. It is useful for safe development and testing with sensitive datasets. |
Database roles | Neon database roles are branch-scoped PostgreSQL roles used as login users or privilege groups. Roles created through Neon management interfaces receive neon_superuser membership; SQL-created roles require explicit permission grants. |
SCRAM authentication | Neon supports SCRAM-SHA-256-PLUS through channel_binding=require. It binds mutual authentication to the TLS channel, helping protect connections from man-in-the-middle attacks. |
Pooled endpoint port | Neon’s pooled endpoint uses port 5432, the default PostgreSQL port. Choose it with a hostname ending in -pooler; the endpoint uses PgBouncer in transaction mode for high-concurrency workloads. |
Direct endpoint | DATABASE_URL_UNPOOLED is Neon’s direct PostgreSQL connection string. Use it for migrations and other operations that require a non-pooled connection. |
Allowed IPs | Const |
Project sharing | Project sharing lets a project owner invite external Neon accounts to collaborate on one project through the Console, API, or CLI. It does not grant organization membership or project-deletion rights. |
Organization billing | Neon's organization Billing page in the Console centralizes charge review, payment details, invoices, plan changes, and billing support. Open it by selecting an organization from the profile menu and choosing Billing. |
Usage metrics | Const |
Compute hours | Compute hours measure Neon compute usage. Calculate them by multiplying compute size in Compute Units by the number of active hours. |
Data transfer | Data transfer is Neon’s measure of traffic sent through the Neon proxy. It distinguishes public internet egress from bidirectional private-network transfer. |
Storage GB-month | A GB-month is Neon’s unit for storage: one gigabyte retained for one month. Usage reflects both stored amount and retention time, so shorter retention produces proportionally fewer GB-months. |
API keys | Neon API keys are bearer tokens for authenticating Neon REST API requests. They come in personal, organization, and project-scoped forms; store the token securely because it is displayed only once. |
Neon Local | Neon Local is a Docker proxy that exposes a local Postgres endpoint for a Neon cloud branch. It can target an existing branch or create and clean up an ephemeral branch automatically. |
Vercel Postgres | Neon's serverless driver replaces the Vercel Postgres SDK with a client for serverless and edge applications. Its HTTP API handles one-shot queries, while WebSocket-based classes support sessions and interactive transactions. |
Cloudflare Hyperdrive | Cloudflare Hyperdrive connects Cloudflare Workers to Neon Postgres through a globally distributed connection pool. It lets Workers use standard PostgreSQL drivers while reducing connection setup latency. |
Drizzle Kit | Drizzle Kit is the CLI companion used with Drizzle ORM to manage schema migrations for a Neon Postgres database. Configure it in drizzle.config.ts, generate migration SQL, and apply those migrations with the CLI. |
Prisma migrate | Neon’s Prisma Migrate workflow uses a pooled connection for application runtime and a direct connection for Prisma CLI schema changes. Generate and test migrations with migrate dev; apply committed migrations in production with migrate deploy. |
Logical replication publication | Const |
Subscriber | In Neon logical replication, a subscriber is the destination database or platform that receives an initial data copy from a publisher and then ongoing row-level changes through a subscription. |
Read-only compute | A read-only compute is an independent Neon compute for read operations against the same storage used by a primary read-write compute. It adds read capacity without duplicating database storage. |
Anonymized branch | Creates a Neon branch containing statically masked data through PostgreSQL Anonymizer. Optional masking rules and automatic anonymization can be supplied in the same request. |
Branch protection | Neon branch protection safeguards critical branches such as production from deletion, reset, project deletion, compute deletion, and inactivity archiving. It also generates fresh Postgres role passwords for child branches and can work with IP Allow restrictions. |
Autosuspend delay | Const |
Connection string pooled | A pooled Neon connection string routes through PgBouncer and has -pooler in its hostname. Use it by default for serverless applications and high-concurrency workloads. |
Connection string direct | A direct Neon connection string connects straight to Postgres without the pooler. In the Connect modal, disable Connection pooling to obtain it; use it for migrations, pg_dump, and LISTEN/NOTIFY. |