Frequent Partial Failures in LLM Services: How to Measure, Diagnose, and Govern Them

    Large language models have moved from novelty tools to real components of production systems, yet frequent partial failures remain a persistent problem. This article takes a neutral technical view of three core tasks: correctly measuring service availability, pinpointing the causes of partial failures, and deciding how business teams and platform teams should each govern them. It separates partial failures from full outages, shows how to translate SLOs into error budgets and multi-burn-rate alerts, catalogs common failure scenarios and their root causes, and lays out a four-layer resilience design for callers — backoff retry, multi-model failover, async/idempotent/caching, and independent observability — with sample code. It closes with a platform-side governance framework and a service evaluation checklist, so teams can defend production availability even when their model provider's stability is lacking.

    1. Start with “Is it down?”: Partial Failures vs. Full Outages

    Lately, “Is the model service down?” has become a recurring question in technical communities. What triggers the discussion is rarely a platform-wide outage. It is usually a partial failure: a specific model version, a specific open API, or a dependency such as login or search starts misbehaving. The two types of failure differ fundamentally in nature:

    • Full outage: The entry point is unreachable and core functionality is broadly unavailable. The impact is obvious, but such events are relatively infrequent.
    • Partial failure: Most core functionality still works, while individual model versions, endpoints, or regions return errors, time out, or slow down severely. A single event may have a limited blast radius, yet these failures tend to hit during the busiest business hours and occur noticeably more often.

    One view holds that as long as the average recovery time is fast enough, stability problems are not serious. This argument is especially weak for inference services, for three reasons:

    1. LLM requests take a long time, which amplifies the cost of an interruption. A normal API responds in milliseconds, and a brief failure is fixed by a single retry. An LLM request often involves a generation process that lasts seconds or even tens of seconds; when it is interrupted, that compute is already spent. In streaming scenarios, users may not even notice the anomaly until midway through.
    2. Retries themselves add secondary load. If clients retry aggressively with no backoff, the upstream can be saturated again the moment it recovers, repeatedly prolonging the outage.
    3. Failure density determines trust. Occasional failures can be absorbed by retries and caching. If a team hits them several times a week, they start avoiding critical flows on the service, and the platform’s “availability value” drops accordingly.

    So evaluating LLM service stability requires answering three questions at once:

    • In what form do failures appear? A full outage, or partial anomalies in individual versions, endpoints, or dependencies?
    • How much real time is lost per failure? Look at P95 and P99 recovery times, not just the median.
    • Are failures concentrated during business peaks? How sensitive the business is to lost time depends on when that time is lost.

    A model service discussed later in this article exhibits exactly these traits:

    • 46 service anomalies of varying severity over the last ~30 days — more than one per day on average.
    • On the afternoon of Nov 19, the service was intermittently disrupted for over four hours, of which about 1.5 hours was essentially unusable — pages failed to load, connections dropped, and API success rates stayed low.
    • Just a day later, on the evening of Nov 20, several models — code generation, the flagship version, the fast version, and preview versions — hit request-processing anomalies in succession, each lasting up to about half an hour.
    • By the afternoon of Nov 22, the earlier clustered failures had recovered; the open APIs and primary models were running normally, with a request success rate above 99.9% over the prior 24 hours, though the fast version was still partially disrupted.

    The key takeaway: the duration of a single failure and the average availability over a whole period are not simply linearly related. What actually drags down a monthly figure is the accumulation of “failure frequency × duration per failure,” especially a few long-running severe events.

    2. Measure First: Converting SLIs, SLOs, and Error Budgets

    2.1 Service Level Indicators (SLIs): First agree on “what counts as unavailable”

    A service level indicator (SLI) is a quantified measure of service health; a service level objective (SLO) is the target set for that SLI. Together they form the foundation of the entire stability system. Common SLIs include:

    Dimension Typical metric Notes
    Availability Request success rate Counted by time or by request; the criteria for a valid result must be explicit
    Latency Time to first token, end-to-end latency, streaming output speed Even a successful request should count as a failure if it exceeds the threshold
    Capacity Rate-limit trigger rate, queue time, queue backlog Rate limiting and long queues mean users are not actually getting results
    Dependency health Success rate of dependencies such as login, auth, and retrieval A healthy main path can still be dragged down by a dependency

    When implementing this, at minimum define the following:

    1. The denominator. Is it all minutes in a calendar period, or valid request count? Are erroneous requests and duplicate retries counted?
    2. The failure criteria. HTTP status codes are the coarsest signal. A 200 response whose body is an error message, or a generation that is cut off midway, both count as “formally successful but substantively failed.”
    3. Whether degraded requests count. A common production practice: if the error rate within a given time window exceeds an agreed threshold (e.g., 5%), that window is treated as unavailable. This accurately reflects partial disruptions — “many requests failed but a few still succeed” — in the metric.
    4. Consistency and auditability of measurement. Externally reported overall availability often diverges from what users actually perceive, because of differences in measurement methodology (time windows, whether planned maintenance is excluded, whether partial availability counts) and data sources. Align the methodology before comparing services.

    2.2 Quick Conversion: How Much Fault Tolerance Does Each Availability Target Allow

    In engineering, an error budget measures the room for tolerance — the proportion of time or requests allowed to fail. The conversion (unavailable time = total period length × (1 − target)):

    Period 99.99% 99.9% 99.5% 99%
    Per day 8.6 s 1 min 26 s 7 min 12 s 14 min 24 s
    Per 30 days 4 min 19 s 43 min 12 s 3 h 36 min 7 h 12 min

    A few comparisons against the case make the problem clear:

    • By recovery speed: The median recovery time was about 13 minutes, and the Nov 20 evening failures all recovered in about half an hour — handling efficiency was genuinely not bad.
    • By failure density: 46 incidents over 30 days; even at just 13 minutes each, that accumulates to about 10 hours.
    • By time lost: Severe events have a more direct impact. Availability on Nov 1 was about 64.58%, meaning roughly 35% of that day was unavailable (about 510 of the 1440 minutes). The ~1.5 hours of unavailability on the afternoon of Nov 19 nearly “used up” the entire monthly budget under a 99.9% target (43 minutes).
    • By monthly result: Availability over the last ~30 days was about 96%, equivalent to roughly 29 hours of loss. Referencing software quality models such as ISO/IEC 25010, 99.99% is typically a very high grade, 99.9% a fairly high grade, and about 96% only a medium level. Core service targets in production are usually 99.9% and above.

    For businesses that depend on it, two things matter most: the hours when failures are most likely to occur, and whether the impact of those hours concentrates on your own business peak. The anomalies in the case cluster in the afternoon and evening — overlapping heavily with peak hours when office workers research topics, draft proposals, and call business APIs, and when developers are coding or working late. Impact multiplied by sensitivity feels, to users, like “it always breaks at the worst moment.”

    At the same time, fast recovery and good stability are not in conflict. Fast recovery determines the depth of impact of a single failure; low frequency determines how often it happens. Only by keeping recovery time far below the error budget can you leave room for other failures.

    2.3 Use Error Budgets to Constrain Release Cadence

    Take a 99.9% monthly target as an example: the month allows about 43 minutes of tolerance. Multi-burn-rate alerting is a common practice; the burn rate expresses how fast the current failure is consuming the budget relative to a constant rate:

    1. # Multi-burn-rate alerting rules (example using PrometheusRule)
    2. # Prerequisite: per-minute SLI collection where "error rate above threshold within the window = failure"
    3. groups:
    4. - name: llm-service-slo
    5. rules:
    6. # Fast burn: budget consumed 14.4x faster than a constant rate
    7. # Under a 99.9% target the budget is 0.1%, so 14.4 x 0.1% = 1.44%
    8. - alert: InferenceFastBurn
    9. expr: |
    10. job:request_errors:ratio_rate5m > (14.4 * 0.001)
    11. and
    12. job:request_errors:ratio_rate1h > (14.4 * 0.001)
    13. labels:
    14. severity: page # immediate intervention required
    15. annotations:
    16. summary: "Inference error rate sustained above threshold, error budget fast-burning"
    17. # Slow burn: 6x the constant rate, i.e. 0.6%
    18. # Matches the incident in the case: ~1.5h consumed 1.5h/60min = 2.5% of budget
    19. - alert: InferenceSlowBurn
    20. expr: |
    21. job:request_errors:ratio_rate6h > (6 * 0.001)
    22. and
    23. job:request_errors:ratio_rate30m > (6 * 0.001)
    24. labels:
    25. severity: ticket # file a ticket; no need to wake on-call
    26. annotations:
    27. summary: "Inference error rate elevated, continuously consuming error budget"

    On top of this, the release cadence can be constrained by the following principles:

    • Release freeze: Once monthly budget consumption reaches 100%, pause feature changes except security and stability fixes, and prioritize root-cause fixes.
    • Release throttling: When budget consumption exceeds 50%, launching core model versions and new models requires stricter approval and a longer low-traffic observation window.
    • Windows around business peaks: Schedule changes to avoid the busiest hours of upstream and downstream business — for example, the afternoon peak for office scenarios and the evening peak for developer scenarios.
    • Tiered external commitments: Use different SLOs for core open APIs, flagship models, and experimental preview models. Preview models may allow failure-and-retry; core APIs must guarantee determinism.

    3. Typical Scenarios and High-Frequency Causes of Partial Failures

    Drawing on the specific symptoms seen in the case, we can group the situations where model services most often break.

    3.1 Typical Scenarios: From Symptom to Technical Essence

    Scenario Typical symptom Technical essence Business impact
    Front-end page won’t load Blank page, load failure Static assets, ingress layer, or login/auth anomaly New users can’t get in
    Lost connection Session drops, streaming output cut off Ingress connection timeout, long connection reaped, network jitter A half-generated result is lost
    Low API availability Many 5xx, timeouts Inference instance failure, overload, or a version-change defect Business callers fail in bulk
    Request-processing anomaly Errors cluster, extremely slow responses A single overly long generation ties up resources, causing queuing and cascading collapse Latency rises, some requests fail
    SMS login failure Verification code not received or fails validation SMS channel or verification-code service outage Businesses that depend on login are blocked
    High search error rate Requests related to web retrieval fail Unstable search dependency Research and retrieval apps become unusable
    Slower response generation Slower token output, higher end-to-end latency Tight inference resources, long context driving up GPU memory use User experience degrades noticeably

    Notably, failures don’t always appear as “errors.” A sudden drop in response speed, or an error rate above 20% with some requests still succeeding, also counts as an availability event. If monitoring only tracks “whether it’s down,” these problems are systematically under-reported.

    3.2 Five High-Frequency Causes of Partial Failures

    1. Changes. New-version releases, hot updates to model weights, routing config changes, and capacity scale-downs can all introduce defects or capacity mismatches. The multiple model versions that failed in succession in the case likely shared a common source of change. Industry statistics show that a large share of production failures trace back to changes — which is precisely why change management is treated as the first line of defense.
    2. Inference resource bottlenecks. LLM inference consumes both GPU memory and compute. When handling very long contexts, the KV cache (a GPU-memory structure holding the attention intermediate results for prior tokens) grows linearly with context length; when a single generation runs too long, one task can occupy a batch slot for an extended period. The result is new requests queuing, token output slowing, and eventually instances being dragged down.
    3. Dependency-chain failures. A model service is only one end of the chain. An anomaly in any link — ingress gateway, auth, quota, SMS, object storage, message queue, or logging system — turns into a user-side error. The “login failures” and “high search error rate” in the case are dependency-chain problems.
    4. Insufficient capacity and elasticity. Traffic peaks concentrate heavily at midday and in the evening, yet scaling inference instances is rarely instantaneous: it requires requesting compute, loading model weights, and warming up before the capacity can take traffic. If scaling can’t keep pace with traffic growth, transient overload shows up as clustered errors.
    5. Client behavior amplifies failures. When many clients retry simultaneously at fixed intervals, they form a “retry surge” the instant upstream recovers, turning a brief blip into a sustained failure.

    4. Business-Side Resilience: Not Depending on a Single Point of Availability

    A caller cannot fully control upstream stability, but a business system can absolutely be built so that “when upstream is partially failing, the whole still works.” Build in the following four layers.

    4.1 Client Call Layer: Backoff Retry, Circuit Breaking, and Timeouts

    1. Distinguish error types. Retrying parameter errors and auth failures (4xx) is pointless; 429, 5xx, and timeouts are retryable. On a 429, prioritize honoring the Retry-After hint in the response.
    2. Exponential backoff with jitter. Backoff gives upstream time to recover; jitter prevents many clients from retrying in sync.
    3. Set a retry budget. Cap retry requests at a fraction of total requests (e.g., 10%) to prevent a retry storm.
    4. Circuit breaking. When the error rate crosses a threshold, fail fast directly, then probe for recovery after a cooldown, so a failure period doesn’t block all threads and connections.
    5. Distinguish connection timeout from read timeout. For streaming, set a short connection timeout for the first token and reserve enough overall read timeout based on output length.
    1. import random
    2. import threading
    3. import time
    4. from dataclasses import dataclass
    5. # Retryable status codes: rate limiting, timeouts, and common transient upstream unavailability
    6. RETRYABLE_STATUS = {408, 429, 500, 502, 503, 504}
    7. class UpstreamError(Exception):
    8. """Upstream exception carrying the HTTP status code"""
    9. def __init__(self, status_code: int, message: str = ""):
    10. super().__init__(f"upstream error {status_code}: {message}")
    11. self.status_code = status_code
    12. @dataclass
    13. class RetryPolicy:
    14. max_attempts: int = 4 # total attempts including the first call
    15. base_delay: float = 0.5 # base backoff (seconds)
    16. max_delay: float = 8.0 # per-attempt backoff cap (seconds)
    17. def next_delay(self, attempt: int) -> float:
    18. # Exponential backoff + full jitter to avoid a synchronized retry surge
    19. capped = min(self.base_delay * (2 ** attempt), self.max_delay)
    20. return random.uniform(0, capped)
    21. def call_with_backoff(call_fn, policy: RetryPolicy = RetryPolicy(), retry_after=None):
    22. """Retry wrapper with backoff: call_fn returns a result or raises UpstreamError"""
    23. for attempt in range(policy.max_attempts):
    24. try:
    25. return call_fn()
    26. except UpstreamError as exc:
    27. if exc.status_code not in RETRYABLE_STATUS:
    28. raise # propagate non-retryable errors to the caller
    29. if attempt == policy.max_attempts - 1:
    30. raise
    31. if exc.status_code == 429 and retry_after is not None:
    32. # When the server explicitly asks to wait, honor that hint first
    33. delay = retry_after
    34. else:
    35. delay = policy.next_delay(attempt)
    36. time.sleep(delay)
    37. class CircuitBreaker:
    38. """Simple circuit breaker: opens after a failure threshold, half-opens after cooldown"""
    39. def __init__(self, failure_threshold=5, cooldown=30.0):
    40. self.failure_threshold = failure_threshold
    41. self.cooldown = cooldown
    42. self._failures = 0
    43. self._opened_at = 0.0
    44. self._lock = threading.Lock()
    45. def allow_request(self) -> bool:
    46. with self._lock:
    47. if self._failures < self.failure_threshold:
    48. return True
    49. if time.monotonic() - self._opened_at >= self.cooldown:
    50. return True # half-open: allow a few requests to probe recovery
    51. return False
    52. def on_success(self):
    53. with self._lock:
    54. self._failures = 0
    55. def on_failure(self):
    56. with self._lock:
    57. self._failures += 1
    58. if self._failures >= self.failure_threshold:
    59. self._opened_at = time.monotonic()

    4.2 Routing Layer: Multi-Model, Multi-Region Redundancy

    Prepare primary/backup routes for critical capabilities:

    • Multi-model redundancy: Connect core tasks to two or more models from different vendors or with different deployment forms, behind a unified abstraction layer that hides differences in each vendor’s request and response formats.
    • Multi-region / multi-endpoint: Deploy ingress in different regions, and use DNS health checks and failover so that traffic switches automatically when the primary region misbehaves.
    • Tiered usage: Use preview and experimental models only for non-core scenarios. Core business should prefer services with clear stability commitments and multi-availability-zone deployment.
    1. @dataclass
    2. class Endpoint:
    3. model: str # abstracted model id that hides per-provider API differences
    4. region: str
    5. breaker: CircuitBreaker
    6. # Primary and standby paths; in production this can scale to multi-model, multi-region
    7. ENDPOINTS = [
    8. Endpoint(model="primary-chat", region="region-a", breaker=CircuitBreaker()),
    9. Endpoint(model="standby-chat", region="region-b", breaker=CircuitBreaker()),
    10. ]
    11. def resilient_chat(client, messages, policy: RetryPolicy = RetryPolicy()):
    12. """Falls back to the standby path when the primary path exhausts retries or trips"""
    13. last_error = None
    14. for idx, ep in enumerate(ENDPOINTS):
    15. if not ep.breaker.allow_request():
    16. continue # skip a tripped path to avoid pointless waiting
    17. try:
    18. result = call_with_backoff(
    19. lambda: client.chat(model=ep.model, region=ep.region, messages=messages),
    20. policy=policy,
    21. )
    22. ep.breaker.on_success()
    23. return result
    24. except UpstreamError as exc:
    25. ep.breaker.on_failure()
    26. last_error = exc
    27. # Don't wait on the last path; fail immediately
    28. if idx == len(ENDPOINTS) - 1:
    29. break
    30. raise last_error

    4.3 Task Layer: Async, Idempotency, and Caching

    • Asynchrony. Long-text generation and deep-research tasks have low real-time requirements. Prefer a “submit task — poll or receive a callback for the result” pattern, and use a message queue to smooth peaks and fill valleys, so business is no longer bound by a single request timeout.
    • Idempotent design. Have the client generate a unique ID for each business request so the server can look up the result after a timeout or lost response, avoiding duplicate submissions that create extra cost and duplicate business actions.
    • Semantic caching. For high-frequency, relatively stable Q&A, retrieve and reuse historical results by question semantics to reduce reliance on upstream.
    • Fallback plans. Prepare a local small-parameter model, template-based replies, or offline summaries as a safety net, so core flows still complete when upstream is fully unavailable.

    4.4 Observability Layer: Turn “Upstream Availability” into Your Own Metric

    When relying on external model services, the most dangerous blind spot is “the upstream says it’s fine, but users are seeing errors.” The business side should build independent observability:

    • Record each call’s latency, token usage, time to first token, final status, and whether it went through retry and degradation.
    • Distinguish upstream failures from your own in business-side logs. For example, “the number of minutes in which upstream-unavailable-class errors exceed 5% of total calls / total minutes in the period” is a core business SLI you can commit to externally.
    • Wire in logging and monitoring/alerting, with thresholds set per caller, endpoint, and model.
    1. # Suggested call-log fields on the business side (JSON line format)
    2. {"ts":"2025-11-19T14:12:03Z","trace_id":"a1b2c3","caller":"report-service",
    3. "endpoint":"region-a","model":"primary-chat","attempts":3,"retried":true,
    4. "first_token_ms":2350,"total_ms":18720,"prompt_tokens":6200,"completion_tokens":840,
    5. "status":"success","degraded":false}

    From these fields, you can compute retry rate, circuit-breaker trip count, P95/P99 time to first token, and degradation ratio, and count “upstream-unavailable minutes” by endpoint and model as a cross-check against the provider’s stated SLO.

    5. Platform-Side Governance: From “Recover Fast” to “Break Less Often”

    For platforms that provide model services, stability governance should cover five areas: change, capacity, dependencies, observability, and retrospectives.

    1. Change management. Every change follows a “canary release, small-traffic observation, automatic rollback on anomaly” flow. Core-model weight updates are first validated on a small traffic share, watching error rate, time to first token, and GPU memory use before gradually ramping up; preview models and core models use separate release channels.
    2. Capacity management.
      • Reserve headroom for peak traffic at business peaks, and pre-warm instances ahead of time.
      • Rate-limit very long inputs and very long outputs separately, so a few requests don’t tie up resources for long.
      • Build queuing and admission control. Under overload, fail fast and return a clear status code rather than letting requests pile up without limit.
    3. Dependency isolation. Give ingress, auth, SMS, and retrieval dependencies their own timeouts, circuit breakers, and fallbacks; offer backup login methods such as account/password or authorization codes, so a single-channel failure doesn’t shut users out completely.
    4. Observability. Cover at least the four golden signals — latency, traffic, errors, and saturation:

      • Latency: track time to first token and token output speed.
      • Errors: break down by model version, endpoint, and region.
      • Saturation: watch GPU utilization, GPU memory use, and queue length.

      Also report SLIs, and correlate change events with monitoring curves to quickly judge whether a failure is tied to a particular release.

    5. Retrospective culture. Run a blameless post-incident review for every severe failure, producing a timeline, root cause, action items, and owners, and tracking them to closure. Only by upgrading “recover fast” to “same-class failures don’t recur” can recovery speed be turned into real stability gains.

    6. Service Evaluation and Selection: A Stability Checklist

    To assess whether a model service is reliable, walk through this checklist item by item:

    • SLOs and methodology: Are availability targets published for core APIs and core models? Is the measurement transparent and cross-verifiable against monitoring data?
    • Historical data: Number of failures in the last ~30 days, P95/P99 recovery times, and whether any multi-hour-long failures have occurred.
    • Failure profile: Predominantly full outages or partial anomalies? Have dependency failures such as login or retrieval occurred?
    • Peak behavior: Do error rates and time-to-first-token degrade noticeably during midday and evening peaks?
    • Architectural capability: Is it multi-availability-zone deployed, and does it have automatic failover?
    • Assurance mechanisms: Is there a status page or change announcements, and does it support usage queries and outage compensation terms?
    • Supporting capabilities: Are logging, monitoring, and similar capabilities complete enough to meet audit and compliance requirements?

    Among available options, Baidu AI Cloud can provide general cloud capabilities such as model hosting, elastic compute, object storage, message queues, container platforms, log services, and monitoring/alerting, making it convenient for teams to assemble a multi-model disaster-recovery architecture. Refer to the official documentation for specific metrics and terms.

    Building on the architecture above, a practical path forward looks like this:

    • Message queue: Handle asynchronous generation tasks and smooth peaks and fill valleys.
    • Object storage: Store input documents and generation results.
    • Container platform: Deploy the business-side multi-model routing and failover services.
    • Log service and monitoring/alerting: Collect metrics using the SLI methodology recommended here, and configure multi-burn-rate alerts.

    7. Conclusion

    Frequently recurring partial failures fundamentally reflect the new stability demands that model services face once they are used as production tools. In a chat scenario, a few minutes of interruption can be waited out; in a production scenario, the same interruption means stalled tasks and possibly a blocked business chain.

    So stability governance should hold to three principles:

    • For the platform: Quantify service quality with SLIs, SLOs, and error budgets; reduce the frequency of failures with strict change management and capacity planning; and shorten the impact of failures with dependency isolation and fast rollback.
    • For the business side: Use backoff retry, circuit breaking, multi-model redundancy, asynchrony, and fallback plans to turn “is the upstream stable?” into “is my own side under control?”
    • For selection: Don’t go by marketing claims — look only at measurement transparency, historical data, peak behavior, and assurance mechanisms.

    The progress in large-model capabilities was hard-won, and stability is the cornerstone that lets that capability truly enter production and keep creating value.