Jul 15, 2026 · 5 min read

Cutting our infrastructure bill 20% with a serverless migration

We had a set of FastAPI services running on always-on instances that were, most of the day, mostly idle. The traffic was spiky and event-driven, which is close to the ideal shape for serverless. Migrating the right pieces cut our infrastructure spend by about 20%.

The wins came from paying for actual usage instead of provisioned headroom, and from letting the platform handle scale-out during bursts we used to over-provision for.

Where it paid off — and where it didn't

Stateless, bursty request handlers were the obvious win. Background jobs triggered by queues fit beautifully. What we kept on long-running instances mattered just as much: anything latency-sensitive with cold-start risk, and anything with steady, predictable throughput where always-on was simply cheaper.

If I did it again, I'd invest earlier in observability across the boundary. Distributed tracing through managed services is non-negotiable — without it, a 200ms regression can hide in a place no dashboard is looking.