Join region according to room ID

Options
EranJ
EranJ

I want a room to be created in the best region for the host. However, I would also like clients from anywhere to be able to join the same room.

I am aware Room IDs are only unique per region, but in our implementation they are globally unique. Therefore a room of a given ID can only exist in one region.

Is it possible to query the master server to know which region a room of a given ID is in, and then join that region's server (and room)?

Thanks in advance,

Eran

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Options

    Hi @EranJ,

    Each region has its own master server(s) and rooms.

    So the master server can only return the rooms it has and cannot know rooms from other master server/regions.

    In your implementation you should have another service (or your own backend) to save/list/share the room IDs, maybe add the region info as well.

    Or embed the region in the room ID in some format.

    This way knowing the room ID you can extract the region from it and switch to that region if necessary.

  • EranJ
    Options

    Okay, thank you.