Function as a Service (FaaS)
- Definition: Execution model where provider dynamically manages resources
- Key characteristics:
- Event-driven architecture
- Ephemeral logic (functions) created only when needed
- Pay-per-execution (“no idle resources”)
- Stateless execution
- Time-limited (typically 5-15 minutes maximum)
- Components:
- Function execution environment
- API Gateway for HTTP requests
- Event Sources (message queues, storage events, etc.)
- State Management (external databases, caches)
- Examples:
- AWS Lambda
- Azure Functions
- Google Cloud Run
- Cloudflare Workers
- Benefits:
- Lower costs (precise usage-based billing)
- No servers to manage (reduced complexity)
- Enhanced scalability
- Faster deployment times
- Challenges:
- Cold start latency impacts
- Vendor lock-in through platform services
- Complex state management
- Memory and time constraints