LLM Service Stability Governance: A Practical Guide to Reliability, SLOs, and Graceful Degradation

    This article examines why short, localized LLM service disruptions can trigger widespread user complaints, and how to turn "it crashed" into measurable engineering metrics such as availability, request success rate, latency percentiles, and MTTR. It breaks down four common root causes of reliability decay, then provides concrete client-side protections with code and pseudocode for exponential backoff retries, circuit breaking, multi-provider routing, and asynchronous caching. It also outlines a platform-side governance framework, tier-based SLO and error budget recommendations, capacity planning guidance, and an enterprise vendor evaluation checklist. Readers will learn how to treat large language models as jitter-prone external dependencies and keep them inside controllable boundaries.

    1. Background: Why a Localized Outage Triggered Widespread Feedback

    A large model service platform recently experienced a localized service disruption that led many users to ask whether the entire platform was down. From an engineering perspective, the main service remained operational, with a real request success rate above 99.9% over the previous 24 hours. Only a few high-tier inference levels were partially interrupted, which qualifies as a minor service disruption. What amplified the user experience was not the absolute duration of the incident, but the time window in which it occurred.

    The first anomaly happened on a weekday afternoon and lasted more than four hours, with about one and a half hours of complete unavailability. The symptoms were pages failing to load, connections being reset, and a sharp drop in API availability. The afternoon is peak time for knowledge retrieval, document drafting, and batch API calls from business systems. The second anomaly occurred after 9 p.m., when multiple model tiers and coding-related capabilities experienced severe request processing failures for up to half an hour, overlapping with developers’ evening coding and overtime work.

    The conclusion is clear: consecutive failures during the most sensitive business peaks, even with fast recovery each time, significantly weaken users’ willingness to entrust critical tasks to the platform. Stability is not an average-value game; it is a matter of how failures overlap with the business peak curve.

    2. Translating “It Crashed” into Measurable Metrics

    What users call a “crash” must be decomposed into measurable metrics; otherwise, it cannot be diagnosed or improved.

    • Availability: the proportion of successful response time within the measurement window. Specify whether it is weighted by request count or by time.
    • Request success rate: successful requests divided by total requests, excluding non-server factors such as client-side parameter errors.
    • Latency percentiles: P50, P95, and P99 are more meaningful than average latency, because the long tail determines experience.
    • Error rate and error code distribution: distinguish rate limiting, timeouts, upstream dependency failures, and model queuing.
    • MTTR and median repair time: these measure responsiveness but cannot replace stability itself.

    According to publicly available post-incident data, the platform had 46 incidents of various sizes in the past 30 days, more than one per day on average. On the worst day, full-day availability dropped to 64.58%, with severely degraded response generation speed. There were also cases where retrieval request error rates exceeded 20%, SMS login failures occurred, and model response latency increased. The median repair time was about 13 minutes, and severe incidents were mostly resolved within half an hour. However, overall availability over the past 30 days was only 96.43%.

    One common misconception must be emphasized here: 96.43% monthly availability translates to more than 15 hours of monthly downtime, which is unacceptable for callers integrating core business systems. Fast repair only reduces impact scope; it cannot offset the cumulative risk caused by frequency.

    3. Four Root Causes of Stability Decay

    1. Capacity and queuing: inference is a resource-intensive workload. Under peak concurrency, batch queues back up, directly raising P99 latency and even triggering timeouts.
    2. Long dependency chains: jitter in any component—gateway, authentication, quota, retrieval augmentation, logging, or metering—can surface upstream as model unavailability.
    3. Changes and releases: insufficient canary rollout of model versions, inference tiers, or routing policies can easily cause localized anomalies in specific tiers.
    4. Insufficient observability: without fine-grained metrics by tier, API, and region, diagnosis relies on user feedback rather than system alerts.

    4. Client-Side Engineering Protection: Turning Unavailability into Degradation

    For consumers, the right approach is to assume the upstream will jitter and to reserve fallback paths in the architecture.

    4.1 Be Restrained with Timeouts and Retries

    Retries must use exponential backoff with jitter and a strict retry limit. Otherwise, they create a retry storm that turns a local failure into a global avalanche.

    1. import random, time, requests
    2. def call_with_backoff(url, payload, max_retries=3, base=0.5):
    3. for attempt in range(max_retries + 1):
    4. try:
    5. resp = requests.post(url, json=payload, timeout=(3, 30))
    6. if resp.status_code in (429, 500, 502, 503, 504):
    7. raise RuntimeError(f"retryable status {resp.status_code}")
    8. resp.raise_for_status()
    9. return resp.json()
    10. except Exception as e:
    11. if attempt == max_retries:
    12. raise
    13. sleep = base * (2 ** attempt) + random.uniform(0, 0.3)
    14. time.sleep(sleep)

    Key points: retry only idempotent and retryable error codes; prioritize a total budget (time limit) over a retry count limit; introduce idempotency keys for non-idempotent write operations.

    4.2 Circuit Breaking and Degradation

    When the error rate or latency exceeds a threshold, fail fast and fall back to cached results, a rules engine, or a small-parameter model, avoiding threads and connections being occupied for a long time.

    1. Error rate > 20% for 30s -> open circuit breaker
    2. During open state, return cached/fallback results directly
    3. Half-open probe releases a small number of real requests every 10s
    4. 5 consecutive successes -> close circuit breaker

    4.3 Multi-Provider and Multi-Tier Redundancy

    Abstract requests into a unified capability interface, and configure multiple providers or model tiers at the routing layer with weights and priorities. This allows seamless switching when a single platform has a localized anomaly.

    4.4 Asynchronous Processing and Result Caching

    For long-running generation tasks, switch to a submit-and-poll or callback model, and use a message queue for peak shaving. Build semantic caches for high-frequency repeated questions to reduce cost and improve availability.

    5. Platform-Side Governance Framework

    If the platform builds these capabilities, the following layered approach can be used:

    • Access layer: multi-region entry points, connection reuse, rate limiting and quota isolation to prevent a single tenant from monopolizing resources.
    • Scheduling layer: separate pools by tier, separate long and short requests, and use priority queues to protect online interactive traffic.
    • Inference layer: dynamic batching and GPU memory management, with queue limits and fast rejection policies.
    • Dependency layer: weak dependencies such as authentication, metering, and retrieval must be degradable; strong coupling that blocks the main path is prohibited.
    • Observability layer: metrics, logs, and distributed tracing, with SLO dashboards and tiered alerts by tier and API dimension.
    • Drill layer: regular fault injection and load testing to verify that circuit breaking, switching, and rollback paths actually work.

    6. SLO and Capacity Planning Recommendations

    Upgrade the target from “average availability” to tier-based SLOs. For example, the online interactive tier should have monthly availability of at least 99.9%, while long-text and research tiers can be relaxed with explicit latency expectations. Establish an error budget mechanism: when the budget is exhausted, freeze non-essential changes to prioritize stability. For capacity planning, reserve headroom based on historical peaks rather than averages, and set admission control and queuing notifications for burst traffic so users receive predictable feedback instead of silent waiting.

    7. Enterprise Selection and Integration Checklist

    • Does it provide clear availability commitments and incident notification mechanisms?
    • Does it support unified access and canary switching across multiple tiers and capabilities?
    • Does it offer fine-grained monitoring data and audit log export?
    • Does it support private network access and data residency options?
    • Does it provide load testing support and joint drill mechanisms?

    8. Conclusion

    A localized incident becomes a public relations event because of a mismatch between stability supply and business criticality. For consumers, the answer is to treat intelligent models as “jitter-prone external dependencies” and contain them with timeouts, retries, circuit breaking, degradation, and multi-active architecture. For platforms, the answer is to make stability an engineering system that is measurable, drillable, and committable. Baidu AI Cloud’s general-purpose components, such as container platforms, message queues, log services, and monitoring and alerting, can serve as building blocks for the resilience architecture described above. Only then can large models truly carry high-intensity daily production tasks.