Software Engineering Glossary

Serverless

Also known as: Serverless Computing FaaS Functions as a Service

Serverless is a cloud execution model where you deploy code and the provider runs it on demand, starting and stopping capacity for you and billing only for the time your code actually runs. Servers still exist, you just never provision, patch, or scale them. The most common form is Functions as a Service, where a short-lived function is triggered by an HTTP request, a queue message, a file upload, or a schedule. AWS Lambda, Google Cloud Run functions, Azure Functions, and Cloudflare Workers are the best known platforms.

Key Takeaways

  • You pay per request and per GB-second of execution, so idle capacity costs nothing. That is the single biggest difference from running containers.
  • Scaling is per invocation. A thousand concurrent events become a thousand execution environments without an autoscaler in the loop.
  • Every function is stateless between invocations. Anything you need to keep goes in a database, an object store, or a message queue.
  • The main costs are cold starts, a hard execution timeout, and connection pressure on downstream databases.
  • Serverless wins on spiky, event-driven, idle-heavy workloads. Containers usually win above roughly 60 percent sustained utilization.

How It Works

  1. An event source such as an API gateway, queue, or storage bucket invokes the function through the platform’s API.
  2. The platform finds a warm execution environment, or creates a new one by downloading the code and starting the runtime.
  3. Initialisation code outside the handler runs once per environment, then the handler runs for this specific event.
  4. After the response, the environment is frozen and kept for a while so the next event can reuse it, then eventually torn down.

Where It Is Used

  • AWS Lambda runs each concurrent execution inside a Firecracker microVM for hardware-level tenant isolation.
  • Cloudflare Workers and Deno Deploy use V8 isolates instead of VMs, which is why their cold starts are sub-millisecond.
  • Meta’s XFaaS platform runs trillions of serverless function calls a day across its own fleet.

Related glossary terms