Serverless
Definition
Serverless is an application architecture style that reduces or removes the need to manage traditional always-on servers directly. It typically combines managed cloud services with event-driven compute, especially Functions as a Service (FaaS), so teams focus more on business logic and less on infrastructure operations.
Core Ideas
Main Building Blocks
- FaaS — run code in short-lived execution environments, such as AWS Lambda
- BaaS — use managed backend services like authentication, storage, queues, and databases
- Event-driven execution — functions are triggered by HTTP requests, queue messages, file uploads, schedules, or streams
- Managed orchestration — workflows can be coordinated with services like AWS Step Functions
Typical Benefits
- Lower operational overhead — no server patching, fleet management, or manual scaling
- Elastic scaling — capacity grows and shrinks with incoming events
- Faster iteration — small deployable functions support rapid changes
- Cost alignment with usage — many platforms charge per invocation or execution time rather than fixed capacity
Common Trade-Offs
- Vendor dependence — architecture often becomes tied to a cloud provider’s primitives
- Cold starts — sporadic workloads can pay a latency penalty when functions spin up
- Observability complexity — logs, traces, and debugging become harder across many event boundaries
- Execution constraints — short runtimes, stateless execution, and platform limits shape system design
Common AWS Patterns
- API Gateway + Lambda for HTTP APIs
- S3 event notifications triggering processing workflows
- SQS/SNS/EventBridge for decoupled event handling
- Step Functions for multi-step workflows, retries, and branching
- Kinesis for ingestion and stream-oriented data processing
When It Fits Well
- bursty or unpredictable workloads
- event-driven automation
- lightweight APIs and internal tools
- asynchronous data processing pipelines
- teams that want to avoid managing cluster or server infrastructure
When It Fits Poorly
- long-running or stateful workloads
- latency-sensitive systems where cold starts are unacceptable
- platforms with heavy local resource requirements
- workloads where provider lock-in is strategically unacceptable
Relationships
- Cloud & AWS Infrastructure — cloud services provide the building blocks for serverless architectures
- RESTful API — many serverless systems expose HTTP APIs through API gateways
- Microservices — serverless can be used as an execution model for small independently deployed services
- Software Architecture & Distributed Systems — serverless is one of the major distributed application styles in the source notes
- Cloudflare OS — a platform built entirely on serverless primitives (Workers, Durable Objects, R2), and the lock-in that creates
References
- _Serverless Study Index
- AWS Serverless Course
- 7 Serverless