ABHIJAT
← Back to Writing

Cloud

Cloudflare Workers vs a traditional backend for small APIs

For a genuinely small API, the edge-function model removes more operational weight than it costs in flexibility. That trade flips as the API grows.

Abhijat2026-097 min read6 views

Last updated September 17, 2026

For a small, stateless API — a webhook handler, a lightweight proxy, a rate limiter in front of another service — Cloudflare Workers removes an entire category of operational work that a traditional backend requires, and it's worth being specific about what's actually being traded away to get that.

What disappears

There's no server to provision, no OS to patch, no capacity planning for traffic spikes — a Worker scales from zero to whatever traffic arrives without any of that being your problem. Deployment is close to instant, and the request routes to whichever of Cloudflare's edge locations is nearest the caller, which gets you global low latency without a multi-region deployment you'd otherwise have to build and maintain yourself.

What it can't do

Workers run on the V8 isolate model, not a full Node.js runtime or container — no long-running background processes, no persistent WebSocket connections held open indefinitely (Durable Objects address some of this, but it's a different, more constrained model than a normal long-lived server process), and CPU time per request is capped, which rules out genuinely heavy synchronous compute. An API that needs to hold a database connection pool open across requests, run a long-lived job, or do substantial CPU-bound work per request is fighting the platform, not using it as intended.

Cold starts specifically aren't the issue people expect

Serverless cold starts have a bad reputation from AWS Lambda and similar platforms, where a cold container can add real, user-visible latency. Workers' V8 isolate model is architecturally different — isolates start in a low single-digit number of milliseconds, not the hundreds of milliseconds a cold container can take, because there's no full runtime or OS to boot, just a lightweight isolate spinning up inside a process that's usually already running. Cold starts aren't the reason to avoid Workers for most small-API use cases; they're a reasonable reason to avoid Lambda-style container-based serverless for latency-sensitive small endpoints.

Where the trade flips

The trade point isn't really about traffic volume, it's about compute shape. An API that's mostly I/O — call another service, transform the response, return it — stays a good Workers fit even at meaningful scale, because that's exactly the kind of request the isolate model handles well. An API that needs heavier, sustained compute, long-lived stateful connections, or a persistent connection pool to a database is better served by a traditional backend (containers, a VM, a managed app platform), because Workers' constraints stop being a minor tax and start being the thing you're actively working around.

The practical question worth asking before choosing: does this API's actual workload — not its current size, its shape — fit an isolate model's constraints. If it's fundamentally I/O-bound and stateless, Workers removes real operational weight for very little cost. If it isn't, that operational simplicity gets paid for in workarounds that end up being more effort than just running a normal server would have been.

Tags

CloudflareServerlessBackend