The API revolution – Why APIs are so critical to UX and web performance

Date: 27th March 2018
Author: Louise Arnold

The API Revolution

Application Program Interfaces (APIs) have always been at the core of application development but as mobile usage has become increasingly dominant, development of the IoT and applications connecting more diverse services, so user experience has become more reliant on the performance of multiple APIs. These APIs regularly form the critical path for many website/application user journeys.

APIs are simple request-response protocols originally created to allow software components to perform a function or share data with other components. As interactions have become more numerous, there are much greater opportunities for failure, which may also have a knock-on effect on other services. We find APIs are often at the root of the most common performance and availability issues.

APIs may have transformed the way applications are now designed and deployed, but there is now a need for more frequent testing to ensure they are enhancing the user experience rather than negatively impacting it.  As even APIs that perform well initially can degrade over time, it’s essential to monitor as well as load test both external and internal APIs as part of your wider user journeys.

Current API Usage

To put this into context, the number of APIs submitted to the Programmable Web directory – the Web’s most relied-on directory for discovering and searching for APIs for use in applications – is growing steadily and recently exceeded the 19000 mark. And a recent poll of 250 IT professionals by Imperva shows more than two-thirds (69%) of organisations are exposing APIs to the public and their partners.

API gateways don’t guarantee performance

Most survey respondents admitted to using API gateways – an API gateway is essential for mobile applications, as it enables clients to retrieve data from multiple services with a single round-trip. Fewer requests reduces latency, resulting in better performance and a more efficient user experience.

Amazon API Gateway is an example of a fully managed service that makes it easy for developers to manage and secure APIs at any scale. Or is it? As with many technologies designed to improve performance, there are risks if these are not configured correctly.

Which factors affect API performance?

API performance issues are significant because they can cause other dependent applications to fail – and if you’re exposing your API to third party usage, demand can be very unpredictable and difficult to manage.

There are two aspects to consider from a performance point of view: API consumption and provision. A comprehensive approach to testing both is required and includes testing journeys on your site that depend on external APIs for important data – delivering football results to a betting site, for instance – as well as your own APIs that are consumed by external clients (with unpredictable load demands).

API performance can be affected by a number of issues, including a spike in server load at peak times, network issues (latency or outages, for instance), poorly configured caching or lack of compression. The main challenge is one of effectively handling a larger range of unexpected inputs than those that generally occur during standard web journeys.

Many circumstances can cause performance issues both deliberate and accidental – in particular the following can amplify the performance hit:

  1. Complex queries
  2. Incorrect requests
  3. Large numbers of requests
  4. Large data submissions
  5. Inefficient queries

To deliver a swift and smooth UX, it’s essential to create, manage, monitor and secure every API – which involves incorporating them into your regular web/app testing and monitoring programme. We usually test our clients’ APIs as part of a wider user journey mix but in some cases it’s necessary to test them as independent journeys.

SciVisum offers a fully managed, cloud-based API load testing service – as part of it’s website load testing solution – that ensures optimal web performance.

For more information on API testing, visit our load testing service page or call us on 01227 768276

Top