Pick your runtime
Workers run on V8 isolates so they boot in under a millisecond — and scale to zero when idle.
export default { async fetch(request) { const url = new URL(request.url); if (url.pathname === "/api/hello") { return Response.json({ msg: "Hello from the edge" }); } return new Response("Not found", { status: 404 }); } };
interface Env { DB: D1Database; } export default { async fetch(req: Request, env: Env): Promise<Response> { const { results } = await env.DB .prepare("SELECT * FROM users LIMIT 10") .all(); return Response.json(results); } } satisfies ExportedHandler<Env>;
from workers import Response async def on_fetch(request, env): return Response.json({"hello": "earth"})
use worker::*; #[event(fetch)] async fn main(req: Request, env: Env, _ctx: Context) -> Result<Response> { Response::ok("Hello from Rust on the edge!") }
Everything Workers can do
Sub‑ms cold starts
V8 isolates start instantly — your users never wait for a container to spin up.
Smart Placement
Workers auto‑run close to your data, your users, or your APIs — whichever is fastest.
Service bindings
Compose Workers like microservices with zero‑latency RPC between them.
Queues
Durable, exactly‑once messaging for background work and fan‑out pipelines.
Workflows
Long‑running, durable execution that survives restarts and resumes from any step.
Cron Triggers
Schedule Workers as cron jobs — no extra infrastructure required.
WebSockets
Native, hibernation‑aware WebSockets backed by Durable Objects.
Streaming responses
Stream LLM tokens, SSR HTML, or media transcodes with first‑class Web Streams support.
Observability
Built‑in logs, metrics, traces and Tail Workers — debug production in real time.
Frontend hosting that ships with every commit.
Connect a Git repo and Cloudflare Pages builds, deploys, and serves your site globally — with preview URLs for every pull request.
- Native support for Next.js, Astro, Remix, SvelteKit, Nuxt, Hono
- Unlimited bandwidth on every plan
- Preview deploys + rollback with one click
- Functions powered by Workers — same runtime, same speed
$ git push origin main ▲ Cloudflare Pages ───────────────────────────────── ✓ Cloning repo (4.2s) ✓ Detected framework: Next.js ✓ Building (38s) ✓ Deploying to global edge (3s) 🌍 Preview: my-site-pr-12.pages.dev 🚀 Production: my-site.pages.dev
Deploy your first Worker in 60 seconds.
The free plan includes 100,000 requests per day. No credit card required.