Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/docs/content/docs/orm/v6/overview/databases/neon.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Many aspects of using Prisma ORM with Neon are just like using Prisma ORM with a

There are a few differences between Neon and PostgreSQL you should be aware of the following when deciding to use Neon with Prisma ORM:

- **Neon's serverless model**: By default, Neon scales a [compute](https://neon.tech/docs/introduction/compute-lifecycle) to zero after 5 minutes of inactivity. During this state, a compute instance is in _idle_ state. A characteristic of this feature is the concept of a "cold start". Activating a compute from an idle state takes from 500ms to a few seconds. Depending on how long it takes to connect to your database, your application may timeout. To learn more, see: [Connection latency and timeouts](https://neon.tech/docs/guides/prisma#connection-timeouts).
- **Neon's serverless model**: By default, Neon scales a [compute](https://neon.tech/docs/introduction/compute-lifecycle) to zero after 5 minutes of inactivity. During this state, a compute instance is in _idle_ state. A characteristic of this feature is the concept of a "cold start". Activating a compute from an idle state generally takes a few hundred milliseconds, and can take longer if the project has been idle for more than 7 days. Depending on how long it takes to connect to your database, your application may timeout. To learn more, see: [Connection latency and timeouts](https://neon.tech/docs/guides/prisma#connection-timeouts).
- **Neon's connection pooler**: Neon offers connection pooling using PgBouncer, enabling up to 10,000 concurrent connections. To learn more, see: [Connection pooling](https://neon.tech/docs/connect/connection-pooling).

## How to use Neon's connection pooling
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This guide will show you how to deploy the same application, without modificatio

[fly.io](https://fly.io/) is a cloud application platform for deploying and scaling full-stack applications that start on request, on machines near your users. For this example, it's helpful to know:

- Fly.io lets you deploy long-running, "serverful" full-stack applications in [35 regions around the world](https://fly.io/docs/reference/regions/). By default, applications are configured to [auto-stop](https://fly.io/docs/launch/autostop-autostart/) when not in use, and auto-start as needed as requests come in.
- Fly.io lets you deploy long-running, "serverful" full-stack applications in [regions around the world](https://docs.fly.io/reference/regions). By default, applications are configured to [auto-stop](https://fly.io/docs/launch/autostop-autostart/) when not in use, and auto-start as needed as requests come in.
- Fly.io natively supports a wide variety of [languages and frameworks](https://fly.io/docs/languages-and-frameworks/), including Node.js and Bun. In this guide, we'll use the Node.js runtime.
- Fly.io can [launch apps directly from GitHub](https://fly.io/speedrun). When run from the CLI, `fly launch` will automatically configure applications hosted on GitHub to deploy on push.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@ In our example code, the `render.yaml` shows the web service's build command, pr

### 2. Deploy manually

1. In the Render Dashboard, click **New** > **PostgreSQL**. Provide a database name, and select a plan. (The Free plan works for this demo.)
1. In the Render Dashboard, click **New** > **PostgreSQL**. Provide a database name, and select a plan. (The Free plan works for this demo. Render's Free Postgres databases expire 30 days after creation.)
2. After your database is ready, look up its [internal URL](https://docs.render.com/postgresql-creating-connecting#internal-connections).
3. In the Render Dashboard, click **New** > **Web Service** and connect the Git repository that contains the example code.
4. Provide the following values during service creation:
4. Choose a paid compute plan, because Render runs the Pre-Deploy Command only on paid web services. Provide the following values during service creation:

| **Setting** | **Value** |
| :----------------------------------------------------------- | :----------------------------------------------------- |
Expand All @@ -112,7 +112,7 @@ Your web service will be live at its `onrender.com` URL as soon as the build fin

### 3. (optional) Deploy with Infrastructure as Code

You can also deploy the example using the Render Blueprint. Follow Render's [Blueprint setup guide](https://render.com/docs/infrastructure-as-code#setup) and use the `render.yaml` in the example.
You can also deploy the example using the Render Blueprint. Follow Render's [Blueprint setup guide](https://render.com/docs/infrastructure-as-code#setup) and use the `render.yaml` in the example. The example sets the web service to `plan: free`; change it to a paid compute plan so that Render runs the pre-deploy command.

## Bonus: Seed the database

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Serverless PostgreSQL with automatic scaling and branching.
- Connection URL: `postgres://user:pass@host-pooler.region.aws.neon.tech:5432/db`
- Add `-pooler` to hostname for connection pooling (PgBouncer, 10k connections)
- Compute scales to zero after 5 minutes inactivity
- Cold start: 500ms - few seconds
- Compute activation from idle generally takes a few hundred milliseconds, and can be longer after more than 7 days idle
- Database branching for development workflows

**Timeout configuration:** Configure connection and pool timeouts via your [driver adapter](/orm/v7/prisma-client/setup-and-configuration/databases-connections/connection-pool) (e.g. `connectionTimeoutMillis` for `pg`).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This guide will show you how to deploy the same application, without modificatio

[fly.io](https://fly.io/) is a cloud application platform that lets you deploy and scale full-stack applications that start on request, on machines near your users. For this example, it's helpful to know:

- Fly.io lets you deploy long-running, "serverful" full-stack applications in [35 regions around the world](https://fly.io/docs/reference/regions/). By default, applications are configured to [auto-stop](https://fly.io/docs/launch/autostop-autostart/) when not in use, and auto-start as needed as requests come in.
- Fly.io lets you deploy long-running, "serverful" full-stack applications in [regions around the world](https://docs.fly.io/reference/regions). By default, applications are configured to [auto-stop](https://fly.io/docs/launch/autostop-autostart/) when not in use, and auto-start as needed as requests come in.
- Fly.io natively supports a wide variety of [languages and frameworks](https://fly.io/docs/languages-and-frameworks/), including Node.js and Bun. In this guide, we'll use the Node.js runtime.
- Fly.io can [launch apps directly from GitHub](https://fly.io/speedrun). When run from the CLI, `fly launch` will automatically configure applications hosted on GitHub to deploy on push.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@ In our example code, the `render.yaml` shows the web service's build command, pr

### 2. Deploy manually

1. In the Render Dashboard, click **New** > **PostgreSQL**. Provide a database name, and select a plan. (The Free plan works for this demo.)
1. In the Render Dashboard, click **New** > **PostgreSQL**. Provide a database name, and select a plan. (The Free plan works for this demo. Render's Free Postgres databases expire 30 days after creation.)
2. After your database is ready, look up its [internal URL](https://docs.render.com/postgresql-creating-connecting#internal-connections).
3. In the Render Dashboard, click **New** > **Web Service** and connect the Git repository that contains the example code.
4. Provide the following values during service creation:
4. Choose a paid compute plan, because Render runs the Pre-Deploy Command only on paid web services. Provide the following values during service creation:

| **Setting** | **Value** |
| :----------------------------------------------------------- | :----------------------------------------------------- |
Expand All @@ -112,7 +112,7 @@ Your web service will be live at its `onrender.com` URL as soon as the build fin

### 3. (optional) Deploy with Infrastructure as Code

You can also deploy the example using the Render Blueprint. Follow Render's [Blueprint setup guide](https://render.com/docs/infrastructure-as-code#setup) and use the `render.yaml` in the example.
You can also deploy the example using the Render Blueprint. Follow Render's [Blueprint setup guide](https://render.com/docs/infrastructure-as-code#setup) and use the `render.yaml` in the example. The example sets the web service to `plan: free`; change it to a paid compute plan so that Render runs the pre-deploy command.

## Bonus: Seed the database

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Serverless inference endpoints open a new database connection per invocation. At

## Edge-native connectivity

Standard Postgres TCP drivers don't work in Cloudflare Workers, Vercel Edge Functions, or Deno Deploy. Prisma Postgres ships `@prisma/ppg`, a serverless driver that connects over HTTP.
Standard Postgres TCP drivers don't work in Cloudflare Workers, Vercel's Edge runtime, or Deno Deploy. Prisma Postgres ships `@prisma/ppg`, a serverless driver that connects over HTTP.

See [Serverless driver](/postgres/database/serverless-driver) for setup.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ npm install @prisma/ppg

Use the [`PrismaPostgresAdapter`](https://www.npmjs.com/package/@prisma/adapter-ppg) to connect Prisma Client via the serverless driver.

When you generate Prisma Client for an edge runtime, set the generator's [`runtime`](/orm/v7/prisma-schema/overview/generators#field-reference) to the deployment target. For example, use `workerd` for Cloudflare Workers, `vercel-edge` for Vercel Edge Functions, or `deno` for Deno:
When you generate Prisma Client for an edge runtime, set the generator's [`runtime`](/orm/v7/prisma-schema/overview/generators#field-reference) to the deployment target. For example, use `workerd` for Cloudflare Workers, `vercel-edge` for Vercel's Edge runtime, or `deno` for Deno:

```prisma title="prisma/schema.prisma"
generator client {
Expand Down Expand Up @@ -279,7 +279,7 @@ The driver works in server-side environments with `fetch` and `WebSocket` APIs:
| Platform | HTTP Transport | WebSocket Transport |
| --------------------- | -------------- | ------------------- |
| Cloudflare Workers | ✅ | ✅ |
| Vercel Edge Functions | ✅ | ✅ |
| Vercel Edge runtime | ✅ | ✅ |
| AWS Lambda | ✅ | ✅ |
| Deno Deploy | ✅ | ✅ |
| Bun | ✅ | ✅ |
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/docs/postgres/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Current docs: https://www.prisma.io/docs/postgres.md.
Each Prisma Postgres database includes the following, with no extra services to configure:

- **Connection pooling**: a dedicated PgBouncer instance runs alongside your database, with nothing to set up or manage. It also works for serverless and edge deployments. See [Connection pooling](/postgres/database/connection-pooling).
- **Edge and serverless support**: connect from Cloudflare Workers, Vercel Edge Functions, and other edge runtimes via the [serverless driver](/postgres/database/serverless-driver), which uses HTTP instead of TCP.
- **Edge and serverless support**: connect from Cloudflare Workers, Vercel Functions on the Edge runtime, and other edge runtimes via the [serverless driver](/postgres/database/serverless-driver), which uses HTTP instead of TCP.
- **Automated backups** (Starter, Pro, and Business plans): daily snapshots, kept for 7 or 30 days depending on the plan. See [Backups](/postgres/database/backups).

## Local development
Expand Down
Loading