Skip to content

feat(broadcaster): cross-pod handling in connectBroadcasterTransport #68

Description

@Harxhit

Location

backend/src/handlers/registerBroadcaster.handler.tsconnectBroadcasterTransport handler (~L249)

Current behavior

The handler resolves the room's owning node from Redis and, if it isn't this pod,
rejects the request instead of servicing it:

const redisRoom = await getRedisRoom(roomKey)
//TODO: Implementation for different pod connections
if (redisRoom.nodeId !== config.instanceId) {
  logger.error('Different pod')
  throw new ApiError(409, "Room belongs to another node")
}

Task

Replace the hard 409 "Room belongs to another node" rejection with real cross-pod
handling for the connectBroadcasterTransport event — forward/proxy the signaling to the node that owns
the room (or redirect the client via sticky routing) so a socket that lands on a
non-owning pod can still complete this step.

Part of #65

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