Definition
Serverless computing is a cloud model where developers build and run applications without managing servers. The cloud provider automatically handles infrastructure, scaling, and execution. Developers focus only on writing code, which runs in response to events such as API requests, database updates, or file uploads.
Despite the name, servers are still used, but they are fully managed and abstracted away from the developer. This model helps reduce operational overhead and speeds up development cycles.
Advanced
At an advanced level, serverless platforms execute functions on demand in short-lived containers. This is often called Functions as a Service. Providers such as AWS Lambda, Azure Functions, and Google Cloud Functions manage scaling, resource allocation, and monitoring.
Serverless can also integrate with microservices, APIs, and event-driven workflows. Advanced deployments may use serverless for background tasks, real-time data processing, and IoT applications.
Why it matters
- Eliminates server management overhead.
- Scales automatically with workload demands.
- Reduces costs with pay-per-execution pricing.
- Speeds up development by focusing only on business logic.
Use cases
- Running APIs without dedicated servers.
- Processing file uploads or image transformations.
- Handling real-time data such as logs or analytics streams.
- Automating scheduled tasks or background jobs.
Metrics
- Execution time per function run.
- Cold start latency when functions are first invoked.
- Cost per million executions compared to dedicated servers.
- Uptime and error rates across functions.
Issues
- Cold starts can create delays for infrequently used functions.
- Vendor lock-in due to proprietary serverless platforms.
- Limited runtime control and customisation.
- Complexity when debugging distributed, event-driven systems.
Example
An online store uses AWS Lambda to process payment confirmations. Instead of running a server continuously, the function triggers only when a payment event occurs. This reduces infrastructure costs while maintaining reliability.