Yashveer Singh
Connect
<- All posts
Comparisons and Vendor Decisions12 min read

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.
ConcernWorkersLambdaCloud FunctionsEdge Functions
Cold startSingle-digit ms100ms-several seconds100-500 msSingle-digit ms
RuntimeV8 isolateFull Node/Python/Go/Java/etcFull Node/Python/Go/etcV8 isolate
Cost at scaleLowestHighestMiddleLow
Geographic reachGlobal edgeRegionalRegionalGlobal edge
Best forEdge logic, high volumeFlexible backend workGCP-integrated backendsPersonalization, 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 profileWorkersLambdaCloud FunctionsEdge Functions
10M requests/month, lightFree or low tens50-200 USD50-200 USDFree or low tens
100M requests/monthLow hundreds500-2000 USD500-2000 USDHundreds
1B+ requests/monthHundreds to low thousandsThousands to tens of thousandsThousandsHundreds to low thousands
Heavy CPU per requestWorse fitNative fitNative fitWorse fit
Bandwidth-heavy responsesBest (free egress)ExpensiveExpensiveBest

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

  1. Picking the runtime by familiarity rather than fit.
  2. Running heavy CPU work on Workers and fighting the constraints.
  3. Running tiny, high-volume work on Lambda and paying 10x what it should cost.
  4. Putting edge functions in front of a single-region database and losing the latency benefit.
  5. Underestimating bandwidth costs on Lambda for response-heavy workloads.
  6. Treating provisioned concurrency as free. It is not.
  7. Building everything as functions when long-running compute would be cheaper and simpler.

A two week plan to evaluate and migrate

  1. Days one and two. Pick the workload to evaluate. Document its shape: request size, frequency, CPU profile, dependencies.
  2. Days three to five. Estimate cost on each of the four runtimes at projected scale.
  3. Week two. Build a prototype on the top two candidates. Measure latency, cold start, and integration cost.
  4. End of week two. Pick. Migrate one workload. Validate the numbers.
  5. 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.
FAQ

Frequently asked

Author

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.

Related reading