Connecting from Applications: Overview
StableRecommendations for drivers, pooling, timeouts, retries, and secrets when connecting through Gateway.
Updated: March 5, 2026
The recommended way for applications to connect to SPG99.
- Drivers: use standard PostgreSQL drivers (
node-postgres,libpq, JDBC,psycopg, and so on). No forks are required. - Pooling: for long-lived services, use a connection pool on the application side or in your framework.
- Serverless / jobs: create a connection per request or per job, then close it. Make sure the first connection supports retry with backoff.
- Timeouts: keep
connect_timeoutin the5–10srange; the first attempt after idle may hit a cold start, so it is important to retry correctly. - Secrets: store the API key separately from
pg_user/pg_password. Only database credentials should be present in the application DSN. - TLS: use
sslmode=requireat minimum; for stricter certificate validation, useverify-full.
The main practical idea is simple: your application should treat SPG99 as a regular PostgreSQL endpoint, while still being ready for a normal cold start after idle.
