uNetworking /uWebSockets.js
μWebSockets for Node.js back-ends :metal:
★ 9,193⑂ 626👁 111⑃ 221● 440▤ 125
More from this author
+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
#1036HttpRequest that survives past async functions32 comments · 2024-03-15#1324Cache invalidation use cases and interface24 comments · 2026-09-19#1312pnpm now refuses uWebSockets.js as a transitive dependency: would you reconsider npm, or allow a mirror?15 comments · 2026-09-14#1346Provide common utilities such as readJson12 comments · 2026-10-02#1039Auto compression for HTTP and use zstd10 comments · 2024-03-18#1349onDataOrAborted & onWritableOrAborted, maybeCollectBody7 comments · 2026-10-04#1289Runtime SSL certificate hot reload without restart6 comments · 2026-06-12#1058TLS peer certificate5 comments · 2024-05-16
Discussions
#1273How to compile LSQuic on Windows?3 comments · 2026-04-14#1266arrayBuffer->Detach() in C++ has more overhead than it was expected to.2 comments · 2026-03-30#1261JS String performance2 comments · 2026-03-29#1233node-caged support?2 comments · 2026-03-07#1217Why not take a look at µBlitz.js?4 comments · 2026-03-07#1203Debugging websocket unable to connect in certain browsers0 comments · 2025-12-29#1199.0 comments · 2025-11-12#1197v20.55.0 don't works on docker image node:25-slim1 comments · 2025-10-22
Latest release
v20.71.0 v20.71.0 2026-09-16Microcaching 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;
});