· Daniel Schleipfer · Backend  · 8 min read

Serverless Computing: Cost Structure, Time-to-Market, and the Limits of the Model

What serverless computing changes about operations and cost, which load profiles it pays off for, and where it hits limits: cold starts, lock-in, steady load.

What serverless computing changes about operations and cost, which load profiles it pays off for, and where it hits limits: cold starts, lock-in, steady load.

What is serverless computing?

Serverless computing is a cloud model in which the provider runs the servers and you deliver only code in the form of individual functions. Billing is based on invocations and compute time consumed, not on provisioned servers. The model fits fluctuating or unknown load. It reaches its limits under steady load, strict latency requirements, or a need for provider independence.

Serverless computing changes two things: who runs the infrastructure and what you pay for. Both affect operational effort, cost structure, and time-to-market. This post describes the mechanics behind it and names the cases where the model does not fit.

How the Model Works

The provider runs the entire server infrastructure. You deliver only the code, as individual functions. The provider executes them whenever an event occurs. That can be an HTTP request, a message in a queue, or an upload to storage. Capacity planning, operating system patches, and scaling are handled by the provider.

The best-known services of this kind are AWS Lambda, Azure Functions, and Google’s Cloud Run functions (known as Google Cloud Functions until August 2024). Billing is based on the number of invocations and the compute time actually consumed, not on provisioned servers.

What Changes in Operations

With a traditional server architecture, you configure machines, set up load balancers, monitor utilization, and adjust capacity. With serverless, these tasks disappear. The platform starts additional instances of a function as load increases and shuts them down as load decreases. This happens without manual intervention, including during sudden traffic spikes.

It is not unlimited, though. Every provider caps how many instances run at once and how fast new ones are added. AWS states a rate of 1,000 new execution environments every ten seconds per Lambda function. If requests arrive faster than that, or the account’s concurrency quota is reached, the additional invocations fail with a throttling error (HTTP 429). For most applications this rate is sufficient. If you expect very steep spikes, you need to know these limits and adjust the quotas in advance.

Monitoring the application itself also stays with you. AWS automatically records invocation counts, durations, and errors for your functions and provides metrics, logs, and tracing. Whether those values indicate a problem, which alarms are needed, and where the cause lies remains your job.

Part of the security work sits with the provider: the operating system and runtime environment are patched and kept current there. Responsibility for your own code, its dependencies, access permissions, and data handling stays with you.

For development teams, this means less time on infrastructure and more time on features that reach the customer. How large this effect is depends on how much operational work your team has carried so far.

How Costs Arise

You pay for invocations and for the compute time your functions actually consume. If nothing runs, nothing is billed, as long as you do not reserve capacity permanently. On Lambda that option is called Provisioned Concurrency. It keeps instances ready at all times and is billed by the configured amount and duration, even without a single invocation. Without such a reservation, there are no servers idling overnight or on weekends that still appear on the invoice.

This model pays off mainly for irregular or hard-to-predict load. Typical cases: applications with clear usage peaks. Internal tools that run only during office hours. Processing steps triggered by an incoming event. New products whose usage nobody can yet estimate. In these cases, traditional operations would require you to provision capacity for the peak and pay for the idle time as well.

Under constant high load, the calculation reverses. More on that below.

Faster Time-to-Market and Avoiding Opportunity Costs

Less infrastructure work shortens the path from idea to first usable version. A team can write a function, deploy it, and test it with real users. It does not have to size servers or set up an operating environment first.

This has an economic side. Every week a product reaches the market later is a week without revenue from that product. And a week without feedback from customers. These opportunity costs do not appear on any invoice, but they are real. Serverless reduces them because the time between development and deployment gets shorter. You start small and invest more only once demand is proven.

Where Serverless Reaches Its Limits

Serverless is not a model for every use case. Four points are worth knowing before you decide.

Cold starts. When a function is invoked after a period of inactivity, the platform first has to spin up a runtime environment. The first call then takes noticeably longer. AWS puts the range for Lambda at under 100 milliseconds to over one second. If a function loads large frameworks or dependencies at startup, it can take several seconds. For applications with strict response time requirements, this is a problem that can be mitigated but not fully eliminated.

Vendor lock-in. Serverless functions are tightly coupled to the provider’s services: its event sources, permission model, databases, and queues. The function code itself can be ported; the wiring around it cannot be moved easily. Switching providers later costs considerably more than with an application running in containers.

Debugging and observability. An application made of many small functions is harder to run locally than a single service. A business transaction spans multiple function invocations, queues, and events. Without distributed tracing, structured logs, and correlation IDs from the start, it is hard to trace where something went wrong when an error occurs. How to solve this for asynchronous processing with Lambda is described in Real-Time Alerts and Zero Data Loss.

Constant high load. Per-invocation billing is cheap as long as utilization fluctuates. If a system runs around the clock under steady high load, this reverses. The same compute work is then usually cheaper on reserved or dedicated capacity. In that case, the price of flexibility exceeds its benefit. The same question, whether steady load justifies your own capacity, comes up with AI models: Hosting Your Own AI Models or Renting?

When Serverless Fits and When It Does Not

Serverless computing moves infrastructure operations to the provider and ties costs to actual usage. This allows a new product to be deployed faster and operated without upfront investment in capacity.

The model fits applications with irregular or still-unknown load and teams that want to hand off operational work. It fits less well for systems with constant high utilization, strict latency requirements, or a need to switch providers at any time. The decision depends on the load profile and the requirements of the specific application. Not on the technology itself.

Frequently Asked Questions

When does serverless computing pay off? For irregular or hard-to-predict load: applications with usage peaks, internal tools used during office hours, event-driven processing, new products with unknown demand. In these cases you pay for actual invocations and compute time instead of provisioned capacity.

Is serverless cheaper under constant high load? Usually not. If a system runs around the clock under steady high load, the same compute work is generally cheaper on reserved or dedicated capacity. Per-invocation billing pays off as long as utilization fluctuates.

What are cold starts and can they be avoided? A cold start is the delay on the first invocation of a function after a period of inactivity, because the platform first has to spin up a runtime environment. AWS puts the range for Lambda at under 100 milliseconds to over one second, and several seconds with large dependencies. Cold starts can be mitigated but not fully eliminated.

Sources

Back to Blog

Related Posts

View All Posts »
What Switching AI Solutions Really Costs

What Switching AI Solutions Really Costs

The simple switching calculation compares a price per user with a price per token. Those are two different things. An honest calculation has five cost blocks and no fixed saving.

Is an AI Model from China a Problem?

Is an AI Model from China a Problem?

The question hides three different questions: where the data goes, how the model behaves, and what the company allows. Only the first one is settled by where the model runs.