“Serverless” does not mean “without servers”: the servers still exist, but the provider manages them. The developer uploads code and subscribes it to events – an HTTP request, a queue message, a file in storage – while the provider starts, scales and maintains it.
How it works
The main form of serverless is functions, FaaS: AWS Lambda, Azure Functions, Google Cloud Run functions. Managed databases and storage that are invoked and billed the same way – by actual usage – are also considered serverless.
| Party | Responsible for |
|---|---|
| Developer | the function code: logic for handling a single event, dependencies, memory and time limits |
| Provider | servers, starting and reusing execution environments, scaling, OS patches |
| Trigger | the event source: HTTP gateway, queue, scheduler, change in storage |
The provider keeps a pool of ready execution environments. If an environment for the function is already up, the call is fast (a “warm start”); if not, the environment is created from scratch, which is a cold start: it adds latency and is billed. According to the AWS Lambda documentation, cold starts affect less than 1% of invocations and last from under 100 ms to over a second; for predictable latency, environments can be kept pre-warmed (provisioned concurrency).
Billing and scaling
- you pay for invocations and running time: in AWS Lambda, the number of requests plus gigabyte-seconds (memory × time); when idle, zero
- scaling from zero: with no events there are no instances at all, and under a spike the provider starts them itself
- limits depend on the provider: in AWS Lambda, memory from 128 MB to 10,240 MB (in 1 MB steps; at 1,769 MB this is one vCPU), an invocation lasts up to 15 minutes by default
- long tasks are not put into a single function – they are split into steps with a chain of invocations or an orchestrator
Example: thumbnails for uploaded images
A user puts a file into object storage – the provider invokes a function and passes it the address of the object. The function creates a 200×200 thumbnail and saves it next to the original. A nightly stream of 10,000 files is handled by parallel invocations, and during the day at zero load there is nothing to pay for.
Sources
the term is written from these pages- What is AWS Lambda? — AWS Lambda Developer Guidedocs.aws.amazon.com/lambda/latest/dg/welcome.html(opens in a new tab)
- Execution environment lifecycle — AWS Lambda Developer Guidedocs.aws.amazon.com/lambda/latest/dg/lambda-runtime-environment.html(opens in a new tab)
- Configure Lambda function memory — AWS Lambda Developer Guidedocs.aws.amazon.com/lambda/latest/dg/configuration-memory.html(opens in a new tab)
Verified 8 Nov