websockets-sse

Coordinate real-time client updates across distributed FastAPI services with Redis broadcast.

186|15|Updated Apr 2, 2026
One-click install
npx skills add https://github.com/kid-sid/claude-spellbook --skill websockets-sse
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: websockets-sse
Source: https://github.com/kid-sid/claude-spellbook/tree/main/skills/websockets-sse
Command: npx skills add https://github.com/kid-sid/claude-spellbook --skill websockets-sse

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Coordinate real-time client updates across distributed FastAPI services.

Core Features & Use Cases

  • WebSocket and SSE patterns for real-time communication in FastAPI.
  • Redis-backed broadcast to scale across multiple workers.
  • Guidance on authentication, heartbeats, and reliability for long-lived connections.

Quick Start

Set up a FastAPI app with a WebSocket and an SSE endpoint, enable Redis-based broadcast for multi-worker environments, and implement a heartbeat to keep connections alive.

Frequently Asked Questions about websockets-sse

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I broadcast real-time FastAPI updates across multiple workers?▼

To broadcast real-time FastAPI updates across multiple workers, you use a Redis-backed pub/sub layer to relay messages between processes, ensuring all connected clients receive consistent updates regardless of which worker handles their connection.

How do I keep WebSocket connections alive in FastAPI distributed services?▼

To keep WebSocket connections alive in FastAPI distributed services, implement a heartbeat mechanism that periodically sends ping messages, preventing idle connections from being closed by proxies or load balancers during long-lived sessions.

Can I use Redis to scale SSE endpoints in FastAPI?▼

Yes, you can use Redis to scale SSE endpoints in FastAPI by leveraging Redis pub/sub to broadcast events across multiple workers, allowing all SSE clients to receive streamed updates consistently across distributed processes.

Do I need authentication hooks for FastAPI WebSocket endpoints?▼

Yes, you need authentication hooks for FastAPI WebSocket endpoints to validate user identity during the connection handshake, ensuring only authorized clients can establish long-lived real-time connections and receive broadcasted updates securely.

Why do my FastAPI WebSocket broadcasts fail with multiple workers?▼

FastAPI WebSocket broadcasts fail with multiple workers because each process maintains isolated connection state, requiring a Redis-backed broadcast layer to synchronize and relay messages across all distributed workers to reach every connected client.