Runtime APIs
Workers run the Cloudflare-aligned runtime surface in a workerd isolate on this node. For identical APIs, use Workers runtime APIs.
ts
export default {
fetch(request: Request, env: Env, ctx: ExecutionContext): Response {
return new Response("ok");
},
} satisfies ExportedHandler<Env>;Surfaces
| Surface | Cloudflare | open-compute |
|---|---|---|
Handlers (fetch, scheduled, queue) | Handlers | handlers |
Bindings / env | Bindings | bindings |
| Cache API | Cache | cache |
| WebSockets | WebSockets | websockets; hibernation available |
| TCP sockets | TCP sockets | tcp-sockets |
| Node.js | Node.js compatibility | nodejs |
fetch / Request / Response / Streams / HTMLRewriter / Web Crypto / RPC | Runtime APIs | Aligned; not restated here |
| Durable Objects / Alarms | Durable Objects | Durable Objects product pages |
| KV / R2 / D1 / Queues / Workflows | Each product's docs | Matching product pages on this site |
Compatibility
| Topic | Cloudflare | open-compute |
|---|---|---|
fetch / Request / Response / Streams / HTMLRewriter / Web Crypto / RPC | Yes | Yes |
| Alarms, Version Metadata, WebSocket hibernation | Yes | Yes |
| Workers AI / Vectorize and other non-platform products | Yes | Not provided |
Outbound TCP / fetch network policy | Cloudflare hosted policy | See TCP sockets |
| Request-scoped CPU / subrequest quotas | Yes | See Limits |