Evaluating the Performance of RESTful APIs Under Large HTTP Requests with K6
Abstract
Application Programming Interfaces (APIs) are integral to contemporary software development, facilitating interoperability among various services without requiring knowledge of their internal implementations. Among API architectures, Representational State Transfer (REST) is widely adopted, leveraging HTTP methods such as GET, POST, PUT, and DELETE for client-server communication [1]. This paper focuses on evaluating the performances of RESTful API, specifically the dietary API, which employs image recognition to detect foods and provide nutritional data. Stress testing assesses the API’s performance under high-volume HTTP requests to identify operational thresholds and improve reliability. Using the K6 tool, test scenarios simulate peak traffic conditions to measure critical metrics including response times, concurrency capacity, and requests per second. Findings highlight the impact of virtual user configurations and request parameters on API performance, offering insights crucial for reliability in real-world applications.
Keywords—API, K6, REST, RESTful API, Stress Test, Virtual User
References
B. Xu, K. Mou, Institute of Electrical and Electronics Engineers. Beijing Section, and Institute of Electrical and Electronics Engineers, The Design of Embedded Web System based on REST Architecture. 2019.
A. Ehsan, M. A. M. E. Abuhaliqa, C. Catal, and D. Mishra, “RESTful API Testing Methodologies: Rationale, Challenges, and Solution Directions,” Applied Sciences (Switzerland), vol. 12, no. 9. MDPI, May 01, 2022. doi: 10.3390/app12094369.
I. Rauf, E. Troubitsyna, and I. Porres, “Systematic mapping study of API usability evaluation methods,” Computer Science Review, vol. 33. Elsevier Ireland Ltd, pp. 49–68, 2019. doi: 10.1016/j.cosrev.2019.05.001.
E. Mosqueira-Rey, D. Alonso-Ríos, V. Moret-Bonillo, I. Fernández-Varela, and D. Álvarez-Estévez, “A systematic approach to API usability: Taxonomy-derived criteria and a case study,” Inf Softw Technol, vol. 97, pp. 46–63, May 2018, doi: 10.1016/j.infsof.2017.12.010.
M. Hendayun, A. Ginanjar, and Y. Ihsan, “Analysis of Application Performance Testing Using Load Testing and Stress Testing Methods in API Service,” Jurnal Sisfotek Global, vol. 13, no. 1, p. 28, Mar. 2023, doi: 10.38101/sisfotek.v13i1.2656.
“Garafana K6,” Grafana Labs. Accessed: Jul. 10, 2024. [Online]. Available: https://grafana.com/docs/k6/latest/
F. A. Julana, “Analyzing QoS Performance in Kubernetes-Based High Scalability Clusters,” 2023.
C. Konkel Bachelor’s Thesis, “Benchmarking Scalability of Load Generator Tools,” 2023.
I. Vals, “Understanding K6 Results.” Accessed: Jul. 10, 2024. [Online]. Available: https://github.com/grafana/k6-learn/blob/main/Modules/II-k6-Foundations/03-Understanding-k6-results.md



