Skip to content
Getting Digital

Serverless Computing

Also: serverless, FaaS, functions as a service, edge functions

Serverless computing runs your code only while an event is calling it: the provider conjures an execution environment on demand, throws it away afterwards, and charges for work performed instead of for capacity sitting idle.

Our take. Serverless is a billing model first and an architecture second, and it earns its keep on the event-shaped edges of a system rather than on the main request path of an ordinary website. Our one inflexible rule is that nothing goes to production without a spending alarm attached, because elasticity that absorbs a traffic spike will absorb a bug with exactly the same enthusiasm.

Code that waits for nothing

  • The trigger. An HTTP request, a new file in a bucket, a queue message, a timer. No event means no process, and no process means nothing to pay for.
  • The environment. The platform starts a sandbox holding your runtime and code, passes it the event, and may keep it warm briefly in case another arrives. AWS Lambda, Cloudflare Workers, Azure Functions and Google Cloud Run functions differ in how they build that sandbox, not in the shape of the deal.
  • The meter. Invocations are counted and duration is measured, typically against the memory you asked for, so cost tracks usage instead of uptime. Every provider also caps how long one invocation may run.
  • The amnesia. Local disk and in-memory variables may be gone before the next call, so anything worth keeping belongs in a database, a cache or object storage.

Those four properties explain both the enthusiasm and the complaints. Work that arrives in bursts, completes quickly and remembers nothing fits the model beautifully: webhook receivers, image and video processing, scheduled clean-up jobs, form handlers, the connective tissue between two systems that neither deserves a server of its own. Work that holds long-lived connections, benefits from a warm in-process cache, or must answer instantly after a quiet period fits badly, because an environment built on demand has to exist before it can reply. Cold starts are a genuine characteristic and not a myth, though their size depends on your runtime, your dependency bundle and the platform, so measure yours rather than trusting a blog post. The usual remedies, provisioned concurrency or a floor of always-warm instances, work by reserving capacity in advance, which quietly reintroduces the cost structure you came here to escape. That is a per-endpoint judgement, not a philosophy. It is also worth saying that none of this abolishes operational work, it relocates it: tracing a request across dozens of short-lived executions, granting each function only the permissions it needs, and living with a local development story that never quite matches production.

Cheap until it isn't

The failure mode nobody budgets for is not a big bill from real traffic, it is a small mistake multiplied by unlimited willingness to scale. A retry storm, a recursive trigger, a scheduled job that overlaps itself, a dependency that hangs until the timeout: each turns into invocations that all bill. Set a budget alarm, cap concurrency per function, give retries a dead-letter queue, and make handlers idempotent so a duplicate event is boring rather than expensive.

In practice

Amazon's own introductory Lambda exercise is the canonical shape of this: an image is uploaded to a bucket, the bucket's event notification invokes a function, and the function writes a resized copy to a second bucket. That second bucket is the whole lesson. Write the thumbnail back beside the original and the new object fires the same notification, which invokes the function, which writes another object, and the loop only ends when a human notices or a limit intervenes.

AWS treats that accident as a documented hazard rather than user error: Lambda ships recursive loop detection, which watches for a function invoking itself around a cycle of supported services and stops it. Cloudflare Workers has its own subrequest limits doing comparable work. Useful safety nets, all of them, and none is a substitute for a budget alert you set before the first deploy.

Often confused with

Containers
A container is a portable package that still needs somewhere to run and something to keep it running. A function is an event handler with no lifetime of its own between calls.
PaaS (Platform as a Service)
A platform keeps your application process alive whether or not anyone visits. Serverless deliberately has nothing running between events, which is where both the savings and the cold starts come from.

Key takeaways

  • →Functions run per event and vanish afterwards, so cost follows usage while state has to live somewhere outside the handler.
  • →Bursty, stateless, event-shaped work fits; long-lived connections and latency-critical first requests do not, and warming them back up costs what you were saving.
  • →The dangerous bills come from loops and retry storms rather than from popularity, so alarms and concurrency caps are part of the first deploy.

Related concepts

Certifications that test this

Vendor exams whose syllabus covers this concept — facts, cost and a preparation path on each page.

More courses from these shelves

A rotating selection from the course directory, drawn from the subcategories where this concept is taught rather than picked for it. Details, price and the provider link are on the course page.

Introduction to Cloud Data Analytics with Google BigQuery

This course is designed for the students who are at their initial stage or at the beginner level in learning the data w…

Udemy

Begin with Microservices

In this course, you will learn how to build REST APIs or Microservices using the latest version of Spring Boot), and Mo…

Udemy

AWS EKS (Elastic Kubernetes Service)

The Course is divided into 3 parts -Part 1 - Kubernetes and its objects (Deep Dive). In this part I will talk about Kub…

Udemy

Increasing BDD Code Efficiency

Increasing BDD (Behavior Driven Development) Code Efficiency is all about minimizing your maintenance effort while maxi…

Udemy

Azure Kubernetes Service AGIC Ingress: 30 Real-World Demos

Course Overview Welcome to this Amazing course on Azure Kubernetes Service AGIC Ingress: 30 Real-World Demos. Below is…

Udemy

Monitoring and Maintaining Agent Performance

Are you building, deploying, or managing AI agents and want to ensure they operate at peak performance? Monitoring and…

Udemy

FAQ

Serverless or containers?
Ask who owns the idle time. If a workload is quiet for long stretches and spiky in between, functions mean you stop paying for the quiet. If it runs continuously, needs unusual system libraries, or must keep something in memory between requests, a container on a platform that keeps it alive is simpler and usually cheaper.
Are cold starts still worth worrying about?
On a background job, no. On a checkout page, measure before deciding. Lightweight runtimes and small bundles start faster than heavy ones, and the platforms built on isolates rather than full sandboxes start faster again. Reach for warm instances only on the specific endpoints where a user is watching.
Can a whole website run on it?
Plenty do. A framework such as Next.js deployed to Vercel or AWS Lambda is serverless underneath, with rendering handled per request and assets served from the edge. The wrinkles appear where a site needs persistent connections, very long jobs, or predictable database pooling, all of which have answers, none of which is free.
What happens when a function fails?
That depends on the trigger, and teams routinely skip the question. Asynchronous events are generally retried, so a handler that is not idempotent will do its work twice. Route exhausted retries to a dead-letter queue, log enough to replay them, and remember that a synchronous HTTP invocation simply returns an error to the caller with nothing queued behind it.

Sources

The primary text this definition rests on. Read it before you trust ours.

Last reviewed 14 September 2026 · Getting Digital