Skip to content
masterclassBuddyTech Buzz5 fresh blogs · 5:00 AM IST

Neon · 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.

How it works

A pooled Neon connection string targets Neon's PgBouncer pooler rather than Postgres directly. Its hostname contains the -pooler suffix, and the pooler multiplexes many client connections into a smaller set of database connections, making the string suitable for serverless and other high-concurrency workloads.

Syntax

postgresql://user:pass@ep-endpoint-id-pooler.region.aws.neon.tech/database?sslmode=require&channel_binding=require

Key points

  • The pooled endpoint sends traffic through PgBouncer, which reuses database connections instead of opening one Postgres connection per client.
  • Neon's pooler supports as many as 10,000 concurrent client connections, making it a strong default for elastic workloads.
  • The distinguishing marker is -pooler in the hostname.

Common mistakes

  • Use a direct connection for migrations, pg_dump, and session-oriented features such as LISTEN/NOTIFY.

Example: Use a pooled Neon connection string

const connectionString = process.env.DATABASE_URL;

if (!connectionString?.includes("-pooler")) {
  throw new Error("Use a pooled Neon connection string");
}

console.log(connectionString);

Reads a pooled Neon connection string from an environment variable and verifies its hostname marker.

When to use it

Serverless request handling

A serverless function opens a fresh database connection for each request.

High-concurrency workloads

An application must accommodate many simultaneous client connections.

Connection-per-request applications

A web framework creates many short-lived database connections.

Interview questions

QWhat is a Neon pooled connection string used for?

The pooled string routes traffic through PgBouncer and can handle up to 10,000 concurrent client connections. It is intended for serverless applications and workloads that create many short-lived connections.

Follow-up: How can you identify one? Its hostname contains -pooler after the endpoint identifier.

QHow do you obtain a pooled connection string?

In the Neon Console, open Connect, choose the branch, compute, database, and role, enable Connection pooling, and copy the resulting string. The pooled hostname includes -pooler.

Follow-up: How can an existing string be converted? Add -pooler after the ep-... endpoint ID.

QWhen should you avoid the pooled string?

Use a direct connection for migrations, pg_dump, and LISTEN/NOTIFY, because those operations require direct or session-oriented database behavior. Use the pooled endpoint for ordinary serverless application traffic.

Follow-up: What does the pooler do internally? It multiplexes client connections into a smaller number of actual Postgres connections in transaction mode.

  • direct connection
  • Connection pooling
  • PgBouncer
  • Connection pooling toggle
  • Neon Console

Source: Choosing your connection method. Checked 2026-10-16.