Skip to content

feat: Cross-pod signaling — handle rooms owned by another SFU node (tracking) #65

Description

@Harxhit

Cross-pod (different-node) connection handling in the Socket.IO signaling handlers

CrowdStream runs multiple SFU pods/nodes and each room is owned by exactly one node
(tracked in Redis by the room coordinator: getRedisRoomnodeId, compared against
config.instanceId).

Today the signaling handlers do not properly handle a socket that lands on a pod
which does not own the room:

  • registerBroadcaster.handler.ts — the guard exists but is stubbed with
    //TODO: Implementation for different pod connections; it just throws
    409 "Room belongs to another node".
  • registerViewer.handler.ts — the ownership guard is missing entirely; these
    events operate on local room state with no node check.

This is the tracking issue for implementing real cross-pod handling (forward/proxy
signaling to the owning node, or redirect the client via sticky routing) at every
affected location. Sub-issues below.

Related: #36 (Sticky Sessions & Multi-Pod Signaling), #40 (Room→Node Placement Map in
Redis), #7 (Scalable Viewer Distribution with PipeTransport), #42 (Failover Test).

Sub-issues

registerBroadcaster.handler.ts — guard present, replace the 409 with real handling:

registerViewer.handler.ts — guard missing, add guard + handling:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions