ExoStore Serverless PostgreSQL
Managed auto-scaling PostgreSQL 16 engine powered by Neon. Hosted in Singapore (aws-ap-southeast-1) with ~35–60ms low-latency transit to our Mumbai compute, ExoStore separates compute from storage, scales to zero when idle, and provides both connectionless HTTP endpoints and pooled TCP sockets.
Stateless HTTP Data API
Execute SQL queries via HTTPS requests without maintaining persistent TCP socket pools. Prevents connection exhaustion in serverless edge runtimes.
Just-In-Time Leased Credentials
Administrative credentials and access tokens are leased on demand, cached in memory with short TTLs, and never hardcoded in client code or source repositories.
Scale-to-Zero Autosuspension
Compute instances pause automatically after 5 minutes of inactivity to eliminate idle compute billing, resuming transparently upon incoming queries in ~300ms.
Provisioning a Database Cluster
Provision a dedicated PostgreSQL cluster directly from your project console with one click:
- Open your Project Dashboard at
exovon.in/dashboard. - Select the Exostore DB section in the navigation rail.
- Click Provision Database Cluster.
- Exovon provisions an isolated database cluster in Singapore (
aws-ap-southeast-1), initializes schema roles, and injectsDATABASE_URLdirectly into your environment secrets.
Connecting from Your Application
ExoStore supports multiple connection paradigms depending on your framework and runtime requirements:
Zero-Driver HTTP Data API (cURL & Native fetch)
HTTPS POST /sqlExecute SQL statements over standard HTTPS without installing npm packages or establishing TCP socket handshakes. Ideal for edge functions, Cloudflare Workers, microcontrollers, and lightweight scripts:
curl -X POST "https://ep-sample-1234.ap-southeast-1.aws.neon.tech/sql" \
-H "Authorization: Bearer ${DATABASE_PASSWORD}" \
-H "Content-Type: application/json" \
-d '{"query": "SELECT id, email, created_at FROM users LIMIT 5;"}'// Zero-dependency pure fetch query
const response = await fetch(`https://${process.env.PGHOST}/sql`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.PGPASSWORD}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
query: 'SELECT * FROM projects WHERE owner_id = $1',
params: [userId],
}),
});
const data = await response.json();Method 1: Serverless HTTP Driver (Recommended for Next.js)
@neondatabase/serverlessThe serverless HTTP driver dispatches queries over HTTPS (port 443). Because it avoids holding open persistent TCP socket pools, you can run thousands of concurrent Server Actions without hitting PostgreSQL maximum connection limits:
npm install @neondatabase/serverlessimport { neon } from '@neondatabase/serverless';
import { NextResponse } from 'next/server';
export async function GET() {
// DATABASE_URL is injected automatically into container memory
const sql = neon(process.env.DATABASE_URL!);
// Safe tagged template query with automatic parameterized escaping
const users = await sql`
SELECT id, email, created_at
FROM users
ORDER BY created_at DESC
LIMIT 20
`;
return NextResponse.json({ users });
}Method 2: Drizzle ORM (Type-Safe Schema)
drizzle-ormDrizzle ORM integrates with ExoStore via the drizzle-orm/neon-http driver for complete TypeScript type safety without background engine overhead:
// lib/db.ts
import { neon } from '@neondatabase/serverless';
import { drizzle } from 'drizzle-orm/neon-http';
import * as schema from './schema';
const sql = neon(process.env.DATABASE_URL!);
export const db = drizzle(sql, { schema });Method 3: Prisma ORM
prismaWhen pairing Prisma with serverless container instances, use the Pooled Connection URL (port 6543) for runtime queries, and the Direct URL (port 5432) for running schema migrations:
// prisma/schema.prisma
datasource db {
provider = "postgresql"
url = env("DATABASE_URL") // Pooled connection (port 6543)
directUrl = env("DIRECT_DATABASE_URL") // Direct connection for migrations (port 5432)
}
generator client {
provider = "prisma-client-js"
}Connection Endpoints: Pooled vs. Direct
ExoStore clusters provide two distinct endpoints tailored for different database workloads:
Pooled Endpoint (Port 6543)
Routed through an integrated PgBouncer multiplexer. Supports up to 10,000 concurrent client connections using transaction-mode pooling. Use this for all production serverless application traffic, Server Components, and API routes.
Direct Endpoint (Port 5432)
Connects directly to the PostgreSQL compute instance. Required for long-lived operations, session-level variables, LISTEN/NOTIFY commands, and schema migration utilities like prisma migrate or drizzle-kit push.
Scale-to-Zero & Background Polling Guardrails
ExoStore automatically shuts down compute after 5 minutes of inactivity. To preserve this efficiency, applications and autonomous AI agents should observe these guidelines:
Avoid Continuous Background Health Checks
Executing recurring SELECT 1 health checks or telemetry queries every 5–10 seconds prevents compute from autosuspending.
Gate on Cached Endpoint Status
If the cached status is suspended, suppress automated telemetry queries and display the idle state until active user traffic arrives.
Transparent Auto-Wake
When legitimate user traffic reaches the application, the database wakes automatically in ~300ms without requiring manual restart intervention.
Instant Database Branching (Copy-on-Write)
Create isolated database environments in < 3 seconds for staging, previews, and safe migrations.
Preview PR Environments
Spin up an ephemeral database branch with live schemas to test migrations and pull requests safely before merging to production.
Instant Provisioning
Branches are created in seconds using copy-on-write storage pointers, so you never have to wait for full database dumps or restores.
Safe Schema Migrations
Test DDL changes and migrations on a separate branch without risking table locks or downtime for your live users.
Frequently Asked Questions
Where is my database hosted?
ExoStore PostgreSQL clusters are hosted in Singapore with direct low-latency transit to our Mumbai compute. All data is encrypted at rest using AES-256 and in transit via TLS 1.3.
Why should I use the serverless HTTP driver instead of node-postgres?
In serverless environments, container instances scale up and down dynamically. The HTTP driver executes queries statelessly over HTTPS without holding persistent connection slots open, preventing connection exhaustion.
What happens when my database is idle?
When inactive for 5 minutes, compute scales to zero to eliminate unnecessary resource usage. As soon as a new query or user request arrives, the engine resumes automatically in ~300ms.