Serverless is a cloud execution model where the provider dynamically manages the allocation of machine resources. Developers focus on writing code, typically in the form of discrete functions (Function-as-a-Service, FaaS), while the cloud platform handles provisioning, scaling, and maintenance. The key differentiator is the pay-as-you-go billing model, where costs are incurred only when the code is executed.
How it works
When an event triggers a function, the provider spins up a container, executes the code, and then shuts down the instance. This process, known as scaling to zero, eliminates costs during idle periods. Common triggers include HTTP requests via API gateways, file uploads to object storage, or scheduled cron jobs. The infrastructure is abstracted, meaning developers do not manage operating systems or runtime environments.
Typical use cases include:
- Real-time file processing and data transformation;
- Backend logic for mobile and web applications;
- IoT data ingestion and stream processing;
- Scheduled administrative tasks and database maintenance.
Technical fact: Cold starts—the latency incurred when initializing a new function instance—can range from 100ms to several seconds depending on the runtime. However, modern providers use pre-warmed instances to mitigate this overhead for high-frequency tasks.