LLM Service Stability: Managing Frequent Partial Outages
Large model platforms often fail in partial ways that disrupt daily work without a full outage. This article covers how to break these failures into user, API and model, and infrastructure layers, how to define SLIs, SLOs, and error budgets, what typically causes them, and how observability, resilience patterns, change control, and fault drills reduce their impact.
1. The Question Is Not Whether the Service Crashes, but Whether Partial Failures Are Tolerable
When a large model platform becomes a daily production tool for many users and developers, stability cannot be judged only by whether the main site is up. A more common situation is that the core service keeps running, while a specific API, model tier, regional entry point, or dependency becomes partially unhealthy. Symptoms include slow page loads, request timeouts, dropped connections, higher error rates, and slower response generation.
Partial failures share one trait. At the global level, the service may still look basically available. For specific workloads, however, teams writing code, calling APIs, running batch jobs, or serving online Q&A are blocked. Weekday afternoons and evenings are especially sensitive because call density is high and manual work cannot pause. A 30-minute anomaly can disrupt a delivery schedule. For high-frequency callers, stability means whether critical paths are predictable during critical hours, not just whether the platform avoids a complete outage.
From an engineering governance perspective, split the problem into three layers:
- User-facing layer: whether pages load, requests time out, outputs complete, and login and authentication work.
- API and model layer: open API success rate, time to first packet, generation speed, error code distribution, and availability of different model tiers.
- Infrastructure and dependency layer: compute resources, network entry points, scheduling systems, storage, logging and monitoring pipelines, and third-party dependencies.
A “suspected outage” must be translated into observable SLIs (service level indicators) before you can tell whether the cause is a short-lived fluctuation, a local capacity shortage, a regression from a change, or a dependency failure.
2. Use SLIs, SLOs, and Error Budgets to Turn “Stable” into a Manageable Target
The first step in stability governance is not adding redundancy. It is defining measurable targets. Common SLIs include request success rate, P95 and P99 latency, time to first packet, generation throughput, error code ratio, timeout rate, and connection establishment failure rate. On top of these, set SLOs. For example: monthly availability of core APIs is at least 99.9%, P99 latency during weekday peak hours stays below the agreed threshold, and the error rate on the authentication path is below 0.1%.
Availability metrics should not be hidden by averages. Suppose a service has dozens of partial incidents in 30 days, with a median recovery time of only about a dozen minutes. That looks fast. But if the incidents cluster in peak hours, overall availability may still fall below what high-frequency workloads can accept. At 99.9% availability, monthly downtime is about 43 minutes. If monthly availability drops to around 96%, downtime exceeds 28 hours, which is nearly unacceptable for online business. Teams should therefore track:
- Overall availability: monthly and weekly trends;
- Peak-hour availability: sliced by business hours;
- Critical API availability: split by API, model tier, and region;
- Error budget burn rate: alerts and change freezes triggered when the budget is consumed quickly in a short window.
Error budgets tie stability to release pace. When the budget is ample, roll out changes gradually. When the budget burns fast, prioritize mitigation, rollback, and capacity investigation instead of adding more changes.
3. Common Root Causes of Partial Outages: Changes, Capacity, Dependencies, and Hotspots
Frequent partial failures usually come from several causes at once. Engineering analysis can group them as follows:
- Regressions from changes: configuration updates, routing adjustments, model version switches, authentication policy updates, and rate limit changes can look fine at low traffic and fail under higher load.
- Capacity and scheduling bottlenecks: sudden spikes for one model type, a rising share of long-context requests, queued generation tasks, exhausted connection pools, or blocked threads and coroutines all reduce response performance on specific paths.
- Dependency failures: fluctuations in authentication, billing, logging, storage, message queues, or network entry points can look like a model service failure when the root cause sits in a side system.
- Hotspots and imbalance: a small number of tenants, APIs, or regions can drive excessive traffic and saturate a single resource. Poor load balancing or multi-active strategies can amplify local failures.
- Retry storms: clients or gateways that retry without backoff can multiply request volume early in an incident, turning a small glitch into widespread timeouts.
Postmortems should therefore go beyond recording that service has recovered. They should answer these questions: What triggered the issue? How wide was the impact? Why was it not detected earlier? Why was it not isolated automatically? How will similar issues be prevented?
4. Observability: See First, Then Govern
Without observability, stability work becomes reactive firefighting. Teams should build at least three types of data:
- Metrics: request volume, success rate, error codes, latency percentiles, timeout rate, connection count, queue length, and resource utilization;
- Logs: structured records that include request ID, tenant ID, API name, model tier, duration, and failure stage;
- Distributed tracing: end-to-end latency and failure points from entry through authentication, scheduling, inference, and response.
Alerting should not rely only on global success rate. Tiered alerts by API, model tier, region, and tenant level work better, and they should include rules for rapid short-window error budget burn. For example, trigger on-call investigation if the error rate exceeds a threshold across three consecutive one-minute windows, or if P99 latency keeps rising. For high-frequency workloads, provide a status page or change notices so callers can quickly tell whether a problem comes from their own code or from a partial platform issue.
5. Engineering Governance: Rate Limiting, Circuit Breaking, Retries, Idempotency, and Degradation
Stability requires work from both providers and callers. Providers should offer clear error codes, timeout semantics, retry guidance, and quota policies. Callers should avoid treating remote calls as local functions that never fail.
Illustrative pseudocode:
for attempt in 1..max_attempts:if circuit_breaker.is_open(service):return fallback_response()try:resp = call_with_timeout(service, timeout=base_timeout * backoff(attempt))if resp.is_retryable_error():sleep(jittered_backoff(attempt))continuereturn respexcept Timeout:sleep(jittered_backoff(attempt))continuereturn enqueue_async_retry_or_alert()
Key principles include:
- Set explicit timeouts: use different timeouts for different APIs, and separate generation requests from query requests;
- Limit retries and use backoff: retry only idempotent or safely retryable requests, add random jitter, and prevent retry storms;
- Use idempotency keys for write operations: task submission, billing, and ticketing flows should prevent duplicate execution;
- Circuit breaking and isolation: when a model tier misbehaves, fail fast and switch to a backup strategy so shared resources are not dragged down;
- Degradation plans: during peaks, rate limit low-priority requests, shorten context, disable non-critical enhancements, or move work to asynchronous queues;
- Peak shaving and valley filling: send batch and offline tasks to message queues, and reserve capacity for online interactive paths.
6. Change Control and Fault Drills: Turning Recovery Speed into a System Capability
Fast recovery from a single incident does not mean the system is stable. Under frequent failures, quick recovery only stops the bleeding. Reducing recurrence requires change control and drills as routine practice:
- Canary releases: gradually increase traffic by tenant, region, or traffic percentage, and observe error rates and latency before a full rollout.
- Change freezes and rollbacks: freeze non-essential changes when the error budget burns quickly, and keep one-click rollback available.
- Dependency isolation: when side dependencies such as authentication, billing, or logging fail, the core inference path should still run in degraded mode.
- Capacity load testing: model different workloads, such as long-context, high-concurrency, and code generation requests, and validate rate limit thresholds and scaling speed.
- Fault drills: regularly simulate API timeouts, dependency outages, and regional entry failures to validate alerts, circuit breakers, degradation, and on-call procedures.
On a general-purpose cloud platform, teams can build this system with capabilities such as monitoring and alerting, log services, container platforms, and message queues. Baidu AI Cloud offers monitoring and alerting, log service, and container platform capabilities that can support metric collection, log search, elastic scheduling, and alert integration. Availability and specifications may vary by region, so check the official documentation. The actual design still needs to match your business SLOs and failure models.
7. Practical Checklist for Developers
If your team calls large model services frequently, complete at least the following checks:
- Have you set timeouts, retry limits, and backoff with jitter for every remote call?
- Do you distinguish retryable errors from non-retryable errors?
- Do you use idempotency keys for task submissions to avoid duplicate charges or duplicate execution?
- Have you set up local caching, asynchronous queues, and fallback responses?
- Do you monitor success rate and latency by API, model tier, and business hours?
- Do you have backup model tiers, backup entry points, or offline processing paths?
- Can you quickly determine whether a partial platform issue is
