Why Large Model Services Keep Degrading and Going Down
This article explains why large language model (LLM) services frequently suffer performance degradation and partial outages under compute constraints. It breaks down how GPU bottlenecks propagate into user-facing failures, then covers capacity planning, entry-point governance, tiered degradation strategies, observability, disaster recovery drills, and a practical checklist for developers building on top of LLM APIs.
1. The Pattern: From Quota Limits to Two Failure Modes
A conversational AI platform recently restricted dialogue quotas due to tight compute resources. Its public service status log showed roughly ten incidents accumulated over a period, spread across multiple dates, with two occurring back-to-back on one day. Grouped by what users actually experience, these incidents fall into two typical failure modes:
- Performance Degradation: Slower responses, higher time-to-first-token, lower generation throughput, and occasional request failures, though users still have a good chance of submitting a conversation successfully.
- Partial Outage: The web frontend or API calls become intermittently unavailable, with a wider blast radius and longer duration. One incident lasted more than four hours and affected both the chat frontend and the service endpoints of several model sizes.
These two modes are not isolated. They are usually different symptoms of the same pipeline under different load levels. Understanding this is the prerequisite for designing stability.
2. Root Cause: How Compute Constraints Turn Into User-Facing Failures
Online LLM inference differs sharply from traditional stateless web services. Its resource bottlenecks are characterized by long occupancy, tight coupling, and slow elasticity:
- Long occupancy: A single generation holds GPU memory and compute units for hundreds of milliseconds to tens of seconds. Requests are not instantaneous, so scaling out cannot take effect in seconds the way adding web instances can.
- Tight coupling: Batching significantly improves throughput, but one long request inside a batch slows down the whole batch, creating head-of-line blocking.
- Slow elasticity: Loading model weights, warming up GPU memory, and building caches all take time. High cold-start cost means the autoscaling curve lags behind traffic spikes.
The propagation chain looks like this:
Traffic spike / more long-context requests↓Batching queue backs up, per-request queueing time rises↓GPU memory and compute saturate, batch size is forced down↓Throughput drops → time-to-first-token rises (performance degradation)↓Health checks time out / instances are removed / rate limits trigger↓Some endpoints become unavailable (partial outage)
So “restricting dialogue quotas” is essentially active degradation: trading a controlled loss of availability for overall system survival, avoiding an avalanche-style total outage.
3. Capacity Planning: Turning Compute Into Measurable, Reservable Metrics
Stability cannot be backstopped by “just add more machines.” It requires a quantifiable capacity model. At minimum, define these metrics:
- Concurrent sessions: The number of requests actively generating at the same time;
- Input/output token distribution: Characterized by percentiles (P50/P90/P99) rather than averages;
- Time-to-first-token (TTFT) and overall generation latency;
- Effective throughput per unit of compute (token/s);
- Headroom: How much reserve is kept for bursts.
A simplified capacity estimation example (illustrating the method only, not any specific product parameters):
# Goal: minimum compute units needed to meet SLA at peakpeak_qps = 120 # peak request rateavg_out_tokens = 400 # average output lengthtarget_ttft_ms = 800 # time-to-first-token target# Concurrent generations one unit can handle at the target latency (must come from load testing)per_unit_concurrency = 16required_concurrency = peak_qps * (avg_out_tokens / 50) # assume 50 token/s generation speedunits = required_concurrency / per_unit_concurrencyunits_with_headroom = units * 1.5 # reserve 50% headroomprint(int(units_with_headroom) + 1)
The key point: every coefficient must come from your own load testing, not copied from any external “performance data.”
4. Entry-Point Governance: Rate Limiting, Quotas, and Priority Scheduling
When compute cannot scale infinitely, entry-point governance is the cheapest and fastest lever.
- Multi-level rate limiting: Apply a global rate limit at the ingress layer, quota limits per tenant, and concurrency limits per user, so a single caller cannot crowd out shared resources.
- Quotas and credits: Allocate scarce compute to workloads of different priorities in the form of dialogue credits, with clear resource boundaries for free trials, paid tiers, and internal tasks.
- Priority queues: Split requests into interactive (online chat), batch (offline generation), and retryable tasks. When saturated, protect the time-to-first-token of interactive requests first.
Priority P0: interactive chat → guarantee TTFT, allow shorter max output lengthPriority P1: background async → allow queueing, return a task handle to pollPriority P2: batch offline jobs → defer to off-peak during high load
- Graceful rejection: When overloaded, return a clear status code and a suggested retry time instead of letting requests wait indefinitely. A predictable rejection is far better than an unpredictable timeout.
5. Degradation Playbook: Staying Useful in a “Partially Available” State
Mature services do not run in a binary all-good-or-all-bad mode. They have continuously adjustable degradation levels:
- Model size degradation: Switch requests from a larger model to a lighter one, trading some quality for throughput;
- Context compression: Cap the maximum input length and enable summary-style context to reduce GPU memory use;
- Output length convergence: Dynamically lower the maximum generation length;
- Result caching and reuse: Reuse historical results for frequent, similar requests;
- Feature flags: Automatically disable non-core capabilities (such as complex plugin calls or long-document parsing) during peak hours.
{"degrade_level": 2,"max_input_tokens": 4096,"max_output_tokens": 512,"model_tier": "light","enable_cache": true,"retry_after_ms": 1500}
Degradation policies should be configurable, gradually rollable out, and rollback-able, with the expected experience at each level agreed with business teams in advance.
6. Observability: No Measurement, No Stability
Most failures show warning signs before they erupt. Build three layers of observability:
- Resource layer: Compute utilization, GPU memory usage, batching queue length, queueing time;
- Service layer: QPS, success rate, TTFT percentiles, generation speed, timeout rate, rate-limit trigger count;
- Business layer: Conversation completion rate, user retry rate, quota-exhaustion ratio.
Alerting design essentials:
- Alert on percentiles, not just averages;
- Use composite conditions (e.g., queue length rising and success rate falling) to suppress noise;
- Separate “performance degradation” and “partial outage” into two alert channels with different response procedures;
- Maintain a status page and incident record mechanism to communicate impact scope and recovery progress externally.
7. Disaster Recovery and Drills: Turning the Playbook Into Muscle Memory
- Multi-availability-zone deployment to keep a single resource failure from spreading;
- Async redesign: Turn long-running generation into “submit a task + poll/callback” to flatten peaks;
- Message queue buffering: Use queues to absorb burst traffic and smooth out consumption of write requests;
- Chaos drills: Regularly inject high latency, instance removal, and dependency timeouts to verify that degradation switches actually work;
- Postmortem mechanism: After each incident, produce a timeline, impact scope, root cause, and action items, and track them to closure.
8. A Practical Checklist for Developers
- Set a client-side timeout plus exponential backoff retry for LLM calls, and cap the maximum retry count to avoid a retry storm;
- Implement an idempotency key on the business side to prevent retries from causing duplicate generation and duplicate billing;
- Return generation results via streaming, emitting the first token early and then outputting progressively, which noticeably improves perceived latency;
- Build a local fallback strategy: switch to a lightweight option or return cached content when the service is unavailable;
- Treat “insufficient quota” and “service degraded” as first-class business states, with clear messaging and recovery expectations.
import time, randomdef call_with_backoff(fn, max_retry=3):for attempt in range(max_retry):try:return fn()except TimeoutError:if attempt == max_retry - 1:return {"status": "degraded", "retry_after_ms": 2000}time.sleep((2 ** attempt) * 0.3 + random.random() * 0.2)
9. Conclusion
Compute constraints are the norm for intelligent applications today, not the exception. Frequent performance degradation and intermittent outages remind developers that stability is not a byproduct of scaling out. It is a system capability built jointly from capacity modeling, entry-point governance, tiered degradation, observability, and drills. Treating scarce compute as a resource that needs careful scheduling is what lets you keep delivering a predictable intelligent service experience within a limited budget.
