What Causes API Failures

Learn what API failures are and why they happen.

We have now discussed the design details of many large-scale systems. In each design problem, our goal was not only to meet the functional requirements but also to ensure that non-functional requirements like scalability, availability, and low latency were met. While we designed our problems carefully, system (API) failures are inevitable because many factors can adversely affect the operation of the API, resulting in service disruption or outage.

In this chapter, we will learn about API failures, their impact on businesses, and what causes them. We will also look at the details of some real-world examples of API failures and discuss their corresponding mitigation techniques.

What is API failure?

APIs can enhance user experience and benefit companies if they’re working as intended. However, APIs can underperform or may experience a service disruption. An API failure refers to the malfunctioning (returning unexpected errors or being completely inaccessible) of API-based services. API failure is not limited to direct request and response failures.

Press + to interact

Since APIs are intended to be used as a means of communication between clients and servers, they can also serve as a means for service abuse, security issues, and other malicious activities that may lead to system failures. Generally, any failure caused or triggered by an API can be considered an API failure.

Note: The API itself may not be the problem. API failures often occur due to weak security mechanisms, poor implementation, or other flaws in the systems connected by the API.

What is the impact of API failures?

Consumer applications rely heavily on APIs. API calls are usually the only point of interaction between a client and server. A service interruption or unavailability caused by API failure can have the following effects:

  • ...