AWS’s official blog revealed that, for deploying the non-autoregressive TTS model Kokoro-82M (with 82 million parameters) on an Amazon SageMaker AI real-time endpoint, the team abandoned the traditional practice of setting auto-scaling thresholds based on empirical rules and instead derived a practical scaling strategy by conducting two empirical measurements—Q_max and T_total. Due to the model’s streaming audio response characteristics, it generates tokens continuously within seconds after the connection is established, rendering conventional metrics such as tokens/sec entirely ineffective. Blindly setting concurrency thresholds can lead to GPU resource wastage or violate the service-level objective (SLO) of keeping the p95 first-byte latency below 3,000 ms.
Actual measurements confirm: the Q_max of a single ml.g5.xlarge instance is 50—meaning that when concurrent requests reach 50, the p95 time to first byte (TTFAB) is 2,805.7 ms, still meeting the SLO; however, when the load rises to 60, TTFAB increases to 3,374.8 ms, triggering an SLO violation. The measured T_total is 320.2 seconds, comprising 260.2 seconds for instance provisioning and 60 seconds for policy‑check latency. Accordingly, scaling thresholds are rigorously calculated as follows: the scale‑up threshold C_scale_max = 37.5 (Q_max × 0.75), and the scale‑down threshold C_scale_min = 25.0 (Q_max × 0.5), with an asymmetric cooldown period (30 seconds for scale‑up and 960 seconds for scale‑down, roughly 3×T_total) to prevent oscillations.
Technically, the strategy relies directly on SageMaker’s native metric ConcurrentRequestsPerModel (the 10-second maximum), thereby avoiding the instrumentation risks associated with custom metrics. Measured results show that the ratio of client-reported concurrency to this CloudWatch metric is 1.0, supporting a straightforward interpretation of the threshold. At the container level, admission control enforces a hard limit of queue_max_depth=50; requests exceeding this threshold return a 503 error. AWS CDK deployment includes mandatory validation: scaling resources are only synthesized when scaling_enabled=True and valid Q_max measurement artifacts are present, preventing unmeasured configurations from entering production.
The end-to-end toolchain (drift/qmax/ttotal/plan/validate) runs entirely offline, except for qmax and ttotal, which require actual endpoint calls; all outputs are fingerprinted and versioned by instance type and container image digest to ensure reproducibility. The paper explicitly highlights two trade-off warnings: ‘surge_survival’ (scaling out is triggered at 97.4% utilization, leaving very little queue‑buffer capacity) and ‘scale_in_safety’ (scaling down from 2 instances to 1 may immediately retrigger scaling up). The former prioritizes response speed at the cost of high utilization, while the latter mitigates but does not eliminate the issue through a long cooldown period. This methodology applies to all latency‑sensitive, concurrency‑constrained SageMaker real‑time endpoints (e.g., image embedding), though the values of Q_max and T_total are tightly coupled to the specific model and instance type.