Sinkron : Jurnal dan Penelitian Teknik Informatika
Vol. 9 No. 4 (2025): Articles Research October 2025

Comparative Performance Benchmarking of WebSocket Libraries on Node.js and Golang

Fernando, Louis (Unknown)
Engel, Mychael Maoeretz (Unknown)



Article Info

Publish Date
02 Oct 2025

Abstract

The demand for responsive real-time web applications continues to grow, making the selection of backend technology and WebSocket libraries a crucial factor in determining performance. Node.js and Golang are popular platforms for real-time applications. However, the WebSocket library within them offers a trade-off between features and efficiency, the impact of which has not been comprehensively measured. This research aims to fill this gap by conducting a quantitative performance analysis to compare the efficiency and scalability of four WebSocket libraries: ws and socket.io on Node.js, and gorilla/websocket and coder/websocket on Golang. This research uses a benchmarking experimental method with client load simulations that gradually increase from 100 to 1000 concurrent clients. The experiment was conducted through two scenarios, namely the Echo Test and Broadcast Test. In the Echo Test, the performance metrics measured were Connection Time, Round Trip Time (RTT), and Throughput. Meanwhile, in the Broadcast Test, the performance metric measured was Broadcast Latency. The results from the Echo Test show a significant performance disparity. At a peak load of 1000 clients, socket.io achieved a throughput of only 27,152 messages/second, whereas the lightweight libraries (ws, gorilla/websocket, and coder/websocket) all achieved over 44,000 messages/second. In the Broadcast Test with a high load, the latency difference between the four libraries became insignificant. Therefore, for applications prioritizing raw performance in point-to-point communication, certain WebSocket libraries such as ws, gorilla/websocket, and coder/websocket are more suitable for future development.

Copyrights © 2025






Journal Info

Abbrev

sinkron

Publisher

Subject

Computer Science & IT

Description

Scope of SinkrOns Scientific Discussion 1. Machine Learning 2. Cryptography 3. Steganography 4. Digital Image Processing 5. Networking 6. Security 7. Algorithm and Programming 8. Computer Vision 9. Troubleshooting 10. Internet and E-Commerce 11. Artificial Intelligence 12. Data Mining 13. Artificial ...