Comparison of WebSocket and HTTP protocol performance


Abstract

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.


Keywords

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].

Download

Published : 2021-06-30


Łasocha, W., & Badurowicz, M. (2021). Comparison of WebSocket and HTTP protocol performance. Journal of Computer Sciences Institute, 19, 67-74. https://doi.org/10.35784/jcsi.2452

Wojciech Łasocha  wojciech.lasocha@pollub.edu.pl
+48 791 426 755  Poland
Marcin Badurowicz