How to scale out the steaming plugin?

226 views
Skip to first unread message

leungch...@gmail.com

unread,
Jan 24, 2021, 1:24:42 PM1/24/21
to meetecho-janus

TLDR: How to have multiple Janus servers to obtain the same UDP video steam from a single machine?

I have a machine which is streaming video to one of my AWS Linux server with UDP, then users access my Janus server to obtain the video stream with WebRTC. It is working fine. But If my want to scale it up, I need something to take my UDP stream and multicast it to all of my servers.


Maybe let me explain a bit more in pictures: I want to broadcast the UDP stream to multiple server instances, from this:  

Screenshot 2021-01-25 021922.png

To This:  

Screenshot 2021-01-25 022031.png


The "Loadbalancer" is solved by using AWS LoadBalancer. However, I don't know what technology should I use to execute the "UDP Broadcast Server" part. May I know how do we usually solve this problem?

Alessandro Amirante

unread,
Jan 24, 2021, 1:53:18 PM1/24/21
to leungch...@gmail.com, meetecho-janus
Multicasting would be the natural way to achieve that, as the Streaming plugin supports multicast. Unfortunately AWS doesn't.

The "UDP Broadcast server" you depicted can be easily implemented via a gstreamer pipeline.

A.


--
You received this message because you are subscribed to the Google Groups "meetecho-janus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to meetecho-janu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/meetecho-janus/edf679df-55d1-4790-85a2-958ef94c5074n%40googlegroups.com.

Marcus L

unread,
Jan 24, 2021, 9:46:45 PM1/24/21
to Alessandro Amirante, meetecho-janus
Are you talking about multiudpsink from gstreamer pipeline? I think that wouldn't work well with AWS scale set, as the streaming machine wouldn't know the IP of the newly spawned VM.

I actually tried doing network broadcast on AWS using n2n. It worked but I have a hard time implementing DHCP with it. It is just not ideal to have to manually assign IP each time.

Alessandro Amirante

unread,
Jan 25, 2021, 3:13:55 AM1/25/21
to Marcus L, meetecho-janus
Of course if you want to dynamically spawn new VMs you need an orchestrator that can update the pipeline when new instances register to it.

A.

Mirko Brankovic

unread,
Jan 25, 2021, 6:46:05 AM1/25/21
to meetecho-janus
Yes, that should be possible, you will need to build skaling up mechanism yourself

On Mon, Jan 25, 2021, 12:03 Marcus L <leungch...@gmail.com> wrote:
@Alessandro
I see, so it is inevitable to manage the newly spawn VMs to notify my source to send the UDP stream to them. Thanks!

@Mirko
I had a look at this link based on your suggestion about  VideoRoom and Streaming Plugin.
Are you suggesting I could use a server with VideoRoom plugin to pick up my source stream, and send it to other Janus servers VMs(streaming plugin)? This essentially solves the the "UDP Broadcast Server" part.

On Mon, 25 Jan 2021 at 17:21, Mirko Brankovic <mirkobr...@gmail.com> wrote:
If the Server in this picture is Janus server and one of the famous plugins like Streaming or Videoroom, you could just use rtp_forward to next server streaming plugin point and attach and "watch" stream with new N number of listeners

--
You received this message because you are subscribed to the Google Groups "meetecho-janus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to meetecho-janu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/meetecho-janus/edf679df-55d1-4790-85a2-958ef94c5074n%40googlegroups.com.


--
Regards,
Mirko
Reply all
Reply to author
Forward
0 new messages