How to Keep Your Business Running When AI Service Performance Degrades
When an AI service you depend on slows down or goes partially offline, the difference between a minor hiccup and a major outage often comes down to preparation. This guide walks through how to read a service status page correctly, a step-by-step incident response checklist, and practical application-layer resilience patterns including retry with exponential backoff and jitter, fallback paths, per-dependency configuration, circuit breakers, and observability. Code examples in Python are included.
A Note on the Example Scenario
This article uses a hypothetical scenario to illustrate an incident response workflow. The timeline and impact described are illustrative only and do not correspond to any real event. During an actual incident, rely on the provider’s official status page and its public records, and verify each affected component against the status page directly.
How to Read a Service Status Page
The status page is your first source of truth for determining whether the problem is on your side or the provider’s. Platforms differ in how they name and define statuses, so read the explanations on the specific platform’s status page first. The table below shows common statuses, what they mean, and what developers typically should do:
| Status | Meaning | Typical Developer Action |
|---|---|---|
| Operational | Service running as expected | Maintain normal monitoring |
| Degraded performance | Service is up, but latency is elevated or success rates are lower | Tighten timeouts, watch error rates, prepare fallback plans |
| Partial outage | Some requests, regions, or components are affected | Check which endpoints you call against the affected list; enable fallback if needed |
| Major outage | Core functionality is broadly unavailable | Switch to fallback paths, pause non-critical batch jobs |
Do not dismiss “degraded performance.” It is often a precursor to a more serious outage, so prepare early.
Two more things to watch when reading a status page. First, a single incident usually affects only some components. The console, account system, or infrastructure may be fine while model inference or a particular connector is failing. Check each endpoint you actually call rather than drawing conclusions from the overall picture. Second, historical notices are listed chronologically. An old, resolved notice may have an entirely different root cause from the current problem—conflating the two leads to wrong attribution and wasted debugging.
Incident Response Checklist
When a service you depend on misbehaves, handle it in the following order.
Step 1: Preserve your work. Immediately save any unsaved session context, generated code, and task state. Long-running tasks should be designed with checkpointing or intermediate result persistence. Do not include API keys, credentials, or personal information in what you save.
Step 2: Identify the source of the failure. Check the official status page and its announcement timeline to confirm whether the components you call are on the affected list.
Step 3: Rule out causes on your side. If the provider has not yet published a root cause, don’t rush to change your own configuration, keys, or network settings. Try a different network, a different account, or retry with minimal parameters. If all of these fail and the status page confirms an outage, you can largely rule out your own setup.
The following probe function checks connectivity. It distinguishes client errors, server errors, and timeouts—but probing results are not a substitute for the official status page.
import timeimport requestsdef probe(endpoint, payload, headers=None, timeout=10, retries=3):"""Health probe: checks connectivity and basic availability.Not a substitute for the official status page.Returns (status, message). Status is one of ok, client_error,server_error, timeout, network_error."""last_status = "server_error"for attempt in range(retries):try:with requests.post(endpoint, json=payload, headers=headers, timeout=timeout) as resp:code = resp.status_codeif code == 200:return "ok", "Service is healthy"if 400 <= code < 500:# 4xx usually means bad request parameters or auth issues; retrying won't helpreturn "client_error", f"HTTP {code}, check request parameters and API key first"last_status = "server_error"except requests.Timeout:last_status = "timeout"except requests.RequestException:last_status = "network_error"if attempt < retries - 1:time.sleep(2 ** attempt)return last_status, "Probe failed repeatedly, check the official status page"
Step 4: Back off and subscribe to notifications. Aggressive retrying adds load to an already strained service. If possible, subscribe to the status page or monitoring alerts so you’re notified the moment service is restored.
Step 5: Recover in phases. Once the status page shows recovery, don’t switch all traffic back immediately. Validate with a small traffic share first, watch error rates and latency, and ramp up gradually once things are stable. This avoids a burst of queued-up requests re-triggering the failure.
Application-Layer Fault Tolerance
You can’t control the availability of external services. What you can do is limit the blast radius of downstream failures on your own business. The following practices can be applied directly.
1. Retry with restraint. For degraded-performance incidents, blind retries amplify the problem. Retry only on 5xx errors, timeouts, and network errors—never on 4xx. Use exponential backoff with random jitter between attempts, and set two limits: a maximum retry count and a total time budget per request. The function below uses the full jitter strategy, where the wait time is drawn uniformly between 0 and the cap, effectively spreading out retry times across many clients.
import randomdef backoff_delay(attempt, base=0.5, cap=30):"""Exponential backoff with full jitter.attempt starts at 0; returns the number of seconds to wait."""upper = min(cap, base * (2 ** attempt))return random.uniform(0, upper)
Maximum retries and the total budget should be set according to your own service level objectives (SLOs). The values below are examples only:
- Maximum retries: 2, meaning at most 3 attempts in total;
- Per-request timeout: 10 seconds;
- Total time budget per business request: 25 seconds—beyond that, give up and enter the fallback path.
2. Design fallback paths for critical flows. When a model call fails, you can return cached results, switch to a simplified logic path, or route to human handling. The goal is to keep core features “slower but uninterrupted.”
3. Configure each external dependency separately. Your application should never assume that “if the service is up, the whole chain is healthy.” The table below shows an example dependency configuration; actual values should be determined by measuring your own workload:
| Dependency | Timeout | Max Retries | Total Budget | Fallback Action |
|---|---|---|---|---|
| Chat generation API | 10s | 2 | 25s | Return cached results, or ask the user to retry later |
| Code completion API | 3s | 1 | 5s | Disable completion, keep manual input |
| Document connector | 8s | 2 | 20s | Skip that data source and mark results as incomplete |
4. Set circuit breaker thresholds. When a dependency’s failure rate in a sliding window exceeds a threshold, the circuit breaker should stop calling it and go straight to the fallback path. For example: a 60-second window, at least 20 requests, and a failure rate above 50% trips the circuit for 30 seconds. After the cooling period, the breaker lets a small number of trial requests through and restores normal calls only if they succeed. Tune these values to your actual traffic.
5. Build observability. Record latency, error codes, and timing distributions for every call, and wire them into monitoring and alerting. When a provider-side incident occurs, you should see the anomalous curve in your own dashboards first—not hear about it from your users.
Final Thoughts
Failures in external services are unavoidable; what differs is whether your response mechanisms are mature. Developers should ask themselves a few questions: Do you know the status page URL for every external service you rely on? Do you have health probes, backoff retries, and fallback plans in place? Have you configured independent timeouts, circuit breakers, and monitoring for each dependency?
When an incident hits, preserve your work first, then verify against the status page, retry rationally, and validate recovery with small traffic volumes. Treat every external failure as a chance to test and improve your own architecture.
