Workers vs Lambda vs Cloud Functions vs Edge Functions
Cloudflare Workers run V8 isolates on the edge, cheap and fast but constrained. AWS Lambda runs full Node or other runtimes regionally, flexible but with cold starts and higher cost. Google Cloud Functions sit in the middle. Edge functions from Vercel and others wrap a similar isolate model. The decision is about latency, runtime compatibility, and the cost trajectory.
Written by Yashveer Singh, founder of Yashveer Labs.
What you actually need to know
- Workers: cheapest, fastest cold start, most constrained runtime.
- Lambda: most flexible, full runtime support, highest cost at scale.
- Cloud Functions: in the middle, similar profile to Lambda with GCP integration.
- Edge functions: small, fast, run near the user, narrow use case.
- The decision is about your workload's shape, not which provider is most popular.
| Concern | Workers | Lambda | Cloud Functions | Edge Functions |
|---|---|---|---|---|
| Cold start | Single-digit ms | 100ms-several seconds | 100-500 ms | Single-digit ms |
| Runtime | V8 isolate | Full Node/Python/Go/Java/etc | Full Node/Python/Go/etc | V8 isolate |
| Cost at scale | Lowest | Highest | Middle | Low |
| Geographic reach | Global edge | Regional | Regional | Global edge |
| Best for | Edge logic, high volume | Flexible backend work | GCP-integrated backends | Personalization, auth |
The core argument
The serverless landscape in 2026 is not a single market. It is four different design philosophies competing for different workloads. Treating them as interchangeable is how you end up with the wrong platform for what you are actually building.
Cloudflare Workers are the bet that compute should live on the edge, close to users, in lightweight isolates that start instantly and cost almost nothing. The bet is that you can adapt your code to fit the constraints, and that the latency and cost benefits are worth the adaptation cost.
AWS Lambda is the original bet: full runtimes, flexible code, run anything that runs on Linux. The bet pays off when you need flexibility and are willing to pay for it. The cold start is the cost. The pricing at high volume is the other cost. Both are accepted because the flexibility is genuinely useful.
Google Cloud Functions are a similar bet to Lambda with GCP-specific integration. The choice between them is usually determined by which cloud your data already lives in, not by the function platform's individual merits.
Edge functions from Vercel and others sit in a category close to Workers, with a similar isolate model and similar constraints. The pitch is that they integrate with your hosting platform smoothly, which is real but means you are locked into that platform's ecosystem.
Where each one actually fits
Workers
For high-volume, latency-sensitive work that can fit in an isolate. Authentication. Personalization. API aggregation. Image proxying. Webhook receivers. Workers shine when you have a lot of requests, each one is small, and you want them to run close to users at low cost.
The constraint is the runtime. Many Node packages do not work. The file system does not exist. CPU time per request is limited. Designing around these is straightforward once you accept them. Fighting them is where teams burn time.
Lambda
For backend work that needs the full Node runtime, larger memory, longer execution, or arbitrary libraries. Image processing. PDF generation. Heavy data transformations. Anything where the convenience of a real Node environment outweighs the cost.
Lambda's cold start is the perennial complaint. With provisioned concurrency you can eliminate it for hot paths, but you pay for it. The pricing at high invocation volume is the other concern. At low to medium volume, Lambda is cheap. At very high volume, it gets expensive fast.
Cloud Functions
For teams already on GCP that want serverless compute that integrates with the rest of the platform. The performance profile is similar to Lambda. The integration with GCP services is the reason to pick it over Lambda. The cost is in the same range.
Edge functions
For small, fast logic that runs near users and integrates with your frontend platform. Vercel's edge functions, Netlify's, and others sit in this category. They are great for specific tasks and bad for general backend work. Treat them like Workers for that narrower use case.
How much does it cost
| Workload profile | Workers | Lambda | Cloud Functions | Edge Functions |
|---|---|---|---|---|
| 10M requests/month, light | Free or low tens | 50-200 USD | 50-200 USD | Free or low tens |
| 100M requests/month | Low hundreds | 500-2000 USD | 500-2000 USD | Hundreds |
| 1B+ requests/month | Hundreds to low thousands | Thousands to tens of thousands | Thousands | Hundreds to low thousands |
| Heavy CPU per request | Worse fit | Native fit | Native fit | Worse fit |
| Bandwidth-heavy responses | Best (free egress) | Expensive | Expensive | Best |
The bandwidth difference is the biggest single line item people miss. Cloudflare's bandwidth model means heavy-response workloads on Workers are dramatically cheaper than the same workload on Lambda.
What to weigh before picking
- The shape of your requests. Many small ones favor Workers. Fewer big ones favor Lambda.
- Your data locality. Compute should live near data. Edge functions far from a single-region database often pay round-trip latency that cancels their edge advantage.
- Your team's tolerance for runtime constraints. Workers require adaptation. Lambda runs your existing Node code.
- Your existing cloud commitments. AWS heavy teams default to Lambda. GCP teams default to Cloud Functions.
- Your cost trajectory. At high volume, Workers can be 5-10x cheaper than Lambda for comparable workloads.
Expert opinion
The teams I have seen pick wrong are the ones that picked by familiarity. They used Lambda on the last job, so they used it on this one. The workload they built was perfect for Workers and the bill quintupled when it grew. The choice is not about the platform's popularity. It is about the workload's shape. Spend an afternoon estimating cost and latency on your two best candidates. The right answer is usually obvious once the numbers are on a page.
>
Yashveer Singh, founder of Yashveer Labs
How this played out on a real project
A SaaS team was running a high-volume webhook receiver on Lambda. The receiver did small work, returned 200, and forwarded the payload to a queue. Their bill at peak was nearly 4000 USD a month, almost entirely Lambda invocations.
We moved the receiver to Cloudflare Workers. The code adapted in about half a day. The new bill at the same traffic was under 100 USD a month. The latency to acknowledge improved because Workers were closer to the webhook senders. There was no downside. The previous team had picked Lambda by reflex because their other services were on AWS. For the related platform-level discussion see Vercel vs Netlify vs Cloudflare Pages and the broader Fly.io vs Railway vs Render vs Vercel comparison.
Common mistakes
- Picking the runtime by familiarity rather than fit.
- Running heavy CPU work on Workers and fighting the constraints.
- Running tiny, high-volume work on Lambda and paying 10x what it should cost.
- Putting edge functions in front of a single-region database and losing the latency benefit.
- Underestimating bandwidth costs on Lambda for response-heavy workloads.
- Treating provisioned concurrency as free. It is not.
- Building everything as functions when long-running compute would be cheaper and simpler.
A two week plan to evaluate and migrate
- Days one and two. Pick the workload to evaluate. Document its shape: request size, frequency, CPU profile, dependencies.
- Days three to five. Estimate cost on each of the four runtimes at projected scale.
- Week two. Build a prototype on the top two candidates. Measure latency, cold start, and integration cost.
- End of week two. Pick. Migrate one workload. Validate the numbers.
- Ongoing. Apply the same evaluation to new workloads. The right runtime for one is often wrong for another. The lesson is the same as in the vendor audit every funded startup should run once a year.
Frequently asked
The work I take and why
I take work that compounds. I do not take work that is rework with extra steps. Yashveer Singh, founder of Yashveer Labs. If the topic on this page is what you are dealing with, the question is not whether it can be solved. It can. The question is whether you want to solve it once or four times. I am the person who solves it once.
Posts that line up with this one.
- Comparisons and Vendor Decisions
Inngest vs Hatchet vs Trigger.dev: Async Job Platforms Compared
Three strong async job platforms with meaningfully different architectures. Here is how Inngest, Hatchet, and Trigger.dev compare on developer experience, reliability, and production fit for SaaS teams.
- Comparisons and Vendor Decisions
Inngest vs Trigger vs Temporal for Background Jobs
Temporal is powerful but heavy. Inngest and Trigger are lighter but cover most use cases. Here is how to decide which background job tool fits your stage and complexity requirements.
- Comparisons and Vendor Decisions
Linear vs Jira: A 2026 Decision
Linear and Jira both track engineering work. The decision comes down to team size, process maturity, and how much configuration overhead you can absorb. Here is the practical case for each in 2026.
- Comparisons and Vendor Decisions
Linear vs Shortcut vs GitHub Projects for Engineering Workflow
Three strong issue trackers, three different product philosophies. Here is how Linear, Shortcut, and GitHub Projects compare for engineering teams that want to spend more time shipping and less time in a project management tool.