TURN Server Costs: A Complete Guide
Tags: webdev, javascript, programming, tutorial
Published: 2023-05-29 16:32:38

In this article we are going to learn about different TURN server providers. Their pros and cons along with the pricing.

There are options for going with free providers, paid providers and also an option to run your own TURN server.

We are going to look at all these options along with which option is going to be the best for you.

These are the Top 4 options when you are in the market for a TURN server

1. [Metered TURN](https://www.metered.ca/stun-turn)
2. [Open Relay Project ](https://www.metered.ca/tools/openrelay/)
3. [AWS TURN server](https://www.metered.ca/blog/aws-turn-server-in-7-simple-steps/)
4. [Google Cloud TURN server](https://www.metered.ca/blog/google-turn-server-in-7-simple-steps/)

## tl;dr Cost Comparison of various TURN server service providers

A 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.

Also TURN Server Uptime is very critical for the WebRTC infrastructure, if your TURN Server is down your WebRTC call will not work.

TURN Servers are also prone to DDoS attack, because the attackers uses the TURN/STUN Server for DDoS amplification attacks. Hence if you are running a TURN Server then you will have to purchase DDoS protection.

If we assume 150GB bandwidth then lets calculate the cost for each of the services:

## Metered TURN Server
150 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.**

## AWS TURN Server
AWS offers 100GB of free bandwidth every month. To run the TURN Server you would require atleast a T3-xlarge ($149/mo.)  + 50GB Bandwidth ($5) = **150/mo.**

## Google TURN Server
Google price is 0.257584 USD / hr for a c3-standarad-4 instance. Google does not offer free bandwidth and charges 0.11 per GB

The pricing is ($186 /mo) Instance cost + (16.5 USD /mo) Bandwidth cost = **201.5 USD / mo**



| List of Costs   | **[Metered TURN Server](https://www.metered.ca/stun-turn)**                   | AWS TURN server                           | Google TURN server                   | Comment                                                                                                                     |
|-----------------|-------------------------------------------|-------------------------------------------|--------------------------------------|-----------------------------------------------------------------------------------------------------------------------------|
| Instance Costs  | Included in Price                         | t3.xlarge (4 core, 16 GB ram,) $0.208 /hr | (4 core, 16 GB ram) $0.257584 /hr    | Encrypted data transfer requires fair amount of CPU and RAM usage                                                           |
| Reliability     | 99.999%                                   | unknown (instance can go into limbo)      | unknown (instance can go into limbo) | Cloud severs can some times go into limbo and needs to be restarted                                                         |
| Bandwidth       | 0.4 /GB and 0.1 /GB with volume discounts | 100 GB free /mo af that 0.09 /GB          | 0.11 per gb (16.5 USD for 150 GB)    | As usage increases you might require more CPU and RAM and thus a bigger instance                                            |
| DDoS Protection | Included in Price                         | Starting from 1000s of dollars            | Starting from 1000s of dollars       | TURN Servers are also prone to DDoS attack, because the  attackers uses the TURN/STUN Server for DDoS amplification attacks |
| Maintenance     | Maintanance Free                          | Maintanance required                      | Maintenance required                 | Updating the Operating System and other dependencies is required from time to time                                          |
| Total Cost / mo | 99 USD (150 GB comes included)            | 150 USD + 4.5 USD = 154.5 USD /mo         | 185 USD + 16.5 USD = 201.5 USD /mo   | The price is for instance costs and bandwidth usage for 150 GB TURN usage / mo                                              |


![Metered TURN Server](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gtafhvbtctpil8ig79v8.png)

## 1. [Metered TURN Server Service](https://www.metered.ca/stun-turn)

Metered Video is a TURN service service provider, with 99.999% reliability, dedicated email support,  volume discounts and host of other features

With a Paid TURN service like Metered you get unlimited scalability and rock solid reliability.

<table>
<thead>
<tr>
<th><strong>Metered TURN Server</strong></th>
<th><strong>Feature Availability</strong></th>
<th><strong>Explanation</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td>Costs</td>
<td>Paid Service</td>
<td>Paid service with 0.4 USD per GB and  Volume discounts available.</td>
</tr>
<tr>
<td>Reliability</td>
<td>99.999%</td>
<td>5 Nine Reliability. The best available</td>
</tr>
<tr>
<td>Bandwidth</td>
<td>unlimited</td>
<td>You can have unlimited users using the  service at any point in time</td>
</tr>
<tr>
<td>CPU</td>
<td>Unlimited</td>
<td>Basically unlimited CPU is available</td>
</tr>
<tr>
<td>Maintenance</td>
<td>Maintenance free</td>
<td>You don't need to do any maintenances it  is a managed service</td>
</tr>
<tr>
<td>Scalability</td>
<td>Unlimited</td>
<td>The service is scalable as much as needed</td>
</tr>
<tr>
<td>Support</td>
<td>Email</td>
<td>Email support is provided with the plans</td>
</tr>
<tr>
<td>Privacy</td>
<td>yes</td>
<td>All the data is encrypted. So no one. Not  even Metered can see what data is going through their servers</td>
</tr>
<tr>
<td>Protection</td>
<td>yes</td>
<td>All sorts of built in projection against DDoS attacks and other forms of attacks</td>
</tr>
</tbody>
</table>

Just add the credentials in your application and forget about the TURN services.

Here are some of the features of Metered TURN server: 

Metered TURN server is a TURN server service provider. Metered TURN server is highly available, reliable and offers both STUN and TURN Capabilities.

The Metered TURN server runs on port 80 and 443 to bypass corporate firewalls, many corporate/enterprise firewall only allow port 80 or 443, it also supports turns + SSL for maximum compatibility.

✅ 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 server
✅ Production Ready
✅ Global Geo-Location Targeting
✅ Standards Compliant

You can create an account here: 

<a href="https://www.metered.ca/stun-turn">Sign Up for Metered TURN Server</a>


![Open Relay Project TURN Server](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h4tatz53tz808o9cj046.png)

## 1. Open Relay Project

Open relay project is a free TURN server. Which is a good option if you need a free TURN server for your project

It is production ready TURN server that runs on port 80 and 443 designed to bypass most firewalls and offers unlimited scalability and maintenance free service.

Let's evaluate the TURN service based on our parameters

<table style="max-width: calc(var(--gap-rem)*40)">
<thead>
<tr>
<th><strong>Open Relay Project</strong></th>
<th><strong>Feature Availability</strong></th>
<th><strong>Explanation</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td>Costs</td>
<td>Free</td>
<td>IT is a Free service so no costs involved</td>
</tr>
<tr>
<td>Reliability</td>
<td>99.999%</td>
<td>It has 5 Nine Reliability. The best available</td>
</tr>
<tr>
<td>Bandwidth</td>
<td>unlimited</td>
<td>You can have unlimited users using the  service at any point in time</td>
</tr>
<tr>
<td>CPU</td>
<td>Unlimited</td>
<td>Basically unlimited CPU is available</td>
</tr>
<tr>
<td>Maintenance</td>
<td>Maintainence free</td>
<td>You don't need to do any maintenanceas it  is a managed service</td>
</tr>
<tr>
<td>Scalibility</td>
<td>Unlimited</td>
<td>The service is scalable as much as needed</td>
</tr>
<tr>
<td>Support</td>
<td>Email</td>
<td>Email support is provided for free</td>
</tr>
<tr>
<td>Privacy</td>
<td>yes</td>
<td>All the data is encrypted. So no one. Not  even Open Relay Project can see what data is going through their servers</td>
</tr>
<tr>
<td>Protection</td>
<td>yes</td>
<td>All sorts of built in projection against DDoS attacks and other forms of attacks</td>
</tr>
</tbody>
</table>


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xll8l9wzmee58lduwltf.png)

## 3. AWS TURN Server

There is an option to create your own TURN server using the AWS cloud services. To do that you will need to get a EC2 cloud instance and install the open source TURN services available 

Running your own TURN server is quite a hassle especially if you don't know what you are doing. 

You could end up spending a lot of money and resources along with hassle of maintaining the TURN server.

**Considerations are as follows:**

1. Need to predict the TURN usage that you will need 
2. Ec2 instance CPU, RAM considerations 
3. Bandwidth requirements

If you get this wrong you could end up spending a lot more money than is required or get the service to go down when you really need it

AWS charges a lot of money for out of AWS data transfer also instance size costs increases exponentially with increases in the size of instance

Apart from this there are aspects of maintaining the TURN server and Protection from attacks

Once you have installed the TURN server on your EC2, you need to maintain all the dependencies update the linux operating system and manage other tasks as well
With regards to protection from DDoS and other types of attacks, the AWS does provide a basic level of protection for free but it is not enough 

You need to purchase another level of protection that also adds a level of cost



| **AWS TURN Server** | **Feature Availability** | **Explanation** |
|---|---|---|
| Costs | Paid Service | Depends on the type of instance and bandwidth requirement |
| Reliability | Unknown | Instance could go into limbo and needs to be restarted |
| Bandwidth | Limited | Limited on the bandwidth you purchased |
| CPU | Limited | On the size of instance  that you purchased |
| Maintenance | Needs to be maintained | Needs to maintained with a dedicated devops developer |
| Scalability | Not scalable | Limited to the size of  EC2 instance you purchased |
| Support | No support available | No support is available |
| Privacy | Yes | All the data is encrypted. So no one. Not  even AWS can see what data is going through their servers |
| Protection | Maybe | Basic protection available but not enough. Dedicated protection needs to be purchased |


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vkhva78u8v1heduc588p.png)
## 4. Google TURN server
Google does not have a dedicated TURN server offering. But Google does offer cloud computing similar to AWS.

Thus you can create a cloud server on google and run a TURN server on Google Cloud

Similar to AWS there are issues with running your TURN server yourself on the cloud
considerations like

- Bandwidth requirements
- Instance requirements
- Maintenance issues
- Protection
- Reliability

**1. Bandwidth requirements**

You need to know how much bandwidth your TURN server will require and you can configure this on your Google cloud compute. 

Bandwidth charges can be quite expensive if they are not properly configured and google does charge a lot of money for out of network bandwidth

Plus you need to configure before hand how much peak speed you require. Thus if you purchase a compute with 1 GBPS but peak band width is more than that they you will be throttled and result in a band experience

**2. Instance requirements**
Because TURN servers channel encrypted data they require huge CPU compute and thus selecting a instance according your needs is essential 

If you choose a small instance than you might get a worse experience with CPU topping out. A large instance will run up the costs

**3. Maintenance issues**
You need to maintain the TURN server that is running on the Google Cloud. Installing and updating the dependencies along with the operating system that is linux is essential for reliable functioning of the TURN server

A dedicated dev ops engineer is required to maintain the TURN servers

**4. Protection**
Protection is also required from DDoS attacks and other hacking that is going on. Although free DDoS protection is offered by Google.

We do not know how effective it is or if a dedicated DDoS protection needs to purchased. If it needs to be purchased than that adds to the costs

**5. Reliability**

One issues with cloud providers in general is that the instances are prone to go into limbo

which is state in which the instance no longer works and needs to be restarted, which causes an interruption in service


One by pass of this is creating multiple instances and load balance between then but that creates a whole lot complexities and increases costs 

## Conclusion

Running your TURN server is a complicated endeavour. A much easier and cost effective way we think is to purchase a TURN server service like Metered 

With 99.999% uptime, email support and volume discounts and unlimited scalability. It is a no brainer

Here is a run down on all the different ways to run a TURN server along with their benefits and costs

<table>
<thead>
<tr>
<th><strong>TURN Server Features</strong></th>
<th><strong>Open Relay Project</strong></th>
<th><strong>Metered TURN Server</strong></th>
<th>AWS TURN server</th>
<th>Google TURN server</th>
</tr>
</thead>
<tbody>
<tr>
<td>Costs</td>
<td>Free</td>
<td>0.4 /GB and 0.1 /GB with volume discounts</td>
<td>Depends on Instance and Bandwidth speed purchased and usage</td>
<td>Depends on Instance and Bandwidth speed purchased and usage</td>
</tr>
<tr>
<td>Reliability</td>
<td>99.999%</td>
<td>99.999%</td>
<td>unknown (instance can go into limbo)</td>
<td>unknown (instance can go into limbo)</td>
</tr>
<tr>
<td>Bandwidth</td>
<td>50 GB per month</td>
<td>unlimited</td>
<td>according to the plan purchased</td>
<td>according to the plan purchased</td>
</tr>
<tr>
<td>CPU</td>
<td>unlimited</td>
<td>unlimited</td>
<td>according to the instance purchased</td>
<td>according to the instance purchased</td>
</tr>
<tr>
<td>Maintenance</td>
<td>Maintanence Free</td>
<td>Maintanence Free</td>
<td>Maintanence required</td>
<td>Maintanence required</td>
</tr>
<tr>
<td>Scalibility</td>
<td>Scalable</td>
<td>Scalable</td>
<td>limited by the size of Instance purchased</td>
<td>limited by the size of the Instance purchased</td>
</tr>
<tr>
<td>Support</td>
<td>Email Support</td>
<td>Email Support</td>
<td>No Dedicated Support</td>
<td>No Dedicated Support</td>
</tr>
<tr>
<td>Privacy</td>
<td>yes</td>
<td>All the data is encrypted. So no one.  Not even the service provider  can see what data is going through their servers</td>
<td>All the data is encrypted. So no one.  Not even the service provider  can see what data is going through their servers</td>
<td></td>
</tr>
<tr>
<td>Protection</td>
<td>yes</td>
<td>yes</td>
<td>Basic protection available but not enough. Dedicated protection needs to be purhased</td>
<td>Basic protection available but not enough. Dedicated protection needs to be purhased</td>
</tr>
</tbody>
</table>

Thus as you can see the various TURN server providers and their costs.