Serverless and edge runtimes are great until your app needs a normal TCP database connection.
ZedGi works with:
-
TypeScript / JavaScript SDK: Cloudflare Workers, Vercel Edge, Deno, Bun, Node.js, AWS Lambda, and any runtime with
fetch. - Python SDK: FastAPI, Flask, Django, scripts, background jobs, AWS Lambda, and other Python services.
- Raw HTTP API: curl, Go, PHP, Ruby, Java, Rust, no-code tools, internal platforms, and any environment that can send signed HTTPS requests.
Cloudflare Workers, Vercel Edge, Deno Deploy, and many other HTTP-first runtimes do not let you open raw TCP sockets directly. That creates an awkward choice:
- Move to a provider-specific serverless database.
- Add a custom backend just to proxy database calls.
- Expose database ports and manage networking yourself.
- Give up on running that part of the app at the edge.
ZedGi is built for the other path: keep your own Redis, Postgres, or MySQL database, but call it from any HTTP runtime.
What is ZedGi?
ZedGi is a TCP-to-HTTP proxy for Redis, Postgres, and MySQL.
You register a database service once, then your app sends signed HTTPS requests to your ZedGi endpoint. ZedGi authenticates the request, routes it to a bridge node, opens the real TCP connection, runs the command or query, and returns JSON.
The basic flow looks like this:
Your app
-> HTTPS request
-> ZedGi gateway
-> bridge proxy
-> Redis / Postgres / MySQL
That means code running in an edge or serverless runtime can still talk to traditional TCP databases without managing VPNs, public database ports, or long-lived connection pools in your function.
Why developers use it
Use the database you already have
ZedGi is not a hosted Redis-only, Postgres-only, or MySQL-only product.
It is designed for teams that already have a database somewhere and want to make it reachable from HTTP-only runtimes.
Supported services:
- Redis
- Postgres
- MySQL
- Custom TCP services (on request)
Works from any HTTP runtime
If your runtime can make an HTTPS request, it can call ZedGi.
That includes:
- Cloudflare Workers
- Vercel Edge Functions
- AWS Lambda
- Deno
- Bun
- Node.js
- Any environment with
fetch
Credentials are not stored in ZedGi
Database credentials are supplied at call time by your application.
The client encrypts the credential payload before it leaves your app. ZedGi stores service metadata like host, port, service type, and optional caller IP allowlist, but not your plaintext database password.
Example: Redis from an edge runtime
Install the client:
npm install @zedgi/zedgi-client
Then call Redis over HTTPS:
import { createZedgiClient } from "@zedgi/zedgi-client";
const zedgi = createZedgiClient({
url: "https://your-subdomain.zedgi.app",
key: process.env.ZEDGI_KEY!,
});
const redis = zedgi.redis({
credential: {
password: process.env.REDIS_PASSWORD,
db: 0,
},
});
await redis.set("edge:hello", "world");
const value = await redis.get("edge:hello");
console.log(value); // "world"
The same pattern works for Postgres and MySQL.
Example: Postgres query
const pg = zedgi.postgres({
credential: {
user: process.env.PG_USER!,
password: process.env.PG_PASSWORD!,
database: process.env.PG_DATABASE!,
ssl: true,
},
});
const { rows } = await pg.query(
"select id, email from users where id = $1",
[userId]
);
Example: MySQL query
const mysql = zedgi.mysql({
credential: {
user: process.env.MYSQL_USER!,
password: process.env.MYSQL_PASSWORD!,
database: process.env.MYSQL_DATABASE!,
},
});
const [rows] = await mysql.query(
"select id, email from users where id = ?",
[userId]
);
What about security?
ZedGi uses a few layers:
- API keys identify the caller.
- Requests are signed to prevent tampering and replay.
- Database credentials are encrypted client-side.
- Optional caller IP allowlisting can restrict which source IP may use a service.
- The proxy bridge only decrypts credentials transiently to open the TCP connection.
The goal is simple: your edge app can call your database, but ZedGi does not become a place where plaintext database passwords sit around.
When ZedGi is useful
ZedGi is a good fit when:
- You want Cloudflare Workers or edge functions to talk to your existing database.
- You do not want to migrate to a vendor-specific serverless database.
- You need Redis, Postgres, and MySQL behind one HTTPS access layer.
- You have a custom TCP service you want to expose through the same HTTPS proxy model.
- You want a dashboard for API keys, services, usage, and billing.
- You need to keep database ports private.
It is especially useful for internal tools, SaaS dashboards, lightweight APIs, queues, webhook workers, and jobs that need database access from serverless environments.
Try it
Create an account, register a service, generate an API key, and make your first call:
๐ https://zedgi.app
Docs:
If you have been avoiding edge/serverless because your database still speaks TCP, ZedGi gives you a practical bridge: keep the database, call it over HTTPS.
Top comments (0)