Ensuring Large Language Model Service Availability: Monitoring, Measurement, and Incident Response
A practical guide to measuring LLM service availability, defining incident priorities, interpreting recovery metrics, and using timeouts and retries to limit the impact of service disruptions. The article compares request-based and time-based availability, explains MTTD and MTTR, and presents a retry strategy with exponential backoff and full jitter.
1. Background
More teams are integrating large language model capabilities into everyday workflows, including document retrieval, coding assistance, data analysis, and intelligent interfaces in business systems. When an LLM service becomes unstable, the impact is rarely limited to a single feature. Queries may time out, results may be missing, and workflows may stall while users wait.
For this reason, service stability cannot depend solely on reacting after an incident occurs. It requires systematic work across three areas: measurement, protection, and operational preparedness.
LLM service incidents have several distinctive characteristics:
- They are often intermittent. An issue may last for several minutes or several dozen minutes before recovering automatically, making it difficult for external users to determine whether the service is truly unavailable.
- They often occur during peak usage periods. Weekday afternoons and evenings may generate higher request volumes and more intense resource competition.
- They may be partial rather than total outages. The service may become slower, only some requests may fail, or a specific model may behave abnormally. These “partial failures” are more difficult to detect promptly.
2. Establishing a Consistent Availability Definition
Different measurement methods can produce significantly different availability figures for the same period. Before reporting results externally, teams must agree on how availability will be calculated.
2.1 Request Success Rate
Request success rate = Successful requests / Total requests × 100%
This metric reflects the outcome experienced by users and is suitable for evaluating interface-level quality.
Two points require clarification:
- The definition of “success” must be explicit. For example, should an HTTP 200 response with an empty business result be counted as successful?
- Errors caused by the client, such as invalid parameters or authentication failures, should be distinguished from service-side failures. These requests generally should not be counted as service unavailability.
2.2 Time-Based Availability
Time-based availability = (Total duration of the measurement period − unavailable duration) / Total duration of the measurement period × 100%
This metric evaluates service status over time and is often suitable for management reporting.
In practice, teams usually sample the service at a fixed interval, such as one minute. If a probe fails during a given minute or the success rate falls below a defined threshold, that minute is marked as unavailable.
The threshold should reflect the business context. For example, treating a minute with a success rate below 95% as unavailable may better represent the actual impact than counting only periods when the service is completely unresponsive.
2.3 Why Both Metrics Are Necessary
The request success rate captures the scope of a partial failure, while time-based availability captures the duration of an interruption. Using both makes it possible to understand not only how many requests were affected, but also how long the incident lasted.
For example, assume that during a 30-day measurement period, an interface experiences a 90-minute incident with a 60% error rate and operates normally at all other times. Under a time-based calculation, the entire 90-minute period may be marked as unavailable. Under a request-based calculation, the result depends on the total number of requests and failed requests during that incident.
The two availability figures may differ substantially. Reports must clearly state which measurement method was used.
3. Incident Severity and Prioritization
A practical severity model can classify incidents according to their impact and duration:
| Severity | Typical symptoms | Response requirements |
|---|---|---|
| P0 | A core interface is completely unavailable, or widespread timeouts occur during peak usage | Respond immediately; the responsible owner remains engaged throughout the incident |
| P1 | Some models or features are unavailable, and the error rate increases significantly | Respond within 30 minutes and develop a temporary mitigation |
| P2 | An individual feature behaves abnormally or latency increases, but an alternative path exists | Address during working hours |
| P3 | Minor fluctuations that do not affect primary workflows | Record the issue and include it in periodic optimization |
The time of occurrence should also be considered when assigning severity. A 30-minute incident during overnight hours may cause significantly less damage than the same incident during a business peak.
Teams can assign greater weight to incidents during peak periods so that alerting and resource allocation better reflect actual business loss.
4. Interpreting Recovery Metrics Correctly
Many teams use mean time to repair or median recovery time as indicators of service stability. These metrics are useful, but relying on either one alone can be misleading.
- The median reflects a typical incident but hides the long tail. If half of all incidents recover within 13 minutes while a small number last for several hours, the median may still look favorable.
- The mean is sensitive to extreme values. A few unusually long incidents can raise it significantly, so it should be interpreted together with the overall distribution.
- Teams should track both MTTD (Mean Time to Detect) and MTTR (Mean Time to Recover or Repair). For many incidents, a substantial portion of the damage occurs before detection, while users are already affected and the team is still unaware of the problem.
Reports should include recovery-time P50, P90, and P99 values, along with the number of affected requests for each incident. This provides a more reliable basis for determining whether an improvement actually reduced user impact.
5. Engineering Protection on the Calling Side
Service-side stability is not fully controlled by the caller, but calling applications can significantly reduce the extent to which an incident propagates.
5.1 Timeouts and Retries
Timeouts must be configured explicitly rather than relying on default values.
Retries should use exponential backoff with random jitter. This prevents large numbers of clients from retrying simultaneously and creating a secondary traffic surge. Only retry errors that are potentially recoverable, such as network timeouts, server-side 5xx responses, and rate limiting. Deterministic failures, such as invalid parameters, should be returned immediately.
Example pseudocode:
function call_with_retry(request, max_attempts = 4):base_delay = 0.5 secondsfor attempt in 1..max_attempts:response = send(request, timeout = 20 seconds)if response.ok:return responseif not is_retryable(response.error):raise response.errordelay = base_delay * 2^(attempt - 1)delay = random_between(0, delay) // Full jittersleep(delay)raise RetryExhausted
The full-jitter strategy randomly distributes each client’s waiting time within the calculated interval, helping spread out retry traffic.
The maximum number of retry attempts should remain small. Otherwise, retry traffic may amplify the incident while the service is already experiencing problems.
