From 356d727a7f8190104739385fb985a2bff4357b70 Mon Sep 17 00:00:00 2001 From: ruheni Date: Mon, 30 Oct 2023 17:58:58 +0100 Subject: [PATCH] add section on differences to consider --- content/300-guides/050-database/890-neon.mdx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/content/300-guides/050-database/890-neon.mdx b/content/300-guides/050-database/890-neon.mdx index b348475c14..581d4dea91 100644 --- a/content/300-guides/050-database/890-neon.mdx +++ b/content/300-guides/050-database/890-neon.mdx @@ -29,6 +29,13 @@ Many aspects of using Prisma with Neon are just like using Prisma with any other - use [`prisma db push`](/concepts/components/prisma-migrate/db-push) to push changes in your schema to Neon - use [Prisma Client](/concepts/components/prisma-client) in your application to communicate with the database hosted by Neon +## Differences to consider + +While Neon is 100% compatible with PostgreSQL, there are a few differences you should be aware of the following when deciding to use Neon with Prisma: + +- **Neon's serverless model** — By default, Neon scales a compute 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 connection pooler** — Neon offers connection pooling using PgBouncer, enabling up to 10,1000 concurrent connections. To learn more, see: [Connection pooling](https://neon.tech/docs/connect/connection-pooling). + ## How to use Neon's connection pooling If you'd like to use the [connection pooling](https://neon.tech/blog/prisma-dx-improvements#providing-pooled-and-direct-connections-to-the-database) available in Neon, you will