Buyer’s Guide

Best Serverless Function Platforms

Written by Govind Kumar Lohar. Reviewed for technical accuracy by Deepak Gupta and Bhaskar Suthar on · Review panel

  • hosting
  • serverless
  • lambda
  • cloudflare

Independent buyer’s guide. No vendor paid to be included, ranked or described a particular way. Written for engineers, architects and the people who sign off on their tooling budget. Editorial policy.

Serverless functions are sold on a simple promise: you write a handler, the platform runs it, and you pay for what you use. That promise is accurate and it hides four mechanisms that decide whether a given workload belongs here, and they are the four mechanisms nobody checks during evaluation.

The first is the execution time limit, which is not really about long jobs. It is about what happens to the three or four things in every application that occasionally take much longer than usual, and what the platform does when they exceed the ceiling.

The second is that on most of these platforms, memory is not a memory setting. It is the CPU dial wearing a disguise. Teams size functions by measured memory usage, get CPU-starved functions as a result, and then conclude that serverless is slow. Raising the memory setting frequently makes a function both faster and cheaper, which reads as a contradiction until you see the mechanism.

The third is the concurrency model, which determines whether one instance serves one request at a time or many. That single fact drives your database connection count, your cold start rate and a large part of your bill.

The fourth is the crossover point. Every serverless workload has a traffic level above which a small always-on instance costs less, and it usually arrives earlier than people expect. Knowing where yours sits is a twenty-minute calculation that either validates the architecture or saves you a year of paying a premium for elasticity you are not using.

Key takeaways

  • Memory and CPU are coupled on most of these platforms. A function at a low memory setting gets a fraction of a core, so raising memory can reduce duration enough to reduce total cost, not just latency.
  • The concurrency model decides your database connection count. One invocation per instance means concurrent invocations equal concurrent connections, which is how a function fleet exhausts a Postgres connection limit during a traffic spike.
  • Execution time limits matter less for long jobs than for the occasional slow request. Know what the platform does at the ceiling: a hard kill mid-write is a different problem from a graceful timeout.
  • The crossover to an always-on instance is calculated from aggregate busy-seconds per month, not from request count. Add the per-request charges of the gateway and the log ingestion before comparing.

Execution time limits, and what actually happens at the ceiling

Every platform here has a maximum duration, and the numbers range from well under a second of CPU time on isolate platforms to many minutes of wall-clock time on the container-based ones. Comparing those numbers directly is a mistake, because half of them meter CPU and half meter wall-clock, and a CPU-time budget and a wall-clock budget are not the same resource. Establish which clock before comparing anything.

Three questions matter more than the limit itself.

What does the platform do when you hit it? The answer is usually a hard termination, and hard termination in the middle of a multi-step operation is the interesting failure. If your handler has written to a database, published an event and is about to acknowledge a message when it is killed, you now have a partial effect and a message that will be redelivered. The correct defence is the same as for any at-least-once system, which is idempotency keys on anything with a side effect, but it is worth deciding this deliberately rather than discovering it.

Do you get a warning before the kill? Some runtimes expose remaining time to the handler. Code that checks it and exits cleanly, committing what it can and scheduling the rest, turns a hard failure into a retry. That pattern is worth building into anything that processes a batch, because the batch size that fits today will not fit when the records get larger.

Is there a separate, longer-lived path? Several platforms offer a background or asynchronous function type with a much longer ceiling and no HTTP response. Knowing this exists is often the difference between “serverless does not fit this workload” and “this workload goes in the other function type.”

The practical rule is simple: the ceiling stops being relevant if any piece of work that could approach it is restructured into a queue and a series of short invocations. That restructuring is real work, and it is the honest cost of the model. If the work genuinely cannot be decomposed, because it is a single long-running computation holding state in memory, then the right answer is a container and you should stop trying to fit it here. That trade is worked through in container hosting platforms.

Memory buys CPU, which is why the memory setting is not about memory

This is the mechanism that surprises the most people, and once you see it you re-tune everything.

On the container-based function platforms, the memory setting allocates CPU proportionally. A function configured with a small memory allocation does not get a full core; it gets a slice of one, scheduled proportionally. Increasing memory increases the CPU share, and past a certain point the function gets a full core and then more than one.

The consequences run against intuition:

A CPU-bound function can get cheaper as you raise memory. You are billed roughly on memory multiplied by duration. If doubling the memory halves the duration, the product is unchanged and your latency halved for free. If it more than halves the duration, which happens when the function crosses from a fraction of a core to a full one, the bill goes down and the latency goes down together.

Sizing by measured memory usage produces CPU-starved functions. The natural approach is to watch peak memory, add headroom and set that. For a function that uses little memory but does real work, this guarantees the smallest CPU slice available, and the function is slow for a reason no memory graph will explain.

Cold start is CPU-bound too. Runtime initialisation, module loading and framework bootstrapping are compute. Raising memory speeds up the cold path as well as the warm path, and for an init-heavy runtime that is often the largest available improvement.

Multi-core only helps if your code is parallel. Past the point where a function has more than one core, single-threaded code gains nothing more. A Node handler that awaits sequentially will not use the second core, so the tuning curve flattens and paying for more memory past that point is waste.

The method is mechanical and worth doing properly. Take a representative invocation, run it at several memory settings, and record duration at each. Multiply duration by the memory setting to get a relative cost, and plot both cost and latency. There is almost always a setting that is better on both axes than the default, and the shape of that curve is specific to your function.

Two platforms here do not work this way. Isolate runtimes meter CPU time directly and have no memory dial to speak of, so this entire tuning exercise does not apply. That is a genuine simplification and it comes with a much harder compute ceiling.

Needs first-hand data: Run your three highest-volume functions at several memory settings each and record duration at the median and at the tail. Compute memory multiplied by duration for each setting. Publish the curve internally, because the optimum is rarely the default and nobody will find it by reasoning about it.

Concurrency models, and the database connection problem they cause

There are two concurrency models in this category and the difference has consequences far beyond the compute bill.

One invocation per instance. The classic model. Each execution environment handles exactly one request at a time. If two hundred requests arrive simultaneously, the platform starts two hundred environments. This gives you complete isolation between invocations, a simple mental model, and no shared-state bugs.

Many invocations per instance. The isolate platforms work this way by nature, and several container-based platforms now offer it too, where one instance handles multiple concurrent invocations and you are billed for the instance rather than for the sum of the invocations. For I/O-bound handlers this is much cheaper, because the instance is mostly waiting and the waiting is shared.

The difference shows up in four places.

Database connections. Under one-invocation-per-instance, peak concurrent invocations equals peak concurrent connections, and every one of those environments opens its own pool. A traffic spike therefore arrives at your database as a connection spike, and Postgres in particular handles that badly because each connection is a process with real memory cost. This is the most common serverless outage and it is architectural, not a bug. The fixes are a connection pooler in front of the database, a driver that talks over HTTP rather than holding a socket, or a platform with per-instance concurrency so that many invocations share one pool. The pooler options are covered in Postgres connection poolers and the driver options in serverless databases.

Cold start rate. More instances means more cold starts. A platform that packs many invocations into one instance starts fewer instances for the same traffic, so the same traffic produces fewer cold starts. That is a bigger effect on tail latency than most per-platform cold start differences.

Shared state bugs. Per-instance concurrency reintroduces something serverless removed: two requests running in the same process at the same time. Module-scope mutable state, a global request context, a cache keyed carelessly, all become real bugs again. Most code is fine. The code that is not fine fails intermittently under load, which is the worst way to find out.

Cost shape. Under per-invocation billing, cost scales with request count multiplied by duration. Under per-instance billing with concurrency, cost scales with instance-seconds, which for an I/O-bound service is much lower. This is the same divider that makes concurrency the biggest cost lever on request-billed container platforms.

There is a third mechanism worth naming because it sits between the two: provisioned or pre-warmed instances. You pay for a number of environments to be kept alive regardless of traffic, which removes cold starts for that portion of your concurrency. It is effective and it is the point at which you have started paying for always-on capacity while still paying per-invocation rates on top, which is the most expensive quadrant of this whole category and a strong signal that you are near the crossover.

The crossover: where a small always-on instance wins

Serverless pricing is a premium for elasticity. That premium is excellent value when your traffic is genuinely spiky and terrible value when it is flat, and the crossover point is calculable.

Do it this way.

Compute your aggregate busy-seconds per month. Requests per month multiplied by mean duration, summed across functions. This is the actual compute you consume. Compare it to the number of seconds in a month, which is what an always-on instance sells you. If your aggregate busy-seconds are a meaningful fraction of a month, you are paying elasticity rates for something close to steady load.

Add the charges that are not the compute line. This is where people get the comparison wrong. An HTTP gateway in front of the functions usually bills per request. Logs bill per ingested byte and functions are verbose. A NAT gateway for private network egress bills per hour and per byte, and it is frequently the largest line item in a small serverless architecture. If you are paying for provisioned concurrency, add it at full always-on rates.

Add the other side honestly. An always-on instance needs an operating system somebody patches, a deployment mechanism, a process supervisor, health checks, log shipping and a second instance if you want to survive a reboot. That is a real cost even if it does not appear on the cloud bill, and it is the cost serverless removes. A small team without an on-call rotation should weight this heavily.

Then check the traffic shape, not just the volume. The question is not whether your peak is high; it is the ratio between your peak and your median. A workload that is idle for twenty hours and then processes a burst is exactly what this model is for and will never cross over. A workload serving steady traffic around the clock crosses over early, and the elasticity you are paying for is never exercised.

The honest summary: functions win decisively for spiky, event-driven and low-volume workloads, and for anything where the operational cost of a server is the dominant concern. They lose on steady high-volume traffic, on sustained CPU-heavy work, and on anything that wants a long-lived connection. Most real systems have some of each, and the mature answer is usually both, with the steady core on instances and the bursty edges on functions. The cost side of that comparison across providers is worked in cloud cost compared, and the cheaper always-on end of it in VPS and bare metal providers.

Needs first-hand data: Take one month of real invocation data and compute total billed compute, gateway request charges, log ingestion and any NAT or egress charges, then price the same aggregate busy-seconds on two small always-on instances including a load balancer. Do it per service rather than in aggregate, because the crossover almost always sits differently for each one.

AWS Lambda

Lambda is the reference implementation of the model and still the most complete. It has the widest trigger surface of anything here, with dozens of AWS services able to invoke a function directly, which is what makes it an integration fabric rather than just a compute product. The execution model is one invocation per environment, with provisioned concurrency to pre-warm and a snapshot-and-restore mechanism that materially changes the cold start picture for runtimes with expensive initialisation.

Pros

  • The broadest event source integration available, so a function can be the glue between services without a polling loop or a gateway in between
  • Memory and CPU tuning is well documented and the curve is measurable, which makes cost and latency optimisation a real engineering activity rather than guesswork
  • Snapshot-based startup for slow-initialising runtimes removes most of the cold start penalty for the languages that suffer it worst
  • Per-function IAM roles give fine-grained permissions without a secret in an environment variable

Cons

  • One invocation per environment means concurrent invocations equal concurrent database connections, which requires a pooler or an HTTP-speaking driver before any real traffic arrives
  • The surrounding cost lines, particularly the gateway per-request charge, log ingestion and NAT for private egress, routinely exceed the compute charge in small architectures
  • Regional and VPC configuration is a real project, and a function inside a VPC inherits network setup complexity the simple platforms here do not have

Best for: Teams on AWS building event-driven systems where the function is the glue between managed services, and who can absorb the surrounding networking and IAM configuration.

Pricing: Metered on requests plus GB-seconds of memory multiplied by duration, with a free tier, optional provisioned concurrency billed as always-on capacity, and separate charges for the gateway, logs and network egress.

Cloudflare Workers

Cloudflare Workers homepage

Workers is the isolate model applied to general-purpose functions: no container, no memory dial, no per-instance concurrency to configure because the runtime is concurrent by construction. It meters CPU time rather than wall-clock, which makes I/O-bound handlers extremely cheap, and it deploys to every location by default rather than to a region you pick. The storage and coordination primitives around it are what let it host whole applications rather than only request-path logic.

Pros

  • CPU-time metering means waiting on upstream services is free, so a handler that fans out to several APIs costs roughly what one call costs
  • No cold start in the container sense, since starting an isolate is loading a script rather than booting a sandbox
  • Durable Objects give you a real coordination primitive, which no other platform in this comparison offers as a first-party feature
  • Deployed everywhere by default, so there is no region selection decision and no multi-region deployment pipeline

Cons

  • A hard CPU budget rather than a tunable one, so compute-heavy handlers do not have a memory dial to escape through and must move to Wasm or off the platform
  • No filesystem, no native modules and no raw sockets by default, so the dependency audit is a real gate rather than a formality
  • The storage primitives are Cloudflare-specific, so an application that depends on them is genuinely hard to move

Best for: I/O-bound request handlers, API composition and personalisation logic where the CPU meter is a large saving and the compatibility constraints are acceptable.

Pricing: Metered on requests plus CPU milliseconds with a free tier and a paid plan raising the CPU ceiling, with storage and coordination primitives metered separately.

Vercel Functions

Vercel’s function tier is designed around a framework rather than around events. Routes in your application become functions, the deployment is the build output, and caching and revalidation are part of the same system rather than a layer you configure separately. The notable architectural move is in-function concurrency, where one instance handles multiple invocations and billing follows active compute rather than invocation count, which addresses both the connection-count problem and the cost of I/O-bound handlers.

Pros

  • Concurrency within an instance means I/O-bound routes share an instance, reducing both the connection count and the cost relative to a strict one-per-instance model
  • The deployment workflow, with per-branch previews and instant rollback, is the strongest in this comparison and removes most of the pipeline work
  • Caching, revalidation and the function tier are one mechanism, so a cached route and a dynamic route are configured in the same place
  • Both a Node runtime and an isolate runtime are available per route, so incompatible code has a one-line escape hatch

Cons

  • Deeply coupled to the framework, so the platform’s value drops sharply the further your application sits from its conventions
  • Several metered dimensions across invocations, compute duration, bandwidth and image handling make cost forecasting harder than a single compute meter
  • It is a web application platform rather than an event-processing platform, so non-HTTP triggers are thin compared with the cloud providers

Best for: Teams building a framework web application who want routes, caching and functions as one system and value deployment workflow over infrastructure control.

Pricing: Plan tiers plus usage metering across invocations, active compute duration, bandwidth and image optimisation, with concurrency reducing the compute dimension for I/O-bound routes.

Google Cloud Functions

Google’s function product now sits on the same infrastructure as its container platform, which is the most consequential thing about it. That means the function tier inherits configurable per-instance concurrency, longer execution ceilings and the same request-time or allocated-time billing choice, while keeping the event trigger model and the source-based deployment. In practice it is the container platform with a function-shaped front door, and that is a good place to be.

Pros

  • Configurable concurrency per instance, so an I/O-bound function can share instances and avoid the connection-count explosion of a strict one-per-instance model
  • Shares infrastructure with the container platform, so moving a function to a container later is a smaller step than on most platforms here
  • Event triggers across the Google Cloud surface, including storage, pub-sub and scheduler, without building a polling path
  • Deploys from source without you building an image, while still producing one, which keeps the simple path simple and the escape hatch available

Cons

  • CPU throttling outside requests under the default billing mode breaks background timers and buffered telemetry flushes, and it fails silently
  • The generational split in this product family has left documentation and tooling that still distinguish between them, which is a real source of confusion
  • Regional, so global deployment means running and routing to several deployments yourself

Best for: Teams on Google Cloud who want event-triggered functions with per-instance concurrency and a straightforward migration path to containers later.

Pricing: Metered on vCPU-seconds and GB-seconds with a request-based or instance-based billing choice, plus a per-request charge and a free allowance.

Azure Functions

Azure Functions is built around triggers and bindings, and that model is its real differentiator. Rather than writing code to read from a queue and write to a table, you declare the input and output bindings and the runtime does the plumbing. It supports several hosting models with genuinely different behaviour: a consumption plan that scales to zero, a premium plan with pre-warmed instances and private network access, and a dedicated plan on always-on capacity.

Pros

  • The trigger and binding model removes a large amount of boilerplate for queue, blob, table and event-stream work, and it is the cleanest expression of that pattern in the category
  • Durable Functions provides orchestration and long-running stateful workflows as a first-class feature rather than as a separate service to wire up
  • Multiple hosting plans mean the same code can run scale-to-zero, pre-warmed or always-on, so the crossover decision is a plan change rather than a migration
  • Per-instance concurrency in the host process, so one instance serves multiple invocations and connection counts stay manageable

Cons

  • The plan matrix is genuinely confusing, and the behavioural differences between plans go well beyond price into cold start, networking and scaling semantics
  • Cold starts on the consumption plan are the weak point, and the fix is a plan with pre-warmed instances, which is always-on capacity with a serverless bill on top
  • Strong inside the Azure ecosystem and noticeably less convenient outside it

Best for: Teams on Azure doing queue-driven and event-stream processing, particularly where Durable Functions replaces a workflow engine they would otherwise run.

Pricing: Consumption metering on execution time and memory with a free grant, alongside premium and dedicated plans priced on reserved instance capacity rather than per execution.

Netlify Functions

Netlify Functions are the serverless tier of a site hosting platform, and they are best understood in that context. They exist to give a mostly static or framework-rendered site the dynamic pieces it needs: form handlers, webhooks, API proxies, scheduled tasks. There are synchronous functions with a short ceiling and background functions with a much longer one, which covers the common case where one job takes far longer than a request should.

Pros

  • Zero additional infrastructure for an existing Netlify site, since functions live in the same repository and ship in the same atomic deploy
  • Background functions with a longer ceiling cover the long-job case without adding a queue and a second platform
  • Atomic deploys and instant rollback apply to functions as well as to the site, so a bad function deploy is reversible in one action
  • Scheduled functions are built in, so cron work does not need an external trigger service

Cons

  • Tied to Netlify site hosting, so it is not a general-purpose compute platform and is not useful independently
  • Built on a cloud provider’s function service underneath, so the execution model and its limits are inherited rather than designed, including the one-invocation-per-instance connection behaviour
  • Fewer event trigger types than the cloud providers, so anything beyond HTTP and schedules means bringing another service

Best for: Teams already hosting a site on Netlify who need form handlers, webhooks and API proxies without introducing a second platform.

Pricing: Included in plan tiers with invocation and runtime allowances, metered beyond them, with background functions counted on the same meters.

Deno Deploy

Deno Deploy homepage

Deno Deploy runs functions as isolates with web-standard APIs and TypeScript without a build step. Like Workers it has no memory dial and no per-instance concurrency setting, because concurrency is inherent to the model. Its distinguishing feature within this comparison is the small gap between local development and production, since the runtime is the same binary, plus built-in KV and queue primitives that cover the stateful cases without a second vendor.

Pros

  • TypeScript runs natively with no build configuration, removing an entire class of deployment toolchain from the repository
  • Web-standard APIs mean handlers are largely portable to other isolate runtimes and testable in a browser-shaped harness
  • Built-in KV with transactional operations and queues, so common stateful patterns do not require an external service on day one
  • The same runtime runs locally, so behaviour differences between development and production are configuration rather than emulation gaps

Cons

  • npm compatibility is real but incomplete, and the packages that fail tend to be mature infrastructure libraries that assume a filesystem layout
  • Compute-bound handlers hit the isolate ceiling with no memory dial to escape through, the same constraint as every isolate platform
  • A smaller ecosystem than the cloud providers, so integrations and community answers to a specific error are thinner

Best for: TypeScript teams who want standards-based functions with minimal toolchain and are willing to verify their dependency tree up front.

Pricing: Request and compute metering with a free tier, with the KV and queue primitives metered separately on operations and storage.

How to choose

Start with the trigger, not the runtime. If most of your functions are invoked by a queue, a storage event or a database change rather than by HTTP, the platform’s event source catalogue matters more than anything else on this page, and that narrows you to the cloud providers immediately.

Then check the concurrency model against your database. Write down your expected peak concurrent invocations. Under a one-per-instance model, that is your peak connection count. If it exceeds what your database will accept, you need a pooler, an HTTP driver or a platform with per-instance concurrency, and you need it before launch rather than after the first spike.

Tune memory before comparing prices. Comparing platform rate cards using default memory settings compares nothing. Find each function’s optimal setting on the cost-versus-latency curve first, then compare.

Calculate the crossover. Aggregate busy-seconds per month against an always-on instance, with gateway, log and NAT charges included. If you are already buying provisioned concurrency, you have crossed over and are paying twice.

Only then weigh cold start. It matters for user-facing latency and it is usually fixable with memory, snapshotting, pre-warmed instances or a smaller deployment package, all of which are cheaper than switching platforms. The methodology for measuring it properly is in serverless cold starts compared.

MeterMemory-CPU couplingConcurrency per instanceScale to zeroEvent triggers
AWS LambdaRequests plus GB-secondsYes, proportionalOneYesWidest
Cloudflare WorkersRequests plus CPU timeNo memory dialManyInherentHTTP, queues, cron
Vercel FunctionsInvocations plus active computeManaged by platformManyYesHTTP and cron
Google Cloud FunctionsvCPU and GB-secondsYes, proportionalConfigurableYesBroad
Azure FunctionsExecution time and memory, or planPlan dependentMany, in host processConsumption plan onlyBroad, with bindings
Netlify FunctionsPlan allowance, then meteredInheritedOneYesHTTP and cron
Deno DeployRequests plus computeNo memory dialManyInherentHTTP, queues, cron

If you are gluing managed cloud services together, use that cloud’s function product; the trigger integration is the whole value. If your handlers are I/O-bound HTTP request paths, an isolate platform with a CPU meter will be dramatically cheaper. If you are building a framework web application, use the framework’s host and do not add a platform. And if your traffic is steady around the clock, run the crossover calculation before doing any of this, because the answer may be a pair of small instances behind a load balancer, which the hosting platforms overview puts in context alongside the rest of the category.

Frequently asked questions

Why is increasing my Lambda memory making it cheaper?

Because memory allocates CPU proportionally. At a low memory setting your function gets a fraction of a core, so a compute-bound handler takes longer, and you are billed on memory multiplied by duration. Raising memory increases the CPU share, duration falls, and if it falls by more than the memory rose, the product goes down. This is most dramatic around the point where the function crosses from a fraction of a core to a full one. Measure the curve for your own function; the optimum is rarely the default and it is different per function.

Why does my database run out of connections when traffic spikes?

Because under a one-invocation-per-instance model, every concurrent invocation is a separate process with its own connection pool. A spike to a few hundred concurrent invocations is a spike to a few hundred connections, and Postgres in particular handles that badly because each connection is a backend process with real memory cost. Fix it with a connection pooler in transaction mode in front of the database, a driver that speaks HTTP instead of holding a socket, or a platform that runs multiple invocations per instance so that a pool is shared.

When should I not use serverless functions?

Three cases. Sustained CPU-heavy work, where you are paying elasticity rates for compute you always need. Anything requiring a long-lived connection, such as a WebSocket server or a stream consumer holding position, because the execution model is against you. And steady, predictable traffic around the clock, where the crossover calculation almost always favours an always-on instance. Bursty, event-driven and low-volume workloads are where this model is genuinely and substantially better.

Does provisioned concurrency defeat the point of serverless?

Partly, and it is worth being honest about it. You are paying for capacity to exist whether or not it is used, which is what an always-on instance is, while also paying per-invocation rates on top. It is the right answer when you have a latency requirement on a spiky workload and nothing else meets it. It is a warning sign when it covers most of your steady traffic, because at that point you are buying the most expensive version of both models and the crossover calculation is overdue.