What is Serverless?
By Flavio Copes
Learn what serverless means: you deploy a function to a cloud provider, get a URL to call, and pay only for the requests you serve as it scales automatically.
Serverless is a way to run programs without managing your own server.
You create a function, deploy it to a cloud provider, and you get a URL to call.
When you call that URL, the function runs.
Someone else manages the server, the scaling, the security. There’s no need to worry about kernel updates or moving to the next LTS release of your Linux distribution.
Why people like it
The pricing model is the big draw. Traditionally you rent a VPS (Virtual Private Server) and pay the monthly price regardless of your actual usage.
If someone shares your site in a popular place and traffic spikes, a small VPS might not be able to serve all the requests unless you upgrade to a bigger one. (If you’re facing this kind of problem, I built a free scaling helper that suggests a strategy based on your bottleneck and traffic shape.)
With serverless, you pay for requests rather than for the server. If no one is using your service, you pay nothing, or close to nothing. If 100,000 people jump on your site all at once, the provider adds capacity for you, and you pay for what actually ran.
When done right, it’s also liberating for developers working on their own projects. You are not in charge of the machine, so you are not on call 24/7 for it, and you don’t have to be a sysadmin to run an API endpoint.
Where is the catch?
When I first wrote this post in 2018, every provider had its own implementation and the tooling was rough. That part is solved now. What remains:
- cold starts: after some idle time the first request is slower, because the provider has to start your function again. Cloudflare Workers mostly avoids this because it runs small V8 isolates instead of containers
- lock-in: handlers, limits and APIs differ across providers, so moving later takes work
- reproducing the cloud setup on your laptop is harder than running a Node process, and for logging and debugging you depend on the provider’s tools, not on a shell on your own box
Pricing can also go the wrong way. If your traffic is steady and predictable, a reserved VPS or a small always-on container is often cheaper than per-request billing.
Major players
The main cloud function platforms:
- AWS Lambda
- Azure Functions
- Google Cloud Run functions (formerly Cloud Functions)
- Cloudflare Workers
AWS Lambda is still the reference point. It natively supports Java, Go, PowerShell, Node.js, C#, Python and Ruby, plus any other language through its Runtime API. Their Lambda FAQ is worth a read.
Most web developers never touch those directly. They use a platform that hides the details, like Netlify Functions or Vercel Functions, where a function is just a file in your repository, or a deploy tool like the Serverless Framework.
Cloudflare Workers is a different model: V8 isolates running at the edge instead of Lambda-style containers. This blog runs on Cloudflare Pages, and its few backend endpoints (the newsletter form, the purchase webhook) are Pages Functions, which are Workers under the hood.
When serverless fits
Serverless fits APIs and webhooks with uneven traffic, and jobs that run now and then.
A VPS or a container is simpler when you need long-running processes or WebSocket connections that stay open, when traffic is steady enough that a small always-on box costs less, or when you want the OS and the disk under your control.
Want me to talk about your product? You can sponsor this site.
Related posts about platform: