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
Location
backend/src/handlers/registerViewer.handler.ts—viewer:heartBeathandler (~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.instanceIdcheck. 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, andimplement real cross-pod handling for the
viewer:heartBeatevent (forward/proxy to the owningnode, or redirect via sticky routing) rather than only erroring out.
Part of #65