websocket-hub-patterns

Community

Scale WebSocket connections with Redis.

Authorwpank
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill addresses the challenge of building scalable, real-time WebSocket applications that can handle a high volume of connections across multiple server instances.

Core Features & Use Cases

  • Horizontal Scaling: Enables WebSocket hubs to scale across multiple instances using Redis for coordination.
  • Lazy Subscriptions: Optimizes Redis usage by subscribing to channels only when local clients are active.
  • Connection Registry: Provides a mechanism to track connections across distributed instances.
  • Graceful Shutdown: Ensures proper cleanup of connections and subscriptions during application termination.
  • Use Case: Building a real-time chat application where thousands of users connect simultaneously, requiring seamless scaling and reliable message delivery across all connected clients, regardless of which server instance they are connected to.

Quick Start

Implement the horizontally-scalable WebSocket hub pattern using Redis for coordination.

Dependency Matrix

Required Modules

None required

Components

scriptsreferences

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: websocket-hub-patterns
Download link: https://github.com/wpank/ai/archive/main.zip#websocket-hub-patterns

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.