Pegasus Logo
Skip to content
PegasusDocs
REALTIME BUS

WebSocketHub

Sovereign Physical Distribution Platform · Cluster Node

v4.2.0
·
Last updated September 2026
·
8 min read

Low-latency bidirectional WebSocket connection pool delivering live telemetry, order status updates, and dispatch broadcasts.

The Pegasus WebSocket Hub maintains persistent, authenticated connections with tens of thousands of active client terminals. Role-based channel subscriptions allow clients to receive only the events relevant to their operational zone, eliminating polling overhead.

Architecture & Performance Highlights

Scoped Topics

Role-Scoped Channels

Clients subscribe to topics like cell:uz:orders, driver:uuid:route, or warehouse:uuid:dock.

<40ms

Sub-40ms Delivery

Optimized Go Gorilla/Nhooyr WebSocket servers forward events with minimal memory overhead.

Auto Resync

Heartbeat & Resync

30-second ping/pong frames with automatic reconnection and missed-event sequence backfill.

Sequence Number Backfill

Every WebSocket event includes an incrementing seq_id. If a client disconnects briefly, it sends its last received seq_id to replay missed messages.