A SYSTEM TO EVALUATE THE ROBUSTNESS OF AN API UNDER HIGH LOADS - Zatserkovnyi, R. G.; Babych, V. I.; Plesha, M. I.; Khmilyarchuk, L. I.; Shvets, O. M. (Systems and Technologies, 2023)
Many modern computer systems extensively use application programming interfaces, or APIs. APIs serve as a bridge between different elements of computer systems, allowing them to communicate, interact with each other, and exchange data seamlessly. Formally, an API is a set of protocols, tools, and definitions that allow different programs to integrate with each other, and provide developers with the ability to access certain software functions or data sets. An important task in the process of developing APIs is to ensure their correct operation under high loads. APIs can have hundreds, thousands, and even millions of users, for whom it is important to ensure the stability, scalability, and reliability of these software tools. A system that has not been reliably tested under high load conditions may fail if a large number of users want to use the same API method or retrieve similar data at the same time. Such a system will also be less resistant to DDoS attacks, a type of malicious hacker attack that "clogs" a computer system with a large number of requests, effectively blocking access to it for legitimate users. This article presents the research and development of a testing system designed to evaluate API performance. The system is based on Locust, an open-source tool for testing software under high loads. The tool is designed to model and analyze the behavior of various applications when facing a large number of users. Our performance testing system uses the capabilities of Locust to thoroughly study the stability of the API system in a real-world scenario. It tests a locally running version of an API in detail by loading it with a so-called "swarm" of virtual users. After this process is complete, Locust collects data on the performance of an API – number of successful and failed requests; minimum, maximum, and average request processing time; as well a detailed report that can be used for further analysis of the results. The data obtained as a result of such an analysis contributes to understanding and, subsequently, improving the quality of API performance, offering valuable recommendations for optimizing application performance and identifying bottlenecks in code.