question

vsipranav avatar image
0 Votes"
vsipranav asked vsipranav answered

How to deploy Mediasoup service on Azure?

Hello, I am having some doubts. If you know anything regarding following issues, kindly please help.
1) Currently, I have Mediasoup streaming service application deployed on AWS lambda instance with Linux system.
Now I want to shift the service from AWS to Azure. The requirement is: I should be able to created and destroy multiple Linux instances on the go. For eg. Currently the application can handle 100 users and if I want to scale up to 500-1000 users then, I need to dynamically create 5 instances and destroy them once the task is completed. Please suggest me the suitable AWS Lambda equivalent service for Azure and good way to do this.

2) I have AppService and Azure SQL server instance running on Azure where the .Net Application is running. The mediasoup streaming service needs to communicate with the AppService and the SQL database. How can this be done?

3) Also, mediasoup server needs to store the streaming data which will be accessed by .Net application from AppService. What is the good way to this? Can it be done using Azure Blob Storage Account?

azure-webappsazure-blob-storageazure-kubernetes-serviceazure-virtual-machines-scale-set
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@vsipranav-0854
Apologies in delayed response. As your ask has multiple services involved, I will share few inputs that can help decide on appropriate setup.

  1. Equivalent service to AWS Lambda on Azure is Azure Functions. Based on your connectivity requirements, deploying on VM scale sets or AKS/ACI would be good. However, you have to
    setup networking accordingly to expose the required ports for media traffic.

  2. Once you get the network setup correctly with required ports, you should be able to connect from your deployment to the app service instance.
    3.For storage, yes Blob Storage is good way to go.

Hope some more community experts may add insights on your ask.

1 Vote 1 ·

Hello @vipullag-MSFT
Thank you for the reply. Based on your answer I did a bit of research and decided to go for Azure VM instead of Azure Function service. I am able to create the VM and deploy the code it. Now the next thing is about scaling.
There are few doubts regarding this.
1) How can I spawn multiple instance of VM and deploy the same infrastructure on it dynamically as per the increasing demand? Or just scaling up or down the current instance of VM will do the job? Please guide me on this.
Current package dependencies needed to run the code are:
-> NodeJS
-> npm
-> tmux
-> ExpressJS
-> Mediasoup Client and server libs
-> Socket.io

2) And is there dedicated bandwidth for VM or do I need to purchase it explicitly? As streaming application will require considerable amount of bandwidth. Is there any dedicated azure resource for bandwidth?

kindly please let me know.

0 Votes 0 ·

Hi,im working on a similar project ,can you please give me inputs about how you set the media soup server in aws lambda

0 Votes 0 ·

1 Answer

vsipranav avatar image
1 Vote"
vsipranav answered

Hello,

Update on the question/solution.
Currently, the best setup we have identified and tried so far is Azure virtual machine scale set. We tried the scale set with the load balancer in front of it but the load balancer has a limitation on the number of inbound rules that can be configured. So we are using scale set without the load balancer. For storage, we are using azure storage account v2.

Mediasoup documentation has one section on deploying it on the docker container instance. I am yet to try it out. Once I try that, I will update the answer accordingly.

Thanks!

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.