FaaS vs. Traditional Compute Models
What you'll learn: How Function-as-a-Service differs from virtual machines and containers in management overhead, scaling behavior, and cost structure.
The Core Comparison
When you run applications, you have three main compute options: virtual machines (VMs), containers, and FaaS. Each represents a different trade-off between control and convenience.
Management Overhead
VMs require the most hands-on work. You provision the server, install the operating system, apply patches, configure networking, and manage the runtime environment. You're responsible for everything.
Containers reduce this burden. The container runtime handles OS-level concerns, but you still manage the container orchestration platform (like Kubernetes), deployment pipelines, and cluster scaling.
FaaS eliminates infrastructure management entirely. You upload code, and the cloud provider handles servers, scaling, patching, and availability. You never see or manage the underlying compute.
Scaling Behavior
VMs scale slowly—spinning up new instances takes minutes. You typically overprovision to handle traffic spikes.
Containers scale faster (seconds), and orchestrators can add/remove instances based on load, but you define scaling rules and limits.
FaaS scales automatically and instantly—from zero to thousands of concurrent executions without configuration. Each function invocation runs independently.
Pricing Models
VMs charge by the hour/second the instance runs, regardless of actual usage. Idle servers still cost money.
Containers similarly charge for running nodes/clusters, though container density improves efficiency.
FaaS charges only for actual execution time (down to milliseconds) and the number of requests. No executions = zero compute cost (though storage/networking may still apply).
Think of it like transportation: VMs are owning a car (full control, ongoing costs), containers are a car-sharing service (shared infrastructure, better efficiency), and FaaS is a taxi (pay only when you ride).
Key Takeaway: FaaS trades infrastructure control for zero management overhead, instant automatic scaling, and true pay-per-use pricing—ideal when you prioritize development speed over fine-grained optimization.