<arch.design/>
Principles/Serverless Architecture
InfrastructureCloudintermediate2014lambdafaasazure-functionscloud-run

Serverless Architecture

Execute functions in response to events without managing servers — the platform handles scaling, patching, and availability.

4/5
Operates at: Infrastructure level

Deployment platform — Kubernetes, Docker, cloud config

How it works

Serverless (Functions-as-a-Service / FaaS) lets developers deploy individual functions that are invoked by events (HTTP requests, queue messages, timers). AWS Lambda, Azure Functions, and Google Cloud Functions are the main providers.

The platform handles all infrastructure: spinning up containers on demand, scaling to zero when idle, and scaling to thousands of instances under load.

Beyond FaaS, 'serverless' encompasses managed services (DynamoDB, S3, Firestore) where infrastructure management is fully abstracted.

Why it matters

Serverless eliminates server management overhead entirely and offers true pay-per-invocation pricing. For event-driven workloads, it's often 10x cheaper and faster to deploy than equivalent container-based infrastructure.

When to use

  • Event-driven processing: image resizing, webhooks, scheduled jobs
  • Highly variable traffic where scale-to-zero saves cost
  • Teams wanting to focus entirely on business logic

When NOT to use

  • Long-running processes (functions have execution time limits)
  • Workloads requiring persistent connections (WebSocket servers)
  • When cold-start latency is unacceptable

Trade-offs

+

Zero server management, automatic scaling

Cold starts add latency for the first request

+

True pay-per-invocation — scale to zero

Vendor lock-in for function runtime and triggers

+

Fast deployment — push function code, done

Stateless by design — external storage required for state

In production

Coca-Cola

Vending machine telemetry processed via AWS Lambda — 65% cost reduction

iRobot

Roomba telemetry pipeline on Lambda processing millions of events/day

Industry adoption

4/5Widely adopted — mainstream at medium-to-large engineering orgs.

Related principles