Skip to content

feat(viewer): add cross-pod guard + handling in createViewerTransport #72

Description

@Harxhit

Location

backend/src/handlers/registerViewer.handler.tscreateViewerTransport handler (~L137)

Current behavior

Unlike the broadcaster handler, this event does not verify that the room is owned by
the current pod — there is no getRedisRoom / redisRoom.nodeId !== config.instanceId
check. On a multi-pod deployment a viewer socket can land on a pod that does not own the
room and operate on empty/stale local state.

Task

Add the same cross-pod ownership guard used in registerBroadcaster.handler.ts, and
implement real cross-pod handling for the createViewerTransport event (forward/proxy to the owning
node, or redirect via sticky routing) rather than only erroring out.

Part of #65

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