Skip to content
Back to Blog
Performance8 min read

Cloudflare Workers Performance 2026: 5 Key Benchmarks

Real-world performance comparison between Cloudflare Workers and AWS Lambda across cold-start latency, global response time, pricing, edge caching, and compute limits.

Written by Abdul AbrorTechnical Hosting Support Engineer
Cloudflare Workers Performance 2026: 5 Key Benchmarks
On this page

When a client asks me which serverless platform to host their API on, the conversation always circles back to three things: speed, cost, and where the code actually runs. Cloudflare Workers and AWS Lambda both promise low-latency compute, but they achieve it through fundamentally different architectures.

Workers execute on Cloudflare's edge network in V8 isolates. Lambda runs containerized functions in regional AWS data centers. That architectural split drives every performance difference you'll see in production.

Cold-start latency: isolates vs containers

Cold starts happen when your function hasn't run recently and the platform needs to spin up a fresh execution environment. Lambda uses microVMs or containers, which need to boot an OS, load your runtime, and initialize your code. Workers use V8 isolates that share a single runtime process, so startup is just allocating memory and loading your script.

In my experience handling escalations, Lambda cold starts typically range from 100 ms to several seconds depending on runtime, memory allocation, and package size. A Node.js function with a few dependencies might cold-start in 200-400 ms. Python with heavier libraries can push past a second. Java and .NET regularly hit multi-second cold starts because the JVM and CLR take time to initialize.

Workers cold-start in single-digit milliseconds. The V8 isolate model means your code is running almost immediately after the request arrives. I've seen Workers cold-start consistently under 5 ms in production traces, and Cloudflare's own monitoring shows p99 cold starts well below 10 ms globally.

For APIs that handle sporadic traffic or microservices that wake up on-demand, that difference is the gap between a snappy user experience and a noticeable delay. If you're building webhooks, chat bots, or admin tools that sit idle most of the day, Workers eliminate the cold-start tax almost entirely.

Global response time and edge distribution

Lambda deploys to a specific AWS region. If your function lives in us-east-1 and a user in Sydney makes a request, the round-trip latency to Virginia is baked in. You can deploy the same function to multiple regions and use Route 53 latency routing, but now you're managing parallel deployments and synchronizing state across regions.

Workers deploy to Cloudflare's entire edge network in one push. Your code runs in whichever data center is closest to the request. A user in Tokyo hits the Tokyo edge, someone in Frankfurt hits Frankfurt. There's no routing decision to make and no multi-region deployment complexity.

For read-heavy workloads, edge execution cuts 50-200 ms off every request compared to a regional Lambda. The exact savings depend on where your users are relative to your Lambda region. An API serving global traffic from a single region will see the biggest improvement.

That said, if your function needs to talk to a database or another AWS service, running at the edge can work against you. A Worker in Singapore calling an RDS instance in us-west-2 adds back all the latency you saved by being close to the user. Lambda's tight integration with VPC and other AWS services often makes regional deployment the right choice when your workload is data-intensive.

Pricing: request volume vs execution time

Lambda charges for execution time rounded up to the nearest millisecond, scaled by allocated memory. You pay for every millisecond your function runs, and you pay more per millisecond if you allocate more RAM. The free tier includes one million requests and 400,000 GB-seconds per month, which is generous for small projects.

Workers charge primarily by request count. The free tier includes 100,000 requests per day. Paid plans start with a monthly bundle of requests and charge per-request beyond that. CPU time is capped per request rather than billed directly—your script can run for up to 50 ms on the paid tier and 10 ms on the free tier before it's killed.

For very short functions, Workers are often cheaper. A sub-millisecond function that just rewrites headers or logs a request costs almost nothing on Workers but still incurs Lambda's minimum 1 ms charge. As execution time grows, Lambda's per-millisecond billing can become more cost-effective if you're doing significant compute.

I've seen hosting bills drop by 60-70% after moving lightweight edge logic from Lambda to Workers. Conversely, a customer running image processing tasks saw their costs climb when they tried Workers because the 50 ms CPU limit forced them to split work across multiple requests.

If your function runs longer than 50 ms regularly, Lambda's limits are far more generous. The default timeout is 3 seconds, configurable up to 15 minutes. Workers are built for short, fast tasks.

Edge caching and KV storage integration

Workers integrate directly with Cloudflare's cache and KV storage. You can serve cached responses from the edge without touching your origin, or read from KV for low-latency key-value lookups distributed globally. Cache API access is fast because the cache lives in the same data center as your Worker.

Lambda doesn't have built-in edge caching. You can put CloudFront in front of Lambda@Edge, but now you're managing two separate services and configuring cache behaviors in CloudFront's UI. Lambda@Edge itself runs in CloudFront edge locations, but standard Lambda does not.

For content-heavy APIs or applications that can cache aggressively, the Worker + Cache API combo is hard to beat. I built a marketing site API that served 95% of requests from cache at the edge, with Workers handling cache revalidation and fallback to origin. Response times stayed under 20 ms globally.

Lambda shines when you need relational database access or complex service integrations within AWS. RDS Proxy, Secrets Manager, S3, and DynamoDB are all fast and straightforward from Lambda because they're in the same regional network.

Compute limits and execution environment

Workers run JavaScript, TypeScript, Rust, C, and C++ compiled to WebAssembly. Python support is in beta. The runtime is V8, so you get modern JavaScript features, but no Node.js built-ins unless you polyfill them. No filesystem, no native modules, no child processes.

Lambda supports Node.js, Python, Java, Go, Ruby, .NET, and custom runtimes. You get a real filesystem, environment variables, full standard library access, and the ability to bundle native dependencies. The execution environment is a Linux container, so anything that runs in a container can run in Lambda.

The 50 ms CPU limit in Workers is a hard constraint. Your code can wait on I/O longer than that, but CPU-bound work must finish quickly. Lambda's 15-minute maximum and up to 10 GB of memory let you run batch jobs, video encoding, or ML inference workloads that would be impossible in Workers.

In support tickets, the most common blocker I see with Workers is developers trying to port an existing Lambda function that relies on filesystem access, long-running compute, or a Node.js package that uses native bindings. If your code fits the lightweight, edge-first model, Workers are faster and simpler. If you need a full runtime or significant compute, Lambda is the only option.

So which one should you choose?

If your function is short, stateless, and serves global traffic, Workers will be faster and often cheaper. Use Workers for:

  • API endpoints that return cached or KV-backed data
  • Request routing, header manipulation, and authentication
  • Webhooks and lightweight integrations
  • Static site generation and edge-side rendering

If your function needs deep AWS integration, long execution time, or a full runtime environment, Lambda is the right tool. Use Lambda for:

  • Database-heavy workloads that need VPC access
  • Batch processing, file transformations, or ML inference
  • Applications that depend on native libraries or filesystem I/O
  • Services that integrate tightly with S3, SQS, EventBridge, or Step Functions

I've deployed both in production for years. Workers replaced Lambda for edge logic in almost every project I've touched. Lambda remains the backbone for backend services that talk to RDS, process S3 events, or run longer than a few milliseconds.

Common questions

Can Workers call Lambda or vice versa?
Yes. A Worker can make an HTTP request to API Gateway or a Lambda function URL. Lambda can hit a Worker endpoint just like any other API. Latency depends on where each service runs.

Do Workers support WebSockets?
Yes, through Durable Objects. Standard Workers handle HTTP and can upgrade to WebSocket, but long-lived connections need Durable Objects for state management.

Can I run the same code on both platforms?
Sometimes. If your code is pure JavaScript with no Node.js built-ins and finishes quickly, it might run unmodified. Most real-world Lambda functions need changes to remove filesystem access, native modules, or long execution paths.

Which platform has better observability?
Lambda integrates with CloudWatch for logs, metrics, and traces. Workers log to the dashboard and integrate with third-party observability platforms through Logpush. Both work fine, but CloudWatch is more mature if you're already in AWS.

What makes sense for your stack

Pick Workers when you want the fastest possible response time for global users and your workload fits the edge model. Pick Lambda when your functions need to integrate with AWS services, run longer tasks, or use runtimes and libraries that Workers don't support.

In most hosting setups I manage, the answer is both. Workers handle edge logic, caching, and routing. Lambda handles backend processing, database queries, and integrations. The platforms complement each other well, and using the right tool for each job keeps costs down and performance up.