LLM Service Reliability: How to Guarantee High Availability When "Crashes" Are Frequent
Recent localized outages at an LLM platform triggered a wave of "suspected crash" discussions, yet request success stayed above 99.9% and only an enhanced high-speed inference option was partially interrupted. This article argues that partial failures and capability degradation are not the same as a full outage, but that frequent interruptions during peak business hours can erode user trust just as badly. Drawing on the platform's own numbers—46 incidents in 30 days, a median recovery time of about 13 minutes, and roughly 96.43% overall availability—it explains why fast recovery alone is not enough and why failure frequency, not MTTR, is the real constraint. It then lays out a practical approach: define measurable SLIs and SLOs, manage error budgets with multi-window burn-rate alerts, distinguish server errors from client rate limiting, and apply fault-isolation patterns such as multi-model routing, bulkheads, circuit breakers, and async/idempotent processing, alongside six concrete client-side practices.
1. Incident Recap: Two Days of “Suspected Crash” Reports
Recently, an LLM platform experienced a series of localized service disruptions, and social media and developer communities quickly filled with concentrated “suspected crash” discussions. Post-incident statements noted that the primary inference service and public APIs had returned to normal, with real request success rates above 99.9% over the past 24 hours; only enhanced options like “high-speed inference” were partially interrupted, making the event a minor service disruption overall.
From an engineering perspective, the more telling details are the specific characteristics of the two clustered incidents:
- Afternoon of November 19: The service degraded intermittently for more than four hours, of which about 1.5 hours were inaccessible—manifesting as failed page loads, dropped connections, and low API availability.
- Evening of November 20: One day later, the coding model, primary model, high-speed inference, and preview models suffered severe request-processing anomalies in succession, lasting up to half an hour at a stretch.
Both failures landed squarely on business peaks: the afternoon is when knowledge workers research materials and draft proposals, while around 9 p.m. is when developers code and teams crunch. Key work was interrupted outright, so the negative experience was amplified quickly.
In reality, the service never fully “crashed”—it went through several localized failures. But the frequency of interruptions was enough to shake user trust, and that is the core issue here.
2. Concepts: A Partial Failure Is Not a Service Crash
Before discussing stability, it helps to separate a few easily confused concepts:
| Concept | Typical behavior | Scope | User perceptibility |
|---|---|---|---|
| Partial failure | Some models or regions see failed requests, higher latency, dropped connections | Localized, short-lived | Medium; affects some users |
| Capability degradation | Value-added features such as the high-speed or enhanced inference tiers become unavailable | Core capabilities still work | Low |
| Full outage | The service is completely unavailable | Global, sustained | Very high |
By this classification, the roughly 1.5-hour access interruption was a “partial failure,” the high-speed inference outage was “capability degradation,” and the 99.9%+ success rate indicates there was no full outage.
For users, though, the judgment does not depend on how the failure is graded. As long as an interruption occurs during critical business hours, the loss from a partial failure can be no different from a full outage.
3. Through the Lens of Reliability Theory: Why “Fast Recovery” Isn’t Enough
3.1 Fast Recovery Is Not High Availability
Over the past 30 days the platform recorded 46 incidents of varying severity—more than one per day on average—with overall availability on the worst day dropping to as low as 64.58%. Each incident was handled quickly: the median resolution time was about 13 minutes, and even the severe evening anomaly on the 20th was fully recovered within half an hour.
By the classic reliability model, availability is:
A = MTBF / (MTBF + MTTR)
where MTBF (Mean Time Between Failures) is the average operating time between two failures, and MTTR (Mean Time To Repair) is the average time from failure to recovery. The system’s overall availability over the last 30 days is about 96.43%, which means cumulative downtime of:
30 days × 24 hours × (1 − 0.9643) ≈ 25.7 hours
Averaged across incidents, that is about 33.5 minutes each—higher than the 13-minute median. This shows that failure durations follow a long-tail distribution: most are resolved in a dozen-odd minutes, while a few severe ones drive up total downtime. In other words, fast response can lower the average MTTR, but it cannot make up for the losses caused by too many failures.
3.2 The Arithmetic of Availability
Mainstream cloud services usually promise monthly availability in terms of “a few nines,” and the allowed downtime is actually quite small:
| Monthly availability | Allowed downtime over 30 days |
|---|---|
| 99.99% | ~4.3 minutes |
| 99.95% | ~21.6 minutes |
| 99.9% | ~43.2 minutes |
| 99.5% | ~3.6 hours |
| 99% | ~7.2 hours |
| 96.43% (example) | ~25.7 hours |
Converting to incident counts: if a single interruption lasts about 13 minutes, a 99.9% monthly target can absorb at most 3 interruptions; even if you compress the average MTTR to 5 minutes, it can only hold 8. Failure frequency is the real constraint, and the marginal benefit of lowering MTTR (shortening individual repairs) is very limited.
3.3 Time Weighting: A Daytime Hour Is Not a Pre-Dawn Hour
Averaging over time hides business impact. The same one-hour outage can cause losses that differ by an order of magnitude depending on whether it hits a business peak or the pre-dawn lull. We can introduce business weights to compute a weighted availability:
Weighted downtime = Σ (downtime of segment i × time-weight w_i)Weighted availability = 1 − weighted downtime / total time in the period
The time weights are best derived and normalized from historical request volume or key business metrics for each period. For example, using the historical average request volume for the same period as a baseline, each period’s weight becomes its ratio to the all-period average request volume.
In this incident, the 1.5-hour afternoon interruption plus the half-hour-plus evening interruption both fell in peak periods, so their weighted impact is far greater than an equivalent-duration pre-dawn failure. This explains why “success rate still above 99%” can feel close to a “crash” to users. It is also exactly why stability must be measured with SLIs/SLOs rather than “gut feeling.”
4. Building a Quantifiable SLI and SLO System
- SLI (Service Level Indicator): A quantitative measure of service quality, such as success rate, latency percentiles, and throughput.
- SLO (Service Level Objective): An internal target set for an SLI, usually stricter than the external SLA, leaving headroom for handling failures.
- SLA (Service Level Agreement): The service level promised to users and the compensation terms when targets are missed; its guarantees depend on whether the underlying SLOs leave enough margin.
4.1 Example SLI Definition
from collections import defaultdict# Count requests by "model + status"stats = defaultdict(int)def record(model: str, http_status: int, retryable: bool):# 4xx responses are usually client errors (e.g. bad parameters) and are counted as# successes, not as service unavailabilityif http_status < 500:stats[(model, "ok")] += 1else:stats[(model, "err")] += 1if retryable:stats[(model, "retryable")] += 1def availability(model: str) -> float:ok, err = stats[(model, "ok")], stats[(model, "err")]return ok / (ok + err) if ok + err else 1.0
In practice you must define the measurement criteria clearly, including: the time window (rolling window vs. calendar month), the denominator scope (whether to exclude client errors), and how to classify timeouts and interrupted streaming connections. Once the criteria are set, they should not be changed arbitrarily, or metrics can no longer be compared across time.
4.2 Multi-Dimensional SLO Examples
| Object | SLI | Target example |
|---|---|---|
| Public API overall | Server-side request success rate | ≥ 99.9% monthly |
| Core inference API | Success rate, first-token latency P95 | Success ≥ 99.95%, latency P95 ≤ 1s |
| High-speed inference tier | Share of available time | ≥ 99.5% monthly |
| Public API rate limiting | Share of requests throttled | ≤ 0.1% |
Targets should be derived from business needs, not “the higher the better.” If a component is only called by internal systems, 99.5% is enough; for an entry point serving many external users, you may need 99.95% or higher.
4.3 Error Budgets and Burn-Rate Alerts
At an SLO of 99.9%, the error budget is 0.1%. The remaining budget over a window can be estimated as:
Budget remaining = 1 − actual error rate / (1 − SLO)
When the budget is exhausted, there is no more room to “err” for that period. Two common budget strategies exist:
- Fast burn: Pause non-essential changes and concentrate resources on improving stability;
- Normal burn: Continue releases on schedule without breaching the SLO.
Burn-rate alerts use short and long windows in combination. For example, trigger a critical alert when the 1-hour window burn rate exceeds 14.4 and the 5-minute window also exceeds 14.4; a 1-hour burn rate this high will exhaust the monthly budget in about 2 days. Trigger a warning when the 6-hour window burn rate exceeds 6.
# PrometheusRule snippet: multi-window burn-rate alerts (adapt to your platform's rule syntax)groups:- name: llm-availabilityrules:- alert: AvailabilityFastBurn# error_ratio = 1 - availability; 1 - 0.999 = 0.001# 14.4 = (0.001 × 30 days) / 2 hours, i.e. the budget will be exhausted within 2 hoursexpr: |error_ratio:5m > (14.4 * 0.001)anderror_ratio:1h > (14.4 * 0.001)for: 2mlabels:severity: critical- alert: AvailabilitySlowBurn# 6 = (0.001 × 30 days) / (6 hours × 1 day), i.e. the budget will be exhausted within 6 daysexpr: error_ratio:6h > (6 * 0.001)labels:severity: warning
4.4 Distinguishing Server Unavailability from Client Rate Limiting
Public APIs often enforce multi-dimensional quotas per tenant—concurrency, requests per minute, token rate, and so on. When usage spikes or batch jobs are submitted all at once, many requests return errors such as “too many requests” or “quota exceeded,” which shows up statistically as a sudden availability drop even though the root cause is on the caller side. For example, a batch document-parsing script that fires off all tasks at once without controlling concurrency will easily trip rate limiting.
The right response to such issues is client-side smoothing and retries, not blaming service stability. So SLI measurement must separate server errors from rate-limit errors, and alerting must distinguish “platform failure” from “usage exceeded” signals to avoid misjudgment.
5. Architecture: Keeping Single Points of Failure From Becoming Business Outages
5.1 Redundancy and Fault Isolation
- Multi-model / multi-vendor routing: Wrap model calls behind a unified layer, and automatically switch to a backup model or vendor when the primary model is unavailable or fails repeatedly.
- Bulkhead isolation: Split quotas and connection pools by business line or tenant so that a single task cannot exhaust all resources and drag down other workloads.
- Circuit breaking and graceful degradation: After consecutive failures cross a threshold, fail fast and trigger predefined degradation logic; after a cooldown period, try to recover, preventing a sustained hammering of the failing service.
import randomimport timeclass SimpleCircuitBreaker:"""A simple in-process circuit breaker; in production, share state across instances via a state store"""CLOSED, OPEN, HALF_OPEN = "closed", "open", "half_open"def __init__(self, fail_threshold=5, cooldown=30):self.fail_threshold = fail_thresholdself.cooldown = cooldownself.failures = 0self.opened_at = 0.0self.state = self.CLOSEDdef allow(self) -> bool:if self.state == self.OPEN:if time.monotonic() - self.opened_at >= self.cooldown:self.state = self.HALF_OPEN # cooldown over, allow a probe requestreturn Truereturn Falsereturn Truedef on_success(self):self.failures = 0self.state = self.CLOSEDdef on_failure(self):self.failures += 1if self.failures >= self.fail_threshold:self.state = self.OPENself.opened_at = time.monotonic()self.failures = 0def invoke(call, breaker, fallback):if not breaker.allow():return fallback()try:result = call()except Exception:breaker.on_failure()return fallback()breaker.on_success()return result
5.2 Async, Idempotency, and Resource Quotas
- Async long-running tasks: Time-consuming tasks such as code generation and deep research can be turned asynchronous via a message queue, with clients polling or receiving callbacks. This avoids tasks being lost when a long-lived connection drops mid-way, and makes it easier for the server to throttle smoothly.
- Idempotency design: The caller attaches an idempotency key (e.g., a UUID), which the server uses to deduplicate; generation-style APIs record results per request so that timeout retries do not produce duplicate output. The caller must also validate and deduplicate results.
- Client-side resource quotas: Batch scenarios must limit concurrency and rate rather than submitting everything at once.
import asyncioimport uuidasync def batch_generate(items, call_model, max_concurrency=4):sem = asyncio.Semaphore(max_concurrency)async def one(item):async with sem:return await call_model(item, idempotency_key=str(uuid.uuid4()))return await asyncio.gather(*(one(item) for item in items), return_exceptions=True)
On cloud platforms, these designs can be built on general-purpose building blocks such as load balancers, container platforms, object storage, message queues, logging, and monitoring/alerting. For example, on Baidu AI Cloud, enterprises can compose these general products on demand to build a model service access layer with redundancy and isolation, so business applications gain automatic failover without code changes.
5.3 Observability and Capacity Planning
- Full-link instrumentation: Record request volume, success rate, per-stage latency, error-code distribution, and token consumption, broken down by model, version, tenant, and region.
- Slow-request tracing: Use distributed tracing to pinpoint latency bottlenecks.
- Capacity planning: Reserve headroom based on business growth and historical peaks, and use load testing to verify that rate-limit thresholds and circuit-breaker parameters match real traffic.
6. The Caller Side: Six Practices for Enterprise Integration
Tiered integration: Choose service tiers by task importance. Simple Q&A can use the standard tier, while critical scenarios such as code completion and batch generation should get the high-speed tier and a backup channel, with stricter SLOs for critical paths.
Timeouts and retries: Set an overall timeout and per-stage timeouts for each request. Retry only for recoverable errors, using “exponential backoff + random jitter,” and cap the maximum number of retries to avoid a retry storm.
import randomimport timeRETRYABLE_STATUS = {408, 425, 429, 500, 502, 503, 504}def call_with_retry(request, max_attempts=3, base=0.5, cap=8.0):for attempt in range(max_attempts):try:resp = request()if resp.status_code not in RETRYABLE_STATUS:return resp # 4xx such as parameter errors are returned directly, no retryexcept (TimeoutError, ConnectionError):pass # network-level timeouts and disconnects are retryableif attempt == max_attempts - 1:breakdelay = min(cap, base * 2 ** attempt)time.sleep(random.uniform(0, delay)) # full jitter, avoid synchronized retriesreturn request()
Refined timeouts for streaming: Streaming generation should not define timeouts by “fast first-token response”; instead, set an idle timeout between data chunks and capture the state after a connection drops, preventing indefinite waiting.
Predefined degradation strategy: A fallback can switch to a backup model, return cached results, prompt the user to retry later, or move the request to an async queue. The prerequisite is that the degradation path has been drilled, not improvised on the spot.
Alerting tied to on-call: The caller side needs to independently monitor success rate and latency and integrate them with on-call systems and notifications. During an incident, quickly locating whether the problem lies on your side or the platform’s can greatly shorten MTTR.
Off-peak change windows: Schedule high-load operations such as batch processing, model upgrades, and index rebuilds during business lulls to avoid stacking them on top of upstream failures.
7. Summary: Stability Is Designed, Not Just Operated
This incident shows that service stability for LLM platforms has shifted from a “nice-to-have” to the baseline requirement for production readiness. For developers and enterprises, three takeaways stand out:
- Distinguish failure levels: Partial failures and capability degradation are not necessarily crashes, but the business loss depends on when and where they occur;
- Treat frequency as the core problem: Recovery speed only shortens individual outages; availability is ultimately determined by “frequency × duration”;
- Replace gut feeling with SLI/SLO and fault-tolerance design: Turn stability from a subjective feeling into a measurable, accountable, and continuously improvable engineering capability.
For individual users, when an anomaly hits, first check whether it is a localized issue, then wait for recovery or retry later. For enterprise users, alongside continuous monitoring and error-budget management, use retry backoff, circuit breaking and degradation, multi-model routing, and async processing to isolate the volatility of external services from core business. Only then can applications such as intelligent coding and intelligent Q&A keep delivering value to the business reliably, even when failures are unavoidable.
