Skip to content

jscriptcoder/HTTP-vs-WebSockets-performance

Repository files navigation

HTTP vs WebSockets performance

This is an experiment to compare HTTP vs WebSockets performance using Python server <==> Nodejs client. The idea is to find the best team to later on build AI agents on top of them.

I wrote an article about it in Medium

Libraries Tested

Http Clients:

  1. Axios: “Promise based HTTP client for the browser and node.js”.
  2. Node-fetch: “A light-weight module that brings Fetch API to Node.js”.
  3. Superagent: “light-weight progressive ajax API crafted for flexibility, readability, and a low learning curve…”
  4. Plain Http: built-in Nodejs package to handle HTTP communication.

Http Servers:

  1. FastAPI: “a high performance framework, easy to learn, fast to code, ready for production…”
  2. Flask: it doesn’t need introduction, does it? This web framework is widely used to build Python backend.
  3. Pyramid: “small, fast, down-to-earth Python web framework…”
  4. Tornado: “Python web framework and asynchronous networking library…”

WebSocket Clients:

  1. Websocket-Node: “pure JavaScript implementation of the WebSocket protocol versions 8 and 13 for Node”. I’m using here the client version.
  2. WS: “simple to use, blazing fast, and thoroughly tested WebSocket client and server implementation.”

About

[Experiment] HTTP vs WebSockets performance comparison

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published