Cloudflare WorkersJavaScriptV8Runtime

Cloudflare Workers: JavaScript Runtime vs V8 Isolates

Understand how Cloudflare Workers' JavaScript runtime works, including V8 isolates, API compatibility, Web APIs, and runtime limitations.

Alex Chen
Alex Chen
July 8, 20269 min read
Also available in:Deutsch · 中文

TL;DR: Cloudflare Workers runs on V8 isolates — lightweight JavaScript execution contexts that are more efficient than Node.js processes. This guide covers the runtime architecture, available Web APIs, Node.js compatibility, and runtime limitations you need to know when building with Workers.


Introduction

Unlike traditional Node.js or Deno runtimes, Cloudflare Workers uses V8 isolates. An isolate is a single V8 execution context that starts in under 5 milliseconds, uses a fraction of the memory of a full Node.js process, and can handle thousands of concurrent requests within a single process. If you're new to Workers, start with our Cloudflare Workers Introduction guide for project setup basics.


Available Web APIs

Workers implements standard Web APIs rather than Node.js APIs:

APIAvailableNotes
fetch()YesGlobal, with extended options
Request/ResponseYesStandard Web API
ReadableStreamYesFull support
CryptoYescrypto.subtle
TextEncoder/TextDecoderYesStandard
URL/URLSearchParamsYesStandard
setTimeout/setIntervalYesLimited to context
Node.js fs, net, httpNoUse Workers APIs

Runtime Limitations

  • No file system access (use R2 or KV)
  • CPU execution limit of 50ms (30s for Unbound) — for heavy processing, see Cloudflare Workers Unbound
  • Memory limit of 128MB
  • No raw TCP/UDP sockets (use Durable Objects)
  • No child processes
  • Maximum response size of 100MB

Conclusion

The V8 isolate architecture gives Workers its speed and efficiency. The trade-off is a limited API surface — no Node.js modules, no file system, no raw sockets. For most web applications, the available Web APIs are sufficient. To see how Workers compare against Lambda@Edge in real-world scenarios, check out our Edge Computing: Workers vs Lambda@Edge guide.