Start with the time between bursts
A daily average request rate hides the information needed for this decision. Two endpoints can receive the same number of requests while one is continuously busy and the other is idle for hours between bursts. Record the distribution of idle gaps, the cooldown before a replica is removed, and the number of restarts. Also measure startup with an empty cache and with a reusable cache. Image fetches, model loading, engine initialization, and instance provisioning can contribute differently to each restart. For a synchronous assistant, include the time a user’s request waits for capacity. An asynchronous job can tolerate a different startup budget; the job queues guide explains that execution model.Calculate a simple break-even
For one idle gap, use these quantities:
Under a simplified billing model:
C is positive and the gap is long enough to trigger scale-down. R includes billed startup work and incremental data transfer. If you estimate it from a startup duration multiplied by a compute rate, do not add that compute cost a second time. Costs identical in both policies cancel in this comparison but still belong in the total service budget.
A worked example
Assume an avoidable warm-replica cost of 0.12 of incremental restart cost. These are hypothetical inputs, not current AWS or Tensorfuse prices. The cost per second is 0.001 × 900 − 0.78. This calculation assumes scale-down actually removes the billed capacity. If a GPU node remains allocated for another workload, removing one pod might not reduce the bill at all. Billing minimums and capacity sharing can also make the cost discontinuous. Measure avoidable cost at the resource that is billed.Apply the latency constraint separately
A financially attractive restart can still violate the application deadline. Suppose the measured time to a usable response after scale-up is 45 seconds, while the product requires a first token within two seconds. Positive savings do not make that policy suitable for the interactive path. Consider retaining a warm replica, using a predictable prewarming schedule, or moving delay-tolerant work to a queue. Benchmark those choices with the same traffic trace. A readiness check should report whether the model server can accept work; starting a container process is an earlier milestone. Kubernetes distinguishes startup and readiness probes for these different lifecycle checks.Apply this to Tensorfuse
The deployment configuration documentsmin_scale, max_scale, and concurrency. A minimum of zero permits scale-to-zero; a nonzero minimum retains replicas. Measure the resulting resource lifetime and bill before assuming a particular savings percentage.
Use the cold-start guide to investigate startup phases, and read why lazy loading can still delay the first request. Evaluate the final policy using cost per successful request, including requests that time out during restarts.
