uNetworking /uWebSockets.js

μWebSockets for Node.js back-ends :metal:

★ 9,193⑂ 626👁 111⑃ 221● 440▤ 125
C++Apache-2.0Created 2018-07-27
More from this author
Download: v20.71.0v20.71.0 ↓20.71.02026-09-16
+0
Daily
9,193
stars
626
forks
111
watchers
221
prs
440
issues
125
releases

README

Simple, secure1 & standards compliant2 web server for the most demanding3 of applications. Read more...


  



 :zap: Simple performance
µWebSockets.js is a standards-compliant web server written in 10,000 lines of C++. It is exposed to Node.js as a simple-to-use, native V8 addon and is 13x faster than Fastify[[4]](https://github.com/uNetworking/uWebSockets.js/releases/tag/v20.71.0), 20x faster than Socket.IO. Since 2022 a fork of µWS has carried Bun to the top of benchmarks, and is responsible for its event-loop, TLS, HTTP, QUIC, WebSockets, pub/sub, and URL routing[[5]](https://github.com/oven-sh/bun/tree/main/packages/bun-uws/src)[[6]](https://github.com/oven-sh/bun/tree/main/packages/bun-usockets/src).

We aren't in the NPM registry but you can easily install it with the NPM client:
 npm install uNetworking/uWebSockets.jsv20.70.0
 Browse the documentation and see the main repo. There are tons of examples but here's the gist of it all:

 :dart: In essence

!Untitled

 :handshake: Permissively licensed
Intellectual property, all rights reserved.

Where such explicit notice is given, source code is licensed Apache License 2.0 which is a permissive OSI-approved license with very few limitations. Modified "forks" should be of nothing but licensed source code, and be made available under another product name. If you're uncertain about any of this, please ask before assuming.

Top issues

Discussions

Latest release

v20.71.0 v20.71.0 2026-09-16
Microcaching JavaScript invocations for 13x performance

This release adds the concept of Microcaching.

Any idempotent HTTP handler dealing with dynamic-but-public content can benefit from significant (3x) performance improvements and reduced business logic complexity by enabling some degree of microcaching (see benchmark below).

The feature is experimental and subject to change.

 Let's build a financial app

js
uWS.App().get('/prices/gold', async (res, req) = {
  / Before going async we need to listen to socket abortions /
  res.onAborted(() = {
    res.aborted = true;
  });

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON