DEV Community

Cover image for ZedGi: call your own Redis, Postgres, and MySQL from serverless over HTTPS
ZedGi
ZedGi

Posted on

ZedGi: call your own Redis, Postgres, and MySQL from serverless over HTTPS

Serverless runtimes are HTTP-first. Redis, Postgres, and MySQL are still TCP.

If you want a Worker, an Edge function, or a Lambda to use the database you already have, you usually get pushed into a vendor HTTP API, a VPN, or a public 5432.

ZedGi is a TCP-to-HTTP access layer instead.

Register host + port (the dashboard never takes the database password).
Call https://your-subdomain.zedgi.app/rpc with the SDK.
A Cloudflare Worker authenticates the request. A Node bridge opens pooled TCP. You get JSON back.
Credentials are encrypted in your app (X25519 + AES-256-GCM) and only decrypted in memory on the bridge. Requests are HMAC-signed with a timestamp and a single-use nonce.

TypeScript
npm install @zedgi/zedgi-client

import { createZedgiClient } from '@zedgi/zedgi-client';

const zedgi = createZedgiClient({
url: 'https://YOUR_SUBDOMAIN.zedgi.app',
key: process.env.ZEDGI_KEY!,
credentials: {
redis: { default: { password: process.env.REDIS_PASSWORD!, db: 0 } },
postgres: {
default: {
user: 'app',
password: process.env.PG_PASSWORD!,
database: 'app',
},
},
},
});

await zedgi.redis().set('hello', 'edge');
const { rows } = await zedgi.postgres().query('SELECT NOW() AS ts');

Python
pip install zedgi

import os
from zedgi import create_client

zedgi = create_client(
url="https://YOUR_SUBDOMAIN.zedgi.app",
key=os.environ["ZEDGI_KEY"],
credentials={
"redis": {"default": {"password": os.environ["REDIS_PASSWORD"], "db": 0}},
},
)

print(zedgi.redis().get("hello"))

Works from Cloudflare Workers, Vercel Edge, Deno, Bun, Node, AWS Lambda, FastAPI, and anything that can send HTTPS. Raw HTTP is documented if you are not using an SDK — it is still signed; it is not anonymous fetch.

Not a hosted database, not a Prisma wire tunnel, not Hyperdrive (Hyperdrive is excellent for Workers + Postgres/MySQL via a binding; ZedGi is multi-runtime and includes Redis).

1,000 requests/day free, then $10 / million, $5 prepaid minimum.

Docs: docs.zedgi.app Playground: zedgi.app/dashboard/playground AI agents: paste Add an agent to my app using instructions from https://zedgi.app/agents.md

Top comments (0)