All patterns
Cloud & serverless
Serverless (FaaS)
Run functions on demand without managing servers
Upload functions triggered by HTTP, queues, or schedules; cloud provider handles scaling and patching. Great for spiky or infrequent workloads; watch cold starts and vendor coupling.
Growth scalemedium complexity
Architecture diagram
High-level component relationships
Key components
Functions
Stateless handlers with timeout limits
Managed triggers
API Gateway, S3, SQS, EventBridge, cron
Managed data
DynamoDB, RDS Proxy, object storage
IAM & secrets
Per-function least-privilege roles
Data flow
- Request triggers function instance (cold or warm start)
- Function reads/writes managed services, returns response
- Async work offloaded to queue-triggered workers
- Billing per invocation and duration
Pros
- Near-zero ops for scaling and patching
- Pay only for actual usage — cost-efficient at low/spiky traffic
- Fast iteration for APIs and glue logic
Cons
- Cold start latency for user-facing paths
- 15-minute (typical) execution limits
- Debugging and local parity are harder
- Vendor lock-in on proprietary integrations
When to use
- Webhooks, image processing, scheduled jobs
- APIs with unpredictable traffic
- Prototypes and event reactions alongside managed services
When to avoid
- Long-running batch jobs or WebSocket-heavy realtime
- Strict on-prem or multi-cloud portability requirements
- Sustained high RPS where reserved compute is cheaper
Real-world examples
- Image thumbnail pipelines
- Webhook processors
- Scheduled report generators
Related technologies
AWS LambdaAzure FunctionsCloudflare WorkersStep Functions