# unetworking/uwebsockets.js

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/unetworking-uwebsockets-js).**

9,114 stars · 624 forks · C++ · Apache-2.0

## Links

- GitHub: https://github.com/uNetworking/uWebSockets.js
- awesome-repositories: https://awesome-repositories.com/repository/unetworking-uwebsockets-js.md

## Topics

`commercial` `http` `nodejs` `proxy-protocol` `pubsub` `router` `runtime` `typescript` `websockets`

## Description

uWebSockets.js is a high-performance tool for building WebSocket and HTTP servers within Node.js. It focuses on high-throughput web servers and real-time data streaming, enabling the creation of network applications that handle a large number of concurrent connections with low memory and CPU overhead.

The project distinguishes itself through a native C++ implementation that integrates directly with the Node.js event loop. It utilizes native-layer route matching and a shared memory architecture to minimize allocation overhead and avoid data duplication during message transmission.

The implementation includes binary-first protocol handling and zero-copy buffer access to reduce string encoding overhead. It provides a native addon that connects Node.js to high-performance network polling mechanisms for efficient asynchronous I/O.

## Tags

### Networking & Communication

- [WebSocket Servers](https://awesome-repositories.com/f/networking-communication/distributed-systems-p2p/distributed-computing/communication-protocols/websocket-implementations/websocket-servers.md) — Implements a high-performance WebSocket server capable of handling massive numbers of concurrent real-time connections.
- [Binary Protocols](https://awesome-repositories.com/f/networking-communication/binary-protocols.md) — Implements binary-first protocol handling for WebSocket frames to minimize string encoding overhead.
- [Native Route Dispatching](https://awesome-repositories.com/f/networking-communication/traffic-routing/layer-4-tcp-routing/native-route-dispatching.md) — Handles URL routing and request dispatching inside the C++ layer to reduce JavaScript overhead.

### Development Tools & Productivity

- [Native Loop Integration](https://awesome-repositories.com/f/development-tools-productivity/event-loop-integrations/native-loop-integration.md) — Hooks native network polling mechanisms directly into the Node.js event loop for efficient asynchronous I/O.

### Programming Languages & Runtimes

- [Node.js Native Addons](https://awesome-repositories.com/f/programming-languages-runtimes/node-js-native-addons.md) — Provides a native C++ addon that integrates high-performance protocol implementations directly into the Node.js runtime.
- [Node.js Network Libraries](https://awesome-repositories.com/f/programming-languages-runtimes/node-js-network-libraries.md) — Provides a high-performance networking implementation specifically optimized for the Node.js runtime.

### Web Development

- [High-Performance HTTP Servers](https://awesome-repositories.com/f/web-development/high-performance-http-servers.md) — Optimized for extremely high HTTP throughput and low latency using native-layer efficiencies.
- [Web Servers](https://awesome-repositories.com/f/web-development/web-servers.md) — Provides a lightweight server implementation for handling high-volume HTTP and WebSocket requests. ([source](https://unetworking.github.io/uWebSockets.js/generated/functions/App.html))
- [Real-Time Data Streaming](https://awesome-repositories.com/f/web-development/real-time-data-streaming.md) — Enables real-time data streaming to many clients simultaneously with minimal resource overhead.
- [Zero-Copy Buffers](https://awesome-repositories.com/f/web-development/zero-copy-buffers.md) — Shares memory regions between C++ and JavaScript to avoid data duplication during message transmission.

### Software Engineering & Architecture

- [Shared-Memory Architectures](https://awesome-repositories.com/f/software-engineering-architecture/shared-memory-architectures.md) — Utilizes a common memory space for request and response objects to minimize allocation overhead.
