Jump to content
  • 0

Conference rooms in a cluster mode


dmitry027
 Share

Question

Hello, everyone.

I'm using JavaScript SDK to create a web conference client app where there are few publishers and many (hundreds to thousands) viewers inside each SFU conference room. So I intend to use Ant Media Server in a cluster mode. Could you please clarify some questions:

1. I want each publisher to be able to view streams of other publishers of the same conference room. Do I need two different connections (two instances of WebRTCAdaptor) in that case: one for publishing (origin server) and one for viewing (edge server)? Or it can be done via single connection to the origin server?

2. Is it required for SFU conference room that all publishers of the room are connected to the same origin server?

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 1

Hi @dmitry027

 

You don't need to have separate  WebRTC Adaptors. Publishers can send the stream to different server, Ant Media Server will handle the distrubition. You can check the repository below to see how SFU Conference Room works

https://github.com/ant-media/conference-call-application

For the sake of simplicity you can check sample pages below.

https://github.com/ant-media/StreamApp/blob/master/src/main/webapp/multitrack-conference.html

https://github.com/ant-media/StreamApp/blob/master/src/main/webapp/multitrackplayer.html

  • Like 4
Link to comment
Share on other sites

  • 0

Hello @mustafaboleken, thank you for the answer.

I feel that I am not fully understand how does load balancing work in case of WebRTC. In documentation for nginx load balancer there are two endpoints (port 443 for origin group and port 5443 for edge group):

...
#Origin Configuration
server {
  listen 443 ssl;
  ...
  location / {
    proxy_pass http://antmedia_origin;
    ...
  }
}

#Edge Configuration
server {
  listen 5443 ssl;
  ...
  location / {
    proxy_pass http://antmedia_edge;
    ...
  }
}
...

Does this mean I need to use port 443 for publishers and port 5443 for viewers to connect to media server WebSocket?

That is, websocket_url param of WebRTCAdaptor would be wss://SERVER_NAME:433/LiveApp/websocket for publishers and wss://SERVER_NAME:5433/LiveApp/websocket for viewers?

Or it does not matter and both publishers and viewers can use any of these endpoints?

Link to comment
Share on other sites

 Share

×
×
  • Create New...