LLM Serving Capacity Shortages: Technical Response and Architecture Practices

    This article breaks down why large language model (LLM) inference services run out of capacity during traffic spikes and how to address it with architecture. It covers capacity planning with a calculable watermark model, elastic scaling strategies such as tiered resource pools and predictive warm-up, admission control, a four-level degradation ladder, cost governance, and transparent user communication. The goal is to treat peak load as the norm, run degradation as a feature, and manage cost as a metric so that intelligence can be delivered reliably under compute constraints.

    1. Framing the Problem: Turning “Not Enough Compute” into an Engineering Task

    Shortly after a major LLM assistant released a new version, it began failing frequently during business peak hours. The UI showed that the service had switched to a fast mode, and the vendor advised users to try other options for the time being. Once the brand and the emotional reaction are set aside, this exposes a typical problem: the supply curve of inference compute cannot keep up with the instantaneous peaks of the business demand curve.

    This is not a defect unique to one vendor. It is a common challenge for online serving of autoregressive LLMs, with four root causes:

    1. Bursty, long-tailed demand: Request volume spikes on the hour, before holidays, and after hot events, with peak-to-trough ratios often several times over.
    2. Rigid inference cost: Autoregressive decoding generates tokens one by one, and GPU memory and compute usage grow roughly linearly with concurrency and context length. You cannot scale it at near-zero cost the way you scale a stateless web service.
    3. Capability–cost coupling in new models: Larger parameter counts, longer contexts, and parallel multi-agent scheduling usually cost several times more compute. A release therefore redefines the capacity watermark.
    4. Insufficient scheduling and isolation: When online interaction and offline batch jobs share a resource pool, long-running tasks crowd out the interactive path and amplify tail latency.

    So the discussion should not be about “who went down,” but about how to use architecture to keep uncertainty in a cage.

    2. Capacity Planning: From Guesswork to a Calculable Watermark Model

    The core of capacity planning is to derive resource metrics from business metrics. Define the service objective (SLO) first, then build a verifiable conversion chain:

    1. Target QPS × average output tokens × per-token latency = concurrent decode slots needed
    2. Concurrent slots × GPU memory per slot ÷ usable memory per card × redundancy factor = number of accelerators needed

    The redundancy factor should be 1.3–1.5 to absorb peak-to-trough swings and the extra load from failover. Three supporting practices:

    • Regular load testing: Use a request set that mirrors the real distribution (input length, output length, tool-call ratio), apply stepped load, and record two curves: time to first token and per-token latency. Find the inflection point instead of looking only at averages.
    • Watermark tiers: Set three levels at 60% / 75% / 90%, corresponding to observe, throttle warning, and forced degradation, so you act before hitting 100%.
    • Capacity reconciliation: Before releasing a new version each day, do a “capability–cost” reconciliation to make clear how per-request cost and the sustainable peak change once the new features go live.

    3. Elastic Scaling: Making Compute Supply Keep Up with Peaks

    Elasticity is the lifeline of LLM serving, but auto-scaling has extra constraints in inference: acquiring accelerators has a readiness delay of minutes or more, and loading model weights and warming up GPU memory also take time. A practical combination:

    1. Tiered resource pools: A resident pool guarantees baseline traffic, an elastic pool handles peaks, and an offline pool runs batch jobs and evaluations, all managed through a unified scheduling view.
    2. Predictive scaling: Pre-warm instances ahead of time based on historical curves for the same period and the business calendar (campaigns, releases, holidays), moving cold starts out of the critical path.
    3. Request queuing and admission control: Apply token-bucket rate limiting at the entry point, together with a priority queue, to guarantee determinism for paid or critical business paths.
    4. Trade-offs between batching and continuous batching: Higher throughput raises per-request latency, so set different batching policies per business tier rather than one global policy.

    Illustrative admission control logic:

    1. class AdmissionController:
    2. def __init__(self, capacity, burst):
    3. self.capacity = capacity # steady-state concurrency
    4. self.burst = burst # allowed instantaneous burst
    5. self.inflight = 0
    6. def try_acquire(self, priority: int) -> bool:
    7. limit = self.capacity + (self.burst if priority >= 1 else 0)
    8. if self.inflight < limit:
    9. self.inflight += 1
    10. return True
    11. return False
    12. def release(self):
    13. self.inflight = max(0, self.inflight - 1)

    4. Degradation and Fallback: The Last Gate for Availability

    Degradation is not failure; it is controlled failure. Mature solutions usually prepare a four-level ladder, giving up capability level by level in exchange for availability:

    • Level 1: Model degradation. Switch from a high-precision large model to a smaller, faster model or a fast mode, keeping semantic usability.
    • Level 2: Capability trimming. Turn off compute-heavy features such as parallel multi-agent execution, deep retrieval, and long context, keeping only core conversation.
    • Level 3: Result fallback. Return cached results or templated answers for high-frequency, stable questions, clearly labeled as cached content.
    • Level 4: Queuing and off-peak retry. Give an estimated recovery time and let users schedule a retry, avoiding ineffective retries that amplify load.

    The key is that degradation must be observable, rollback-able, and honest to users: clearly telling users which mode is active is better than leaving them with an unexplained error. Degradation triggers and recovery should be based on unified metrics (queue length, tail latency, GPU memory watermark) so that multiple thresholds do not fight each other.

    5. Cost Governance: Spending Every Unit of Compute on Effective Requests

    Compute pressure is often the outward sign of a cost-structure problem. Actionable measures include:

    • Context governance: Trim redundant history and retrieve on demand instead of concatenating everything, since context length has a very pronounced amplifying effect on GPU memory and latency.
    • Layered caching: Apply semantic caching to identical or similar requests, and prefix reuse for system prompts and knowledge snippets, reducing repeated prefill cost.
    • Splitting long and short requests: Schedule long-text and batch-summarization tasks to the offline pool for asynchronous execution, keeping only short requests on the interactive path.
    • Unit economics dashboard: Use metrics such as “cost per thousand effective requests” and “cost per token,” attributed by business line, to avoid a blurred total cost.

    6. External Communication: Turning Technical Transparency into a Trust Asset

    The way the incident was communicated—openly admitting the current capacity shortfall and offering alternatives—is also valuable from an engineering perspective: it turns an uncontrollable failure into an exercise in expectation management. A reusable principle is: give certainty first, then the explanation, and finally compensation or an alternative path. Internally, every degradation must become input for a retrospective: were the trigger thresholds reasonable, was the scaling delay acceptable, and did the cache hit rate meet the target?

    If you host such a system on the cloud, you can usually close the loop by combining general-purpose capabilities: a container platform hosts inference instances and elastic policies, object storage holds models and datasets, a message queue buffers requests and smooths peaks, and logging plus monitoring and alerting handle watermark observation and threshold linkage. Baidu AI Cloud offers corresponding capabilities in these general categories and can serve as a reference for architecture selection.

    7. Conclusion

    The stability of online LLM serving is essentially an engineering problem that must be solved simultaneously across capacity, elasticity, degradation, and cost. Design with the peak as the norm, operate degradation as a feature, and govern cost as a metric—only then can you keep delivering intelligent capabilities reliably under real compute constraints.