The replica that took minutes to arrive
Step 1 · The pattern
One model server handles normal load
You host the model yourself. One replica handles normal traffic; requests barely wait. (All numbers are illustrative; a few seconds here stand for minutes.)
- a request
- served
In short
The replica that took minutes to arrive: how it works and how it breaks
With a provider's API, spare capacity is someone else's problem. Self-host a model and it becomes yours: you decide when to start another copy of the model server, and a new one is slow to become ready. Google's GKE guidance says a pod's readiness is largely determined by pulling the container image and downloading the model weights, often many gigabytes. Scale on GPU or CPU utilisation, which Google advises against for inference, and the autoscaler reacts late; the new server then spends minutes loading while requests queue and time out. Google recommends scaling on the inference server's own metrics, such as queue size, and cutting startup time by streaming weights from storage and streaming container images. Keep a reserved baseline sized for normal peaks, and use the extra minutes only for growth. Self-hosting can be cheaper at steady load; it is never free at a surge.
What this simulation simplifies
- A few seconds stand for the minutes a real model server takes to start.
- Two replicas stand for a fleet; real autoscalers add many.
How this comes up in interviews
"You are moving from a model API to self-hosting. How do you handle traffic surges?"
Then they ask
- What signal starts a new server?
- How long does a new one take?
- What do you keep running all the time?
A strong answer covers
- New model servers are slow: image pull and weight loading dominate.
- Scale on queue size or batch size, not GPU or CPU utilisation.
- Stream weights and container images to start faster.
- Reserve a baseline for normal peaks; scale down slowly.
- Compare cost per token at your real load with the API.
Points to cover, not a script. Say them in your own words and tie them to a system you have worked on.
On one page: the track cheat sheet.
Sources: Google Cloud: Best practices for autoscaling LLM inference workloads on GPUs (GKE) ↗ · Google Cloud: Best practices for inference on GKE (cold-start latency) ↗ · Report a problem
Diagrams are our own simulations: the timings, rates and counts in them are illustrative, not measurements. Captions are original wording.