Comparison of WebSocket and HTTP protocol performance
The aim of the author of this article is analyze the performance of WebSocket and HTTP protocol and their comparison. For this purpose, was used equipment working in a local network consisting of server, two client computers, switch and self-created research web application. Using a test application was measured time of data transfer between clients and server as well server and clients. The tests included transmission 100-character texts in specified number of copies considering speed of hardware (laptops) and software (web browsers). Additionally, was investigated the impact of overhead and TLS encryption to performance. The obtained results have illustrated in the form of charts, discussed and appropriate conclusions drawn.
websocket protocol; http protocol; protocols performance comparison
World Wide Web, w: Wikipedia, The Free Encyclopedia, https://en.wikipedia.org/wiki/World_Wide_Web, 13.01.2021.
Hypertext Transfer Protocol, w: Wikipedia, The Free Encyclopedia, https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol, [13.01.2021].
WebSockets – A Conceptual Deep-Dive, w: Ably Realtime, https://www.ably.io/concepts/websockets, [13.01.2021].
Ajax (programming), w: Wikipedia, The Free Encyclopedia, https://en.wikipedia.org/wiki/Ajax_(programming), [13.01.2021].
WebSocket Simplified, w: Coding Simplified With Shad, https://iamshadmirza.hashnode.dev/websocket-simplified-cjxjzcu0m002i3hs1eewt2p80, [13.01.2021].
WebSocket, w: Wikipedia, The Free Encyclopedia, https://en.wikipedia.org/wiki/WebSocket, [13.01.2021].
RFC 6455 – The WebSocket Protocol, w: IETF Tools, https://tools.ietf.org/html/rfc6455, [13.01.2021].
Real-time web, w Wikipedia, The Free Encyclopedia, https://en.wikipedia.org/wiki/Real-time_web, 13.01.2021.
W. Słodziak, Z. Nowak: Performance Analysis of Web Systems Based on XMLHttpRequest, Server-Sent Events and WebSocket. Springer International Publishing, 2016.
Benchmark 5-milion Websockets, w: Oat++, https://oatpp.io/benchmark/websocket/5-million/, [13.01.2021].
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.