Managed Persistence
Provision dedicated PostgreSQL database clusters and high-throughput Redis instances with one-click connection strings.
Supported:PostgreSQL 16Redis 7PgBouncer Connection Pooling
When to Use This Service
Ideal Use Cases
- Relational structured data storage for users, transactions, orders, and business entities (PostgreSQL)
- High-speed session storage, rate limiting, and caching layers (Redis)
- Message queues and pub/sub brokers for asynchronous microservice communication (Redis)
- Applications using ORMs like Prisma, Drizzle, TypeORM, SQLAlchemy, or GORM
When to Choose Another Workload
- Unstructured cold storage or static media files (use S3-compatible object storage instead)
- Client-side direct connections without authentication middleware
How to Use & Deploy
Option 1Deploy via Web Console
- 1Go to 'Databases' in the sidebar navigation.
- 2Click 'Provision Database' and select either PostgreSQL or Redis.
- 3Choose your database name and compute allocation tier.
- 4Once provisioned, copy your direct connection string (DATABASE_URL or REDIS_URL).
- 5Add this connection string to your Backend Microservice or Edge Function environment variables.
Option 2Deploy via CLI & Terminal
Deploy instantly from your local workspace terminal using the global Whizan CLI:
$ whizan db create --type postgresql --name core-dbOr prompt your AI Coding Assistant (Cursor / Antigravity MCP):
“Provision a PostgreSQL database and configure connection string for my backend”
Practical Project Example
db.ts
import { Pool } from "pg";
// Connect seamlessly using the standard DATABASE_URL environment variable
export const pool = new Pool({
connectionString: process.env.DATABASE_URL,
ssl: process.env.NODE_ENV === "production" ? { rejectUnauthorized: false } : false,
max: 10,
idleTimeoutMillis: 30000,
});
export async function query(text: string, params?: any[]) {
const start = Date.now();
const res = await pool.query(text, params);
const duration = Date.now() - start;
console.log("Executed query", { text, duration, rows: res.rowCount });
return res;
}Configuration Reference
| Parameter / Setting | Description | Default / Recommended |
|---|---|---|
| Database Engine | Database engine type (PostgreSQL or Redis) | PostgreSQL |
| Connection Pooler | Integrated connection pooler for serverless concurrency spikes | Enabled |
| SSL / TLS | Enforce TLS encrypted transport for all database queries | Enforced |
Best Practices & Pro Tips
Tip 1Always connect via the pooled connection string when querying from serverless functions to avoid connection exhaustion.
Tip 2Use database migrations (e.g. Prisma Migrate, Alembic) within your deployment pipeline to keep schemas in sync.
