Counting the Milliseconds: Where Serverless Actually Wins on Price in 2025
Photo: cloud computing cost analytics dashboard on monitor, via img.freepik.com
Every infrastructure decision is ultimately an argument about the future, and few arguments are as persistent as serverless versus containers. The 2025 versions of the platforms are mature, the pricing pages are transparent, and yet most teams still make this call on vibes. Let's try math instead.
The Setup
Consider a hypothetical startup based in Austin — call it a B2B SaaS company running a REST API behind a typical US traffic profile: business-hours-weighted, with modest spikiness around product launches. We'll compare two realistic stacks:
Serverless: A managed functions platform billed per request and per gigabyte-second of compute, plus an API gateway charging roughly $1 per million requests, plus data transfer.
Containers: A small set of always-on container instances behind a load balancer — the smallest configuration that handles peak load with headroom, which for most teams means two to three modest instances running continuously.
We'll sweep monthly request volume from 10,000 to 10 million and hold average execution at a fairly typical 200ms at 1GB of memory.
The Numbers
At 10K requests/month: Serverless is nearly free — single-digit dollars including gateway fees. Containers cost $30–60 for instances that sit 99% idle. Serverless wins by an order of magnitude, and no amount of reserved-instance discounting changes that at this scale.
At 100K requests/month: Serverless lands around $5–15 depending on memory settings. Containers still cost the same $30–60 floor, because idle capacity is the product you're buying. Serverless wins comfortably.
At 1M requests/month: This is where the conversation gets interesting. Serverless compute runs roughly $40–80, gateway adds $10–20, and data transfer closes the gap with the container bill, which has now crept to $70–120 once you account for load balancing. The two options are within shouting distance of each other. Break-even for this traffic shape lands somewhere in the 2–4M request range, and it moves depending on execution duration — long-running functions punish per-millisecond billing badly.
At 10M requests/month: Containers win, usually by 30–50%. Always-on capacity amortizes beautifully at sustained volume, while per-request fees and gateway charges accumulate relentlessly. A team at this scale on serverless is often paying a premium for elasticity it no longer needs, since its traffic has become predictable enough to capacity-plan.
The Costs Nobody Models
The raw compute comparison misses several line items that reliably surprise teams during their first AWS-style invoice review:
- Cold starts as a product cost. Not a billing line, but a conversion cost. Latency-sensitive endpoints suffering 300–800ms cold starts during traffic gaps can cost more in churn than they save in compute.
- Egress and cross-service chatter. Serverless architectures tend to be chattier — each hop between functions, queues, and managed services can carry data-transfer fees that containers on one network don't incur.
- Observability bills. Per-invocation tracing on 10M requests generates log and trace volumes that can exceed the compute cost itself. This is the single most common budget shock in serverless adoption.
- Engineering time. Serverless shifts operational burden to the provider but adds distributed-systems complexity — more failure modes, harder local testing, trickier debugging. That's a real cost, just not one that appears on an invoice.
When Serverless Is Genuinely the Cheaper Bet
Strip away the ideology and the pattern is clear. Serverless is the economical choice when traffic is genuinely spiky or light, when workloads are short-lived, and when the team's scarcest resource is operations capacity — which describes most early-stage US startups perfectly. Containers win when traffic is sustained and predictable, when executions run long, or when the workload benefits from always-warm processes.
The pragmatic play for many teams is a hybrid: serverless for webhooks, cron jobs, and unpredictable endpoints; containers for the core API once volume stabilizes. The mistake isn't choosing wrong at the start — it's never revisiting the choice. The break-even point that made serverless free at 10K requests makes it expensive at 10M, and the teams that save real money are the ones who notice when they've crossed the line.