How Prisma Compute Connects to Prisma Postgres—and What’s Planned
Brief
Prisma Compute apps currently reach Prisma Postgres through its public endpoint, even when both are in the same region. Prisma says an internal network per project is planned, but has no launch date.
Current connection setup
- Use the pooled connection string for application queries and the direct string for migrations and admin tools; both require TLS.
- Compute and Prisma Postgres share six regions. Create both in the same region; a database’s region cannot be changed later.
- Connection strings contain database credentials. Keep them in the project environment, not the repository. If one leaks, create a new credential, switch the app to it, and delete the old one; rotating alone may not invalidate the old password or existing sessions.
Idle apps and the planned network
- A sleeping Compute instance has a measured median resume time of about 30–40 ms; this is not a time-to-first-byte figure.
- The pooler closes pooled connections after 60 idle minutes. Prisma recommends a pool or client that reconnects after a failed connection.
- The planned project-level internal network would let apps and databases communicate privately, with Composer defining access. No date has been announced.
Generated by AI from the original article. Check the source for full details.