Scalingfaasfunction as a servicelambdacloud functions

Serverless

Definition

Serverless computing, notably function as a service (FaaS), runs code in response to events or requests on infrastructure the provider operates, scaling instances automatically (including to zero) and charging only for execution time.

In practice

It suits spiky or low-volume workloads, event handlers and glue code: there is no capacity to plan, scaling follows each request, and idle time costs nothing. Platforms such as AWS Lambda, Google Cloud Run functions and Azure Functions handle patching, scaling and availability across zones.

Limits come with it: cold starts, per-account concurrency limits that throttle bursts, execution time caps and no local state between calls. A fleet that scales to 1,000 instances can open 1,000 database connections, so a pooler or database proxy is needed. At steady high load, per-request pricing often costs more than always-on containers.

Example

An image-resizing function triggered by uploads runs 0 instances overnight and 300 at the evening peak, costing a few dollars a day; each instance holds one connection through a proxy instead of opening its own.