A steady, always-busy API has run on functions for years and its bill keeps growing; what evidence would make you move it to containers, and would you move all of it?
answer
- the floor, not the peak
- full bill, not compute
- workarounds that buy always-on back
- operations you take back
- move the hot path only
basics
~20 sMove when the evidence shows a steady concurrency floor, pre-provisioned capacity covering it, and full-bill cost per request above a realistic container estimate including operations work. Usually move only the steady hot path and keep event-shaped work on functions.
solid answer
~40 sI look at the running workload, not a price list. Arguments to move: concurrency that never nears zero, pre-provisioned capacity already paying for that floor, workarounds piling up such as connection proxies and warming, and a full-bill cost per request, gateway, logs and NAT included, above a container estimate at realistic utilisation plus the patching, scaling and on-call we would take back. Arguments to stay: spiky traffic, a small team, many small event-driven functions. I would rarely move everything: the usual answer is to move the steady public API and keep queue consumers, storage triggers and schedules on functions. I would keep handler logic behind an adapter, move one route first, compare over a real traffic cycle, and record a revisit trigger.
go deeper
Know that steady, always-busy traffic is where functions lose their cost advantage, and that the whole bill, not just compute, is what gets compared.
Explain which signals show a workload no longer uses scale to zero, and what operating duties a container platform hands back to the team.
Show how you would build the full-bill comparison per request, including a realistic utilisation for containers, and pilot one route before committing.
Own the call as a standing trade-off: weigh measured bill savings against estimated operating work, prefer a hybrid split, and record a revisit trigger.
## The decision a lead owns Functions are chosen for workloads that are bursty, event-shaped or small, and many of those workloads change. A public API that started with spiky traffic can become **steady and always busy**; the function model keeps working, but the team starts paying for its strengths without using them. Deciding whether to move a **running** workload is different from choosing a tier for a new one: there is a bill with history, an operations record, and a migration cost. The request-and-duration break-even arithmetic is a separate question; the lead's question is what the full bill and the operating record say, and how much to move. ## Evidence that argues for moving 1. **A steady concurrency floor.** Concurrency rarely drops near zero, even at night: the workload never uses scale to zero. 2. **Pre-provisioned capacity covering that floor.** If the team already pays for always-ready instances, it has bought back the always-on cost that functions were meant to avoid. 3. **Full-bill cost per request above a realistic container estimate.** Compare the whole bill, gateway, logs, NAT and pre-provisioned capacity included, against a container estimate at a realistic utilisation, not at a full machine. 4. **Workarounds piling up.** Warming schemes, a connection proxy in front of the database, work split across steps to fit the time limit, and per-instance caches that keep missing are each a cost the model is imposing. 5. **Latency requirements the model fights.** Tail latency targets that cold starts keep missing despite tuning. ## Collecting the evidence Before the decision meeting, gather a few weeks of data that covers a full traffic cycle: - concurrency over time, at its low points as well as its peaks; - the bill grouped by service, divided by requests, so cost per request includes every line; - engineering hours spent on workarounds and on incidents caused by platform limits; - a container estimate built from measured request rates, with replicas, headroom and zones included. ## Evidence that argues for staying - Traffic is spiky or seasonal, and the floor is low compared with the peaks. - The team is small, and nobody wants to own patching, capacity planning or an always-on cluster. - The workload is many small functions behind events, where a container fleet would sit mostly idle. - The gap on the full bill is small compared with the engineering time a move would take. ## What the move really costs - **Packaging:** the handler becomes a long-running process with a server loop, health checks and graceful shutdown. - **Scaling:** autoscaling rules, minimum replicas and headroom are now the team's job, and containers rarely run near full utilisation. - **Operations handed back:** base-image patching, capacity planning, on-call for the platform itself. - **Two operating models** if only part moves: two deployment pipelines, two sets of dashboards and runbooks. ## Hybrid shapes in between | Shape | What moves | What stays on functions | Fits when | |---|---|---|---| | Hot path out | the steady public API | queue consumers, storage triggers, schedules | one route dominates the bill | | Baseline plus burst | the steady floor on containers | overflow or spiky routes | the floor is large and the peaks are sharp | | Container-instance platform | the image runs on a platform that sends many requests to one instance and can scale to zero | event glue | the team wants container packaging without running a cluster | | Stay and tune | nothing | everything | the full-bill gap is small and cost levers remain | The **hot path out** shape is the most common outcome: the event-shaped glue keeps the per-use billing and managed triggers it suits, and only the steady part moves. ## Making it reversible and deciding - Keep handler logic behind a thin adapter, so the same code runs as a function and as a server; the move then changes packaging, not business logic. - Move **one** route first behind the same gateway path, and compare full-bill cost per request and operating hours over a real traffic cycle. - Record the decision with its evidence and a **revisit trigger**, such as the floor falling below a set share of peak or the team losing the people who run the cluster. There is rarely one right answer. A lead weighs a bill that can be measured against operating work that has to be estimated, and the honest answer is often to move the hot path and leave the rest where it is.
- What would make you reverse the move and go back to functions?Traffic becoming spiky again so the cluster sits idle, utilisation staying far below the estimate, or the team losing the people who run the cluster. If the revisit trigger fires and the adapter is in place, moving back is a packaging change rather than a rewrite.
- How do you keep the move from becoming a rewrite?Separate business logic from the function entry point first, so one core runs behind a function adapter and a server adapter. Then move one route behind the same gateway path, compare, and continue only if the numbers hold.
- Why compare against a container estimate at realistic utilisation rather than a full machine?Containers need headroom for spikes, replicas across zones and capacity for deploys, so they rarely run near full. Pricing them as if every core were busy makes the move look cheaper than it will be.
- Functions are always cheaper because you pay only while code runs.
- Compare the function compute line with a container price list and move if lower.
- If one part should move, the whole system has to move together.
- Containers cost nothing extra to operate once they are deployed.
- Pre-provisioned capacity on every function keeps functions cheaper than containers.