Why LLM Serving Crashes Under High Load: Causes and Stability Engineering
This article explains why large language model inference services become unavailable during traffic spikes, breaking the problem down into demand surges, rigid compute supply, and missing scheduling buffers. It covers token-based load modeling, supply-side delivery constraints, a four-layer stability architecture (admission control, elastic inference, asynchronous offloading, observability), cost transparency, common misconceptions, and a practical rollout checklist.
1. Framing the Problem: What a “Crash” Actually Means
When an LLM inference service goes down during peak hours, the first reaction is often to blame a single vendor’s capacity or a data center’s construction schedule. That framing is misleading: it compresses a systemic capacity problem into a single point of responsibility.
From an engineering perspective, a public-facing outage is usually the result of three layers stacking up:
- Demand-side spikes: call volume rises non-linearly within a short window;
- Rigid supply side: compute procurement, rack installation, and validation take weeks to months to deliver;
- No buffer in scheduling: without queuing, rate limiting, degradation, and prioritization, the spike passes straight through to the underlying resources.
If the third layer is missing, any mismatch in the first two turns into an outage. So the real technical question is not “whose capacity is short,” but how to build a serving architecture that is insensitive to sudden load spikes.
2. Load Modeling: Turning Token Consumption into a Predictable Metric
One key fact: after a certain class of tool was introduced, token consumption grew nearly fourfold in about a month and kept rising at hundreds of percent month over month. The signature of this curve is that it is driven by changes in how the service is used, not by linear user growth.
A capacity model needs to separate at least three metrics:
- Request rate (QPS): reflects connection and scheduling pressure;
- Input token share: long context and code-base retrieval raise input-side cost significantly;
- Output token share: generative tasks and multi-turn reasoning raise output-side cost and GPU memory usage.
A simplified capacity estimate:
daily supportable requests ≈ (available inference cards × effective daily throughput per card) / average tokens per requesteffective daily throughput per card = peak throughput × effective utilization (usually far below theoretical)
Note that the denominator, average tokens per request, swings sharply as the tool form changes. When interaction shifts from “a human asking one question at a time” to “automated batch calls,” daily tokens per user can rise by one to two orders of magnitude. That is the root cause of the multi-fold growth seen within three months.
3. Supply-Side Realities: Compute Delivery Is Rigid
Whether you build your own data center or rent public compute, supply expansion is constrained three ways:
- Delivery cycles: facility build-out, power and cooling upgrades, hardware installation, and cluster integration are measured in months;
- Cluster efficiency loss: new nodes require re-tuning parallelism strategies, so short-term overall utilization can actually drop;
- Uneven geographic distribution: available capacity is often concentrated in specific regions, and cross-region calls add latency and bandwidth cost.
The conclusion is direct: expecting supply to match demand growth of several times per month is not engineering-feasible. Stability therefore cannot rest on the assumption that resources are always sufficient; it must rest on the assumption that the service degrades gracefully when resources are periodically short.
4. Architecture: Four Layers of Stability Design
4.1 Access Layer: Rate Limiting and Priority Queues
Grade requests by business value (interactive Q&A > batch offline jobs). High-priority traffic uses a dedicated lane; low-priority traffic queues. Example:
PRIORITY = {"interactive": 0, "batch": 2}def admit(req, capacity):if capacity.free_slots() > 0:return capacity.acquire(priority=PRIORITY[req.tier])return queue.put(req, timeout=req.max_wait_ms) # return an explicit error code on timeout
Key point: returning an explicit “queued / retry later” semantic is better than a long unresponsive wait.
4.2 Inference Layer: Elasticity and Mixed Scheduling
- Route interactive traffic to low-latency deployments; run batch traffic on interruptible resources that can be preempted and re-run;
- Use the container platform for elastic scaling, but set scale-out cooldown and upper limits to avoid amplifying failures through flapping;
- Bucket long-context requests by length so a few very long requests cannot drag down whole-batch throughput.
4.3 Data and State Layer: Peak Shaving
Hand asynchronous work (log persistence, result storage, auditing) to message queues and object storage, so the inference path does only one thing: compute. The shorter the path, the smaller the failure domain.
4.4 Observability Layer: From Firefighting to Early Warning
Four alert classes are required: month-over-month token consumption, queue-time percentiles, drift in per-request token distribution, and resource utilization plus rejection rate. Among these, queue-time P95 is the earliest pre-crash signal, typically showing anomalies tens of minutes before the error rate does.
5. Cost Structure: Don’t Let Middlemen Eat the Gains
One real pain point: the same task consumed 150 credits through a certain credit-based channel, while calling the underlying capability directly cost about RMB 0.4. The middle layer took more than ninety percent. This exposes a frequently ignored engineering problem: opaque cost suppresses architecture optimization in reverse.
Recommended practices:
- Build unified cost accounting in units of tokens, with separate input/output pricing;
- Set quotas and budget alerts for high-consumption callers so a single anomaly cannot inflate the bill;
- Track “cost per completed effective task” as the core metric rather than unit price.
When cost is observable, teams have the incentive to trim prompts, cut context, and cache results, and those optimizations also reduce load. Cost governance and stability governance point the same direction here.
6. Common Misconceptions
- Misconception 1: Scaling out solves everything. When demand grows several times month over month, scaling always lags; degradation must come first.
- Misconception 2: Blaming a single vendor for the crash. An architecture with no buffer will crash with any supplier.
- Misconception 3: Monitoring only the error rate. Error rate is a lagging metric; queueing and token distribution are leading indicators.
- Misconception 4: Ignoring changes in interaction mode. One tool upgrade can equal ten times the user count.
7. Implementation Checklist
- Within one week: add rate limiting and priority queues, and fill in queue-time and token-distribution monitoring;
- Within one month: complete request grading, length bucketing, and separating the asynchronous path;
- Within one quarter: establish a capacity model and a quarterly scaling review, and include “cost per effective task” in performance assessment.
8. Conclusion
A high-load crash is not the failure of one party’s capacity but the inevitable result of a system lacking buffer and degradation capability. Model token load as a first-class concern, design degradation as a default capability, and govern cost as an observable metric, and you can serve traffic reliably in an environment of sustained rapid growth. Teams with similar needs can also evaluate the combination of general capabilities offered by Baidu AI Cloud, such as container platforms, message queues, log services, and monitoring and alerting, as a reference foundation for building an elastic inference path.
