Journal "Software Engineering"
a journal on theoretical and applied science and technology
ISSN 2220-3397

Issue N5 2026 year

DOI: 10.17587/prin.17.253-260
Quantitative Assessment of Overhead in GraphQL Subscriptions Compared to WebSocket Protocol under Load
S. N. Kondaurov, Master's Student, kondaurov.semion@ya.ru, I. B. Gosudarev, Cand. Sc. (Ped.), Associate Professor, goss@itmo.ru ITMO University, Saint Petersburg, 197101, Russian Federation
Corresponding author: Semyon N. Kondaurov, Master's Student, ITMO University, Saint Petersburg, 197101, Russian Federation, E-mail: kondaurov.semion@ya.ru
Received on November 15, 2025
Accepted on February 25, 2026

The study focuses on an empirical comparison of the performance between the low-level WebSocket transport and the high-level GraphQL Subscriptions abstraction. The paper details the testbed architecture deployed in a cloud environment (2 vCPU, 4 GB RAM) and a load testing methodology involving scenarios with up to 10,000 virtual us­ers. A comprehensive analysis of metrics such as round-trip time (RTT), handshake duration, and server resource consumption was conducted. The experimental results demonstrate a significant performance gap between the technologies under peak loads. It was found that WebSocket provides twice the message delivery speed (≈ 216 ms vs ≈ 409 ms) while consuming 4.3 times less CPU time. A key finding of the study is the identification of a technological saturation threshold for GraphQL Subscriptions. Under high load, the GraphQL server reached its resource limit, resulting in a marginal connection growth of less than 0.05 %, whereas WebSocket connections scaled by 791 %. This saturation is further evidenced by a critical degradation of the socket wait time (ws_connecting) for GraphQL, reaching ≈ 17.3 s compared to ≈ 0.54 s for WebSocket. The paper concludes that there is a fundamental architectural trade-off between low-level performance and development convenience, caused by the computational complexity of the application-level logic in GraphQL.

Keywords: WebSocket, GraphQL Subscriptions, Node.js, k6, bidirectional communication, RTT, scalability, load testing, comparative analysis, resource consumption
pp. 253—260
For citation:
Kondaurov S. N., Gosudarev I. B. Quantitative Assessment of Overhead in GraphQL Subscriptions Compared to WebSocket Protocol under Load, Programmnaya Ingeneria, 2026, vol. 17, no. 6, pp. 253—260. DOI: 10.17587/prin.17.253-260. (in Russian).
The described experiment was carried out as part of research work at ITMO University within the field of study 09.04.04 “Software Engineerings”
References:
  1. Murley P., Ma Z., Mason J. et al. A. WebSocket Adop­tion and the Landscape of the Real-Time Web, Proceedings of The Web Conference 2021 (WWW '21), 2021, New York, NY, USA, Association for Computing Machinery, pp. 135 — 146. DOI: 10.1145/3442381.3450063.
  2. Il'ichev V. Yu., Ivanov N. V. Analysis of the functionality of WebSocket and Long Polling technologies when used to develop chat applications, Nauchnoe obozrenie. Tekhnicheskie nauki, 2025, no. 2, pp. 12—17. DOI: 10.17513/srts.1497 (in Russian).
  3. Slodziak W., Nowak Z. Performance Analysis of Web Systems Based on XMLHttpRequest, Server-Sent Events and Web-Socket, Advances in Intelligent Systems and Computing, 2016, vol. 444, pp. 67—77. DOI: 10.1007/978-3-319-28561-0_6.
  4. Quina Mera A., Fernandez P., Garcia J. M., Ruiz Cortes A. GraphQL: A Systematic Mapping Study, ACM Computing Surveys, 2023, vol. 55, no. 10, article 202. DOI: 10.1145/3561818.
  5. Prokin A. A., Ruzmanov A. A. The use of web-sockets in internet applications, E-Scio, 2019, no. 4 (31), pp. 493—497 (in Russian).
  6. Nadeem M. M., Raza Y., Sajid A. et al. Review Analysis of Web Socket Security: Case Study, IETI Transactions on Data Analysis and Forecasting, 2024, vol. 2, no. 2, pp. 56—75. DOI: 10.3991/itdaf.v2i2.51015.
  7. Shestakov V. S., Sagidullin A. S. Application of WebSocket technology in web-applications for technological purposes, Izvestiya vysshikh uchebnykh zavedeniy. Priborostroenie, 2015, vol. 58, no. 4, pp. 328—330. DOI: 10.17586/0021-3454-2015-58-4-328-330 (in Russian).
  8. Lawi A., Panggabean B. L. E., Yoshida T. Evaluating GraphQL and REST API Services Performance in a Massive and Intensive Accessible Information System, Computers, 2021, vol. 10, no. 11, article 138. DOI: 10.3390/computers10110138.