Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Azure Turn Server: The Step by Step Guide

In this article we are going to learn how to setup a Turn Server in Azure, along with what costs and considerations (Maintenance and Attack protection etc) will be there in running a TURN server on Azure Metered TURN serverMetered TURN server can be a good alternative to running your own TURN server on Azure.With 99.999% uptime, email support, automatic geo targeting where your users are you get a better performance than running your own TURN serverPlus, Metered TURN server all maintenance and protection needs are taken care of.Here are some of the features of Metered TURN servers:✅ Runs on port 80 and 443✅ Tested to bypass most firewall rules✅ Enterprise grade reliability (99.999% uptime)✅ Support TURNS + SSL to allow connections through deep packet inspection firewalls.✅ Support STUN✅ Supports both TCP and UDP✅ Dynamic routing to the nearest serverNow let's continue with creating a TURN server on Azure Step 1 Creating an accountyou are going to need an account. You can create one by going to the and signing in with your email or Microsoft accountOnce you sign up, you land in the dashboard area there you can create various services like creating a resource or a database Step 2 Selecting an MachineNext click on the Create a resource and then click on the Ubuntu server, any ubuntu or linux operating system would work.Regarding the size of the machine and bandwidth requirements you need to decide for your self or do a trial and error depending on your requirements Step 3 Installing TURN serverWith regards to installing the turn server. ssh in your azure machine that you just created and thenType the below code to update the operating systemsudo apt-get updateandsudo apt-get upgradethen install the free turn server Coturnsudo apt-get install coturnSet the coturn to start automatically when the instance startsgo to file etc/default/coturnand edit the file usingsudo nano /etc/default/coturnand un comment itTURNSERVER_ENABLED=1and save the file and start the server and thats itsystemctl start coturnthat's it now you have started the CoTURN and you are running it Step 4: Testing The TURN serverYou can easily test your TURN server on Trickle ICE. You can go to the trickle ice websiteadd your credentials and click on the add server button to add your TURN server Step 5: Estimating Costs and Instance Sizes requiredA 720p video call required 2 Mbps bandwidth per participant. Even if you have a fairly small TURN server usage then you would consume around ~150GB of bandwidth each month.TURN servers can be used for the DDoS amplification attack, hence TURN server are prone to DDoS attack.If you are running on azure you need to purchase DDoS protection which can run into thousands of dollarsIf we assume 150GB bandwidth then lets calculate the cost for each of the services: Metered TURN Server150 GB TURN Usage every month then the Growth Plan from Metered TURN Server would suffice. 150GB of usage in included in the plan, the plan costs $99/mo. AZURE TURN ServerAzure offers 100GB of free bandwidth every month. To run the TURN Server you would require at least a A3: 4 core 7 GB RAM = 175/mo. Open Relay ProjectIf you are looking for a free turn server, then Open Relay Project is a good optionIt provides 50 GB of TURN server usage every month. which is good enough for small to medium sized projectsIt is production ready with 99.999% uptime and offers STUN as well as TURN usageList of CostsMetered TURN ServerAZURE TURN serverCommentInstance CostsIncluded in PriceA3: (4 core, 7 GB ram,) $0.24 /hrEncrypted data transfer requires fair amount of CPU and RAM usageReliability99.999%unknown (instance can go into limbo)Cloud severs can some times go into limbo and needs to be restartedBandwidth0.4 /GB and 0.1 /GB with volume discounts100 GB free /mo af that 0.05 /GBAs usage increases you might require more CPU and RAM and thus a bigger instanceDDoS ProtectionIncluded in PriceStarting from 1000s of dollarsTURN Servers are also prone to DDoS attack, because the attackers uses the TURN/STUN Server for DDoS amplification attacksMaintenanceMaintenance FreeMaintenance requiredUpdating the Operating System and other dependencies is required from time to timeTotal Cost / mo99 USD (150 GB comes included)175 USD /moThe price is for instance costs and bandwidth usage for 150 GB TURN usage / mo Bonus: Considerations when running TURN server on AzureThere are a few considerations when running your own TURN server on Azure as compared to using the Metered TURN serverExpensive to runProtection against DDoS AttacksNo geo targetingMaintenanceScalability Expensive to RunAzure TURN server is expensive to run because instance costs as well as bandwidth considerations are quite high with uncertain costsMetered gives you full control over costs as you can determine how much to spend or you want to spend for overages or not Protection against DDoS attacksAzure offers DDoS protection as an add-on that costs quite a lot of money. With Metered TURN server DDoS protection comes bundled with the plan and basically you don't have to worry about attacks or anything like that No Geo targetingWith Azure you can technically create servers with geo targeting but that would be very expensive because you will need to create and maintain multiple servers across the globe that would cost quite a lot of moneyMetered offers automatic geo targeting for free and is included in every plan MaintenanceWith Azure you just get a server that you will have to maintain and update all the dependencies. The instance can also go into limbo which is a state where the instance stops working and needs to be restarted which results in downtimeWith Metered you don't need to worry about maintenance at all. There is a 99.999% Uptime which is best in the industry ScalabilityThe Azure TURN server is limited by the instance that you created. As TURN usage increase you will require bigger and bigger instance.During peak times you might hit the limit of the instance and might need to create a bigger instance that might increase costsMetered TURN server is highly scalable and there is no need to worry about scalability at all ConclusionIn this article we learnt about how to create a TURN server using Azure. We also learnt about the paid TURN server service called Metered and how you can use that as an alternative to creating a TURN server on Metered.Note: This article was originally written on the Metered Blog: Azure TURN Server: The Step by Step Guide.



This post first appeared on VedVyas Articles, please read the originial post: here

Share the post

Azure Turn Server: The Step by Step Guide

×

Subscribe to Vedvyas Articles

Get updates delivered right to your inbox!

Thank you for your subscription

×