Skip to content

feat(viewer): add cross-pod guard + handling in viewer:heartBeat #71

Closed

Description

@Harxhit

Location

backend/src/handlers/registerViewer.handler.ts — viewer:heartBeat handler (~L117)

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 viewer:heartBeat event (forward/proxy to the owning
node, or redirect via sticky routing) rather than only erroring out.

Part of #65

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