edge runtime

Cloudflare Workers

Cloudflare Workers runs JavaScript at the edge of Cloudflare's network. This profile covers what it does, how it is priced, and where it stops being the right choice.

What the product actually does

A Worker is a function deployed to every one of Cloudflare's edge locations at once. A request is handled by the nearest location, which means the latency floor is the network round trip rather than the distance to a region. The runtime is V8 isolates rather than containers, so start-up is measured in milliseconds.

The supporting services are what make it a platform rather than a curiosity: KV for eventually-consistent key-value, Durable Objects for coordination, R2 for object storage without egress fees, and D1 for SQLite at the edge. Each has a specific consistency model that shapes what you can build.

How pricing works once you are inside

Requests and CPU time are the two meters. The important distinction is that CPU time is not wall-clock time: a Worker waiting on a network call is not burning CPU, so an I/O-bound handler is cheap and a compute-bound one is not.

R2 is the pricing decision most teams make deliberately, because it charges no egress. A workload that moves large objects out of S3 and into R2 frequently pays for the migration in a quarter through bandwidth alone.

Where it breaks down

The execution model is restrictive. There is a CPU-time ceiling per request, no persistent filesystem, and limits on simultaneous outbound connections. Code written for Node assumes all three, and porting is real work rather than a config change.

Consistency is the other wall. KV is eventually consistent across locations, so a value written in one region can be read stale in another for up to a minute. Anything needing read-your-writes has to use Durable Objects, which changes the architecture.

What switching costs

Moderate to high. The code is JavaScript, but the platform's primitives — KV semantics, Durable Object coordination, R2 bindings — are the actual application, and they do not exist elsewhere.

Sources

Cloudflare public documentation and pricing page, read October 2026.