Serverless is a model where the cloud provider runs your code on demand, scales it automatically, and bills you only for the execution time. You manage no servers, no containers, no scaling configuration.
It sounds ideal, but it changes how you build. The wins are real; the constraints are real too.
Where serverless shines
The on-demand model fits certain workloads perfectly.
- Spiky or unpredictable traffic: you pay for nothing when idle.
- Event-driven work: queues, webhooks, scheduled jobs, media processing.
- Small teams who want to skip infrastructure entirely.
Where it hurts
- Long-running or memory-heavy workloads get expensive fast.
- Cold starts add latency on infrequent paths.
- Vendor lock-in becomes a real concern.
- Debugging spans services, not one process.
Start with serverless for the event-driven parts of your app — not the core serving path. A hybrid architecture avoids the worst trade-offs.
The middle ground
Cloud Run and similar platforms give you "serverless containers": containerized apps that scale to zero and never charge you for idle time, without rewriting as functions. This is often the best of both worlds.
Serverless FAQ
Is serverless cheaper than a VPS?
For spiky traffic, yes. For constant high traffic, a dedicated server is often cheaper. Measure your load pattern before choosing.
What is a cold start?
The delay when a serverless function spins up for the first time after being idle. It adds latency, which matters for user-facing paths.
