Brevi
''99.9% Uptime'': Real Meaning When You Use Another Company's API
When an API provider mentions "9s" in relation to uptime, the figure is often more of a goal than a contractual metric. Teams using the API in question need to factor in various design decisions to determine the real impact it'll have on end users, and what users will actually see when the API goes down. Until then, the number says little about the availability their own users will get.
Uptime Is Relative
9's look very close together on paper, but very far apart on a clock.
A service is allowed to be unavailable to its users for about 43 minutes in a month at a 99.9% availability level. In a year, that increases to about 8.8 hours. 99.95% availability allows about 22 minutes in a month, and 99.99% allows about 4 minutes.
It's also important to understand what exactly is being measured. Google's Site Reliability Engineering book defines three terms. A Service Level Indicator (SLI) is a measured value, such as the share of successful requests. A Service Level Objective (SLO) is the objective or goal for that measurement. A Service Level Agreement (SLA) is the contract or agreement with the user and defines the consequence of not meeting the objective. Frequently, the figure quoted on a product webpage is an objective, or possibly an indication of a historical performance level, as opposed to an agreement. The SLA defines what happens when the objective is not met.
Dependencies Multiply
The harder part is that availability compounds. Consider a request that has to go through multiple systems in a row, where any one of them failing breaks the request. Availability for that overall request is approximately the product of the individual system availabilities.
Let's say you have a system running at 99.95% availability that calls an integration system running at 99.9% availability that in turn calls a 3rd party system running at 99.9% availability. The overall system availability would be approximately 99.75%, or close to 1 hour and 48 minutes of unavailability in a given month. Keep in mind that this calculation assumes independence of failures, which may not always be the case. In practice, one integration helps hide many dependencies, but bad days for individual providers still affect the overall system availability.
For example, B2B company NuxGame, through its
Nuxgame API, integrates more than 140 content providers for its clients and lists a platform uptime of 99.9% with 24/7 technical support. Compared to having to integrate 140 different providers, for the client system that integration helps hide many dependencies. That said, many of those providers are running their own systems and may not always be available. So overall system availability depends on many factors beyond the control of the integration platform.
Error Budgets Let You Make Decisions With Uptime
Google's SRE book recommends not trying to achieve 100% uptime as it is unrealistic and undesirable. As an alternative they suggest using error budgets.
An error budget is the share of failures that the objective leaves room for. A service with a goal of 99.999% availability would have a quarterly error budget of 0.001%. If misses use up that budget, releases are temporarily halted until the reliability of the service is improved.
The same idea can be used by teams that consume an API. Say your team's goal is 99.9% availability and the APIs that you consume have a combined availability of less than 99.9%, then you have no room for error when making changes to your service. Defining the error budget early on would allow your team to invest in increasing the availability of the dependency, or to lower the goal of the service to reflect the actual availability, and communicate this to the users of the service.
Design for the Loss of Availability
In reality there is little that prevents an outage, and most of the useful work happens in your own code. To improve availability, design your system around a few rules:
- Set timeouts on calls to your dependencies. Timeouts should be shorter than the timeouts experienced by your users.
- Use circuit breakers so that a failing dependency returns errors quickly instead of tying up your service.
- If a given provider goes down, use logic to block that provider's content, and allow the rest of the system to remain available and functional.
- When a given provider becomes unavailable, use logic to queue up operations to send to that provider once it recovers.
The circuit breaker deserves a short explanation. In 2014, Martin Fowler wrote about it and credited Michael Nygard's book, "Release It!," for popularizing the concept. A protected call is wrapped in an object that represents a circuit breaker. If failures exceed a given threshold, the breaker "trips" and returns an error to the caller without attempting the call. After some time has passed, it allows a single request to be made. If that request is successful then the breaker closes the circuit again. In this way, a slow dependency doesn't "hold up" other threads in the application.
Measure It Yourself
Vendor provided uptime reports reflect the experience of the vendor's side of the system. Users experience the application side which includes the networks and endpoints called by your application. This is the reason that teams that rely heavily on a given API typically implement synthetic transactions to gauge the performance of that API and other dependencies. They measure error rate, latency and time to detect errors to gauge the performance of that dependency.
These measures also make support cases easier to resolve: a case opened with specifics about requests that timed out is easier to act on than one that says a service "feels slow." From an availability standpoint, a number of components in a distributed system need to work together to provide users the level of service they require. Users can experience availability issues with your application because of how your application behaves when components of the system fail.
giovedì 26 novembre 2026
- 11:06 | © RIPRODUZIONE RISERVATA