Bun WebSocket Server

•
239
•

Builds high-performance, real-time WebSocket servers using Bun's native Bun.serve APIs and built-in pub/sub topic engine.

Bun WebSocket Server empowers developers to implement scalable, production-ready real-time communication architectures in Bun. It guides users through native HTTP-to-WebSocket upgrades, topic-based pub/sub broadcasting, typed socket connection data, connection lifecycle handlers, compression tuning, and secure pre-upgrade authentication without requiring external WebSocket packages.

주요 기능

01239 GitHub stars
02Native HTTP-to-WebSocket connection upgrade patterns
03Performance tuning with perMessageDeflate compression and backpressure limits
04Built-in topic pub/sub engine for rooms and channels
05Comprehensive lifecycle handlers for message, drain, ping, and close events
06Contextual typed data attachment to individual socket connections

사용 사례

01Streaming live server-sent telemetry, notifications, and event broadcasts
02Building real-time multiplayer chat applications and collaborative workspaces
03Implementing low-latency binary and JSON messaging services with authentication