API or Application Program Interface functions to allow two systems to communicate with each other. For example, when using a mobile application, it will connect to the internet, then to the server and back to you. Its very crucial role makes monitoring API metrics very important.

Imagine if without monitoring the Application Program Interface, problems would pile up. Even though the API method has been designed in such a way, bugs can appear and this can affect the user experience. Worse still, if the consumer finds the error first.

Of course, you don’t want that to happen, right? Therefore, monitoring API metrics is very important. What metrics need intensive monitoring? Let’s take a look at the 5 metrics below.

  1. Maximum and Average Latency
    Data latency is the time it takes for data or commands to travel from source to destination. The unit of latency is milliseconds, the closer to zero, the better the speed.

Average and maximum latency measurements should take into account various things, such as routes and geography.

  1. Request per Minute and Error per Minute
    Request per minute or RPM is a way to measure web API performance to find out how many requests can be handled. Generally, this RPM number is lower than it should be.

The function of monitoring this metric is to ensure the efficiency of the existing RPM number. Generally, the efficiency method that is often done is by grouping multiple requests into one. Why is efficiency necessary? This is because the number of requests can be different at any time.

Error per minute or failure rate is a measurement of how many errors occur. To be able to measure the number of errors that occur, it is important to know the type of error. Is the error in the API because there are bugs, or the API design itself is not good.

  1. Uptime
    Uptime is a very important standard in measuring service availability. The way it works is by sending a command to the API endpoint and then getting a reply with the appropriate HTTP code. The average uptime measurement uses the ping system.
  2. Time to First Hello World

For those who understand programming languages ​​such as C, the word Hello World may not be foreign. However, Hello World here means the speed of time it takes for users to display API transactions after landing the website.

For example, how long does it take for users to go from opening your website to registering? Or from registering on the website to purchasing products and the like.

The faster the better, and if after that the user does not return then something is wrong.

  1. Memory and CPU Usage

A high percentage of CPU usage means that the server is overloaded. Then, memory monitoring functions to find out the use of resources so far.

If the percentage of CPU usage is high, then there needs to be an increase, and if the memory is excessive, it can be reduced. This way, there will be no problems around the server and memory usage is also efficient.

The functions of each API metric above are very crucial, right? That is why API performance metrics and monitoring are very important for website performance to run smoothly, optimally, and efficiently. Actually, apart from the 5 API metrics above, there are still several other APIs that are no less important to monitor. For example, such as API retention, API calls per business transaction, and unique customers. Use the type of API metrics that best suits your current needs, so that the best benefits can be felt.

Source:

https://apimetrics.io/key-performance-api-metrics/

https://dzone.com/articles/13-api-metrics-that-every-platform-team-should-be

https://www.moesif.com/blog/technical/api-metrics/API-Metrics-That-Every-Platform-Team-Should-be-Tracking/