Serverless Architecture
Execute functions in response to events without managing servers — the platform handles scaling, patching, and availability.
★★★★★4/5Deployment 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
Vending machine telemetry processed via AWS Lambda — 65% cost reduction
Roomba telemetry pipeline on Lambda processing millions of events/day
Industry adoption
Related principles
Cloud-Native Architecture
Design applications specifically to exploit cloud capabilities: elasticity, managed services, and pay-per-use scaling.
Event-Driven Architecture
LiveServices communicate by producing and consuming events asynchronously through a central event bus or message broker.
API Gateway
LiveSingle entry point for all clients that handles routing, authentication, rate limiting, and protocol translation.