Serverless and functions as a service
In short: With serverless, small functions run only when called. The provider takes care of servers, scaling and billing per call.
In more detail: “Serverless” does not mean no servers exist but that you do not manage them. Examples: AWS Lambda, Vercel Functions, Cloudflare Workers. On demand they start in milliseconds; at rest they cost nothing.
In Depth
- Cold start: The first request after a pause takes longer because the function must start.
- Time limit: Functions run for seconds to minutes.
- Stateless: Nothing stays in memory between calls. Data belongs in a database or cache.
- Connections: Databases need connection pooling or HTTP drivers.
- Cost: cheap under low load; under constant load a server can be cheaper.
- Scheduled tasks: Cron calls start functions at fixed times.
See also: Microservices, Cloud