Technical questions about horizontal scaling #2887
-
Hello the Hubs team, After looking at the documentation https://hubs.mozilla.com/docs/hubs-cloud-aws-architecture.html and the code at https://github.com/mozilla/hubs-ops In a 2x2 server configuration (2 app servers and 2 stream servers), does the 2 app servers talk to each other? Does the 2 stream servers talk to each other? For janus I read that the publisher (the one sending the audio or video) and subscribers (listening to the audio, seeing a screen share) needs to be on the same janus instance. And one way for horizontal scaling is to be sure that the people in the same room goes to the same janus instance. If you can answer some of those technical questions for my own curiosity, I will appreciate it. @gfodor may be the person that know this best. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Soory for this question , but if I have 2 or 3 room , do I need to launch 2 app ? I don't understand the app notion, sorry for this question |
Beta Was this translation helpful? Give feedback.
-
@vincentfretin thanks for research! |
Beta Was this translation helpful? Give feedback.
I found the answer when reading the new graphql documentation https://github.com/mozilla/reticulum/pull/399/files#diff-2ecdd4fbde0a5a21f68a9d0bbe630e0dR73-R74
So you indeed assign the same node to all participants of a room, great :-)
When you create a room you assign the host to the room https://github.com/mozilla/reticulum/blob/0cde188f38f6ac4677ae261da178f65e6ea5f72d/lib/ret/hub.ex#L89
You ensure that the host is not nil and is alive, otherwise you assign another host https://github.com/mozilla/reticulum/blob/0cde188f38f6ac4677ae261da178f65e6ea5f72d/lib/ret/hub.ex#L371-L385
The websocket returns this host https://github.com/mozilla/reticulum/blob/0cde188f38f6ac4677ae261da178f65e6ea5f72…