# websockets/ws

Simple to use, blazing fast and thoroughly tested WebSocket client and server for Node.js

Repository: https://github.com/websockets/ws
Canonical: https://ross.abutalabs.com/products/ws
Language: JavaScript
License: MIT
License Family: permissive
Topics: websocket, javascript, websocket-client, websocket-server, rfc-6455, real-time, nodejs, node, websocket-compression
Last push: 2026-08-13T07:38:51+00:00

## Health v2 (maintenance only)
Score: 97/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 97, release rhythm 96, longevity 100
- inputs: {"age_days": 5411, "days_push": 20, "days_rel": 27, "gap_med": 2.0, "n_releases_24m": 19}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 22793, forks 2578 (observed 2026-08-28T04:11:34.052462+00:00)

## What it is
ws is a fast, thoroughly tested WebSocket client and server library for Node.js implementing RFC 6455. It passes the extensive Autobahn test suite and supports features like permessage-deflate compression and optional native performance addons.

## Use cases
- build a websocket server in node.js
- connect to a websocket server from node.js backend
- implement real-time push messaging over websockets
- broadcast messages to connected websocket clients
- add websocket support to an existing http server
- send and receive binary data over websockets
- enable websocket compression for faster payloads

## When to choose
- you need a battle-tested, RFC 6455 compliant WebSocket implementation for Node.js
- you want a lightweight library without heavy framework dependencies
- you need to share an HTTP/S server between web and WebSocket traffic
- performance matters and you can use optional native addons like bufferutil

## When to avoid
- your code runs in the browser - use the native WebSocket API instead
- you need a full real-time framework with rooms, reconnection, and fallbacks (e.g. Socket.IO)
- you are not using Node.js or a Node-compatible runtime

## Facets
- artifact type: library
- maturity: stable
- function: websocket, http-server, middleware
- domain: web-development, backend, networking, developer-tools
- platform: cross-platform
- tags: rfc-6455, websocket-client, websocket-server, websocket-compression, real-time, autobahn-tested, nodejs

## Member repositories
- websockets/ws (main) score 97

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:34.052462+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T16:56:55.506591+00:00, confidence not recorded.
  - readme: https://github.com/websockets/ws (fetched 2026-08-28T04:11:34.052462+00:00, sha c16d42fdf172)
  - registry_npm: https://registry.npmjs.org/ws (fetched 2026-08-29T07:55:14.140834+00:00, sha 0ab3a602d8b0)
- Data as of 2026-08-30T08:39:29.467469+00:00.
