Comparison of WebSocket and HTTP protocol performance

Wojciech Łasocha

wojciech.lasocha@pollub.edu.pl
+48 791 426 755 (Poland)

Marcin Badurowicz


(Poland)

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.
  Google Scholar

Hypertext Transfer Protocol, w: Wikipedia, The Free Encyclopedia, https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol, [13.01.2021].
  Google Scholar

WebSockets – A Conceptual Deep-Dive, w: Ably Realtime, https://www.ably.io/concepts/websockets, [13.01.2021].
  Google Scholar

Ajax (programming), w: Wikipedia, The Free Encyclopedia, https://en.wikipedia.org/wiki/Ajax_(programming), [13.01.2021].
  Google Scholar

WebSocket Simplified, w: Coding Simplified With Shad, https://iamshadmirza.hashnode.dev/websocket-simplified-cjxjzcu0m002i3hs1eewt2p80, [13.01.2021].
  Google Scholar

WebSocket, w: Wikipedia, The Free Encyclopedia, https://en.wikipedia.org/wiki/WebSocket, [13.01.2021].
  Google Scholar

RFC 6455 – The WebSocket Protocol, w: IETF Tools, https://tools.ietf.org/html/rfc6455, [13.01.2021].
  Google Scholar

Real-time web, w Wikipedia, The Free Encyclopedia, https://en.wikipedia.org/wiki/Real-time_web, 13.01.2021.
  Google Scholar

W. Słodziak, Z. Nowak: Performance Analysis of Web Systems Based on XMLHttpRequest, Server-Sent Events and WebSocket. Springer International Publishing, 2016.
DOI: https://doi.org/10.1007/978-3-319-28561-0_6   Google Scholar

Benchmark 5-milion Websockets, w: Oat++, https://oatpp.io/benchmark/websocket/5-million/, [13.01.2021].
  Google Scholar

Download


Published
2021-06-30

Cited by

Ł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

Authors

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

Authors

Marcin Badurowicz 

Poland

Statistics

Abstract views: 1828
PDF downloads: 1144