Serverless at the edge
Edge Functions
Edge Functions is Zipper’s isolate runtime. Deploy request handlers that sit in front of origin, rewrite responses, or run on a cron. CPU is billed per invocation; memory is capped per isolate. This is a Cloudflare Cloudflare Workers alternative included on every Zipper plan.
Cloudflare analogue: Cloudflare Workers
What it is
Edge Functions is Zipper’s isolate runtime. Deploy request handlers that sit in front of origin, rewrite responses, or run on a cron. CPU is billed per invocation; memory is capped per isolate.
Cloudflare analogue: Cloudflare Workers. SLA 99.95% · p99 18ms. Admins publish functions. Operators may pause cron.
- ▸V8 isolates
- ▸Scheduled runs
- ▸Service bindings
- ▸No cold-start tax
How it works
Each function is a V8 isolate in front of the zone. CPU is capped per request (default 30ms).
Optional cron runs off the request path. Logs drain into The Watchtower.
Use cases
Concrete ways teams use this service on day one.
A/B header rewrite
Send 10% of traffic a new HTML shell.
- Publish edge-gateway with entrypoint functions/gateway.ts. Read the cookie, rewrite the response.
Nightly purge
Clear /preview/* every night.
- Publish a function with cron `15 2 * * *` that calls the purge API.
Set it up in the dashboard
Dashboard → Services → Edge Functions. Name, entrypoint, optional cron.
API
Control-plane: GET|POST|DELETE /api/v1/functions. Send Authorization: Bearer tz_live_YOUR_TOKEN.
Creates count against the plan quota. A 402 plan_limit means you are at the cap — upgrade or delete an unused resource.
Publish a function
curl -sS -X POST https://tinyzipper.com/api/v1/functions \
-H "Authorization: Bearer tz_live_YOUR_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"name":"edge-gateway","entrypoint":"functions/gateway.ts"}'List the same resource in JavaScript
const res = await fetch("https://tinyzipper.com/api/v1/functions", {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.ZIPPER_TOKEN}`,
"Content-Type": "application/json"
}
});
const json = await res.json();
if (!res.ok) throw new Error(json.error ?? res.statusText);
console.log(json);Tips
Fan-out slow work to Job Queues. Do not wait on third-party HTTP inside the isolate if you can enqueue.
- ▸SOC 2
- ▸Isolate runtime
Runbook
Keep CPU under budget. Fan-out scheduled work through Job Queues. Drain logs to The Watchtower.
Next: Site Hosting · All docs · Create a free account