Estimating the Cost of Your WebRTC Media Server

If you’re planning to build a WebRTC application, you have probably come to the conclusion that you need a media server for your use case. We’ve discussed open source media servers and CPaaS platforms in the past, and that’s probably the first step. However, if you decide to go the open source route and host your own media servers, you might have a couple of questions. Where am I going to host? How much will hosting this media server cost?

A common approach is utilizing the cloud. Cloud platforms like AWS, Google Cloud, and Azure improve your data’s mobility and flexibility to enhance its value. With the cloud, it’s easy to scale services and move data where and when you need it. The catch is that hosting and moving data costs money, and those data transfer costs can add up quickly, especially when transferring video. Let’s take a look at what the costs are.

Video conferencing

Video conferencing refers to the use of audio and video to communicate in a group or meeting of three or more people. In these meetings, which are sometimes called “rooms,” each participant receives video and audio from the other participants. Popular conferencing and webinar services include Cisco Webex, Google Hangouts, GoToMeeting, Skype, and Zoom. Let’s look at an example of calculating the cost of hosting a service like this.

Example

4 x Firefox/Chrome with simulcast at 720p* to the SFU media server

The total inbound media to the server would be 4*4=16 Mbit/s

The total outbound media would be 4*(4+3*0.2)=18.4 Mbit/s, assuming you are displaying one participant on large (4Mbits/s) and the others using three thumbnails (3*200kbits/s). For an hour of video conferencing, this would be about 66.24GBits * $0.085/GBit = $5.63/hour.

At one video conferencing session per day, the monthly traffic cost would be about $169/month. It’s important to note here that without using simulcast and sending the four videos at the same quality, we would increase the cost by almost four times!

*To achieve 720p at 30fps, we need approximately 2-4 Mbits/s.

Video live streaming

Live streaming refers to a one- or few-to-many flow where the host sends video and audio to the views but the viewers aren’t sending video and audio back. Popular live streaming services include Facebook Live, Twitter Live, and YouTube Live. Let’s look at an example of calculating the cost of hosting a media server that follows this architecture.

Example

1 x Firefox/Chrome publisher client at 720p to the media server

8 x Firefox/Chrome viewing clients with the 8 outbound streams limited at 1Mbit/s each

Media server output is 8 Mbit/s, and for an hour ~29GB * $0.085/GB = $2.465/hour

At one video conferencing session per day, the monthly traffic cost would be about $74/month.

Someone said recording?

If you’re going to record the video streams and store them somewhere outside of your server, this will incur additional storage and traffic costs.

That’s only traffic. What’s the total cost?

Traffic will usually drive most of your total monthly cost, but let’s look at some examples using AWS:

Conferencing example

PoC

EC2 t2.small | price $16.84

traffic out 1 hour/day with 4 participants | price $169

Total | $185.84

Production (with a single server)

EC2 c4.xlarge | price $145.67

traffic out 10 sessions of 1 hour/day with 6 participants in each | price $2,754

Total | $2,899.67

Live streaming example

PoC

EC2 t2.small | price $16.84

traffic out 1 hour/day with 8 streams | price ~$74

Total | ~$90.84

Production (with a single server)

EC2 c4.xlarge | price $145.67

traffic out 10 sessions of 1 hour/day with 16 streams | price $1,468.80

Total | $1,614.47

Digital Ocean and Google Cloud can be cheaper or more expensive than AWS depending on your use case and requirements, so you may want to check that out. If you’d prefer to host on premises, this could be a cheaper option, but there might be some hidden costs involved.

We hope you found these examples useful and that you better understand how WebRTC media servers work and how much they can cost when you host them in the cloud.

We can help you!

At WebRTC.ventures, we build interactive live streaming, customizable video applications, and real time data apps. If you need help estimating your costs, choosing the best media server for your use case, or developing your application, we are ready and happy to help. Contact us today!

©2020 KLEO Template a premium and multipurpose theme from Seventh Queen

Log in with your credentials

Forgot your details?