Skip to content

Use uWebSocket.js encrease I/O productivity few times #310

@mrlika

Description

@mrlika

P2P technologies should be scalable and efficient when it goes to high loads.

The goal is to rewrite the code to be able to use uWebSockets.js HTTP/HTTPS/WebSocket server as an option for HTTP I/O. At least to refactor the code to use the maximum of the logic from this project in a new tracker project that will be based on uWebSockets.js I/O.

This article and this one describe how uWebSockets.js is a few times more efficient in I/O than any other Node.js solutions and even C/C++/Golang solutions. Also, it will lead to the use of the built-in uWebSockets.js HTTPS support and remove the need for Nginx in front of the tracker.

The performance of µWebSockets is in most cases what you would expect from an efficient server software. In some cases, especially small messages, the difference in performance can be dramatical (10 - 15x). Because of the nature of WebSocket messages (they are mostly very small at sub 1kb), this plays a major role in performance.

The benefit is that public and private trackers will be able to serve a few times more peers.

It will help to solve #308, #299, #269 (uWebTorrent tracker is written using uws and uWebSockets.js is the successor of it written by the same author) and other related issues.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions