Twilio TURN Server Alternative
Tags: webdev, javascript, webrtc, programming
Published: 2023-12-23 20:53:45

Twilio is a communications and customer data company with various products such as sms, video calling, customer data, sending emails etc

One of the services that Twilio offers is TURN servers. Let us consider just the TURN server product of twilio and its advantages and drawbacks and after that we will look at its alternative

There are not many players in the TURN server business as it requires, huge infrastructure with servers around the world

## What are TURN servers?

When you are conducting webrtc video conferencing or file tranfers between devices that are behind different NATs, it becomes difficult to connect then directly


As NAT provides a private IP address to clients that are behind the NAT and all the traffic is tunneled through a single Public IP address

Here TURN servers come in to play. They transfer the data from one client to another when direct connection is not possible because of NAT or firewall rules

Here one client sends the data to the TURN server and the TURN server sends the data to other clients that are doing webrtc video conferencing or file transfers etc 

there are two major TURN server providers and we are going to consider both.

these are 

- Twilio TURN server
- Metered TURN server

## What is Twilio TURN server


Twilio is a communications company with various products like video calling, audio calling, sms, email, customer data and many others

One of the products that Twilio offers is TURN servers

## Advantages of Twilio TURN server

1. Available in 7 regions of the world: Twilio TURN servers are available in 7 regions around the world
2. Flexible pricing according to the region: With pay as you go pricing starting at $0.40 USD per gb for north america
3. Data Security Data security through encryption. This is by defeault provided as all TURN server data is encrypted
4. Other services like SMS and Email also available under the same umbrella

## Disadvantages of Twilio TURN server

1. Not a primary product: TURN server is not the primary product of Twilio. It is not even mentioned on the landing page of Twilio
2. Availability
3. Limited API Options
4. No Geo location targeting 
5. 99.99% uptime only as compared to 99.999% uptime for Metered TURN servers

## Pricing


Twilio pricing is region dependent. You need to select a region and pay the  pricing for that region there is no Auto geo location tracking

- The cheapest is the US West region with $0.400 USD /GB
- The Most expensive is Brazil with $0.800 USD / GB

It is available in 7 regions around the world

- Singapore, USA, Japan, Australia, Germany, Brazil, Ireland
Here is the complete pricing breakdown:

<table>
<thead>
<tr>
<th>Twilio TURN server pricing</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>Global Geo location targeting</td>
<td>X</td>
</tr>
<tr>
<td>USA</td>
<td>$0.40 USD /gb</td>
</tr>
<tr>
<td>Europe</td>
<td>$0.40 USD /gb</td>
</tr>
<tr>
<td>Asia Pacific</td>
<td>$0.60 USD /gb</td>
</tr>
<tr>
<td>South America</td>
<td>$0.80 USD /gb</td>
</tr>
</tbody>
</table>

## Twilio Alternative: [Metered TURN server](https://www.metered.ca/stun-turn)

Metered Video is a Global TURN server Cloud Provider. With servers across the world. 

Apart from TURN server Metered also provides Video and audio calling APIS and SDK

It is a Canadian company with international presence and specializes in TURN server infrastructure


## Features of [Metered TURN server](https://www.metered.ca/stun-turn)
Here are some of the features of Metered TURN server


1. **Global Geo-Location targeting:** Automatically directs traffic to the nearest servers, for lowest possible latency and highest quality performance. less than 50 ms latency anywhere around the world 
2. **Servers in 12 Regions of the world:** Toronto, Miami, San Francisco, Amsterdam, London, Frankfurt, Bangalore, Singapore,Sydney (Coming Soon: South Korea, Japan and Oman)
3. **Low Latency:** less than 50 ms latency, anywhere across the world.
4. **Cost-Effective:** pay-as-you-go pricing with bandwidth and volume discounts available.
5. **Easy Administration:** Get usage logs, emails when accounts reach threshold limits, billing records and email and phone support.
6. **Standards Compliant:** Conforms to RFCs 5389, 5769, 5780, 5766, 6062, 6156, 5245, 5768, 6336, 6544, 5928 over UDP, TCP, TLS, and DTLS.
7. **Multi‑Tenancy:** Create multiple credentials and separate the usage by customer, or different apps. Get Usage logs, billing records and threshold alerts.
8. **Enterprise Reliability:** 99.999% Uptime with SLA.
9. **Enterprise Scale:** With no limit on concurrent traffic or total traffic. Metered TURN Servers provide Enterprise Scalability
10. **50 GB/mo Free:** Get 50 GB every month free TURN server usage with the Free Plan
11. Runs on port 80 and 443
12. Support TURNS + SSL to allow connections through deep packet inspection firewalls.
13. Support STUN
14. Supports both TCP and UDP


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

## Comparison of [Metered TURN server](https://www.metered.ca/stun-turn) Vs Twilio

<table>
<thead>
<tr>
<th style="text-align: center"><strong>Feature</strong></th>
<th style="text-align: center"><strong>Metered</strong></th>
<th style="text-align: center"><strong>Twilio</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: center">Reliability</td>
<td style="text-align: center">99.999%  Uptime</td>
<td style="text-align: center">99.9%</td>
</tr>
<tr>
<td style="text-align: center">Scalability</td>
<td style="text-align: center">Unlimited Bandwidth</td>
<td style="text-align: center">Unlimited  Bandwidth</td>
</tr>
<tr>
<td style="text-align: center">Global Server Network</td>
<td style="text-align: center">12 Regions</td>
<td style="text-align: center">7 Regions</td>
</tr>
<tr>
<td style="text-align: center">Comprehensive API for TURN server Management</td>
<td style="text-align: center">Yes,  add/ remove creds, retrieve per-user usage metrics and much more</td>
<td style="text-align: center">not available</td>
</tr>
<tr>
<td style="text-align: center">Global Geo Targeting</td>
<td style="text-align: center">yes</td>
<td style="text-align: center">not available</td>
</tr>
<tr>
<td style="text-align: center">Region Specific Geo Targeting</td>
<td style="text-align: center">yes</td>
<td style="text-align: center">not available</td>
</tr>
<tr>
<td style="text-align: center">Country Specific  Geo Targeting</td>
<td style="text-align: center">yes</td>
<td style="text-align: center">not available</td>
</tr>
<tr>
<td style="text-align: center">Pricing</td>
<td style="text-align: center">0.40 USD and 0.10 USD / GB  with volume discounts</td>
<td style="text-align: center">0.40 to 0.80 USD /GB</td>
</tr>
<tr>
<td style="text-align: center">Free Plan</td>
<td style="text-align: center">yes 50 GB /mo</td>
<td style="text-align: center">no</td>
</tr>
<tr>
<td style="text-align: center">User Management</td>
<td style="text-align: center">create per user creds and  manage user data usage</td>
<td style="text-align: center">no</td>
</tr>
<tr>
<td style="text-align: center">cost management</td>
<td style="text-align: center">finely manage cost with full  control on spend. Pre paid plans and ability to control how much you spend</td>
<td style="text-align: center">not avaiable</td>
</tr>
<tr>
<td style="text-align: center">turn server Management using API s</td>
<td style="text-align: center">Create credentials, expire credentials, retrive per user usage metrics, retrive usage data by date and much more via API</td>
<td style="text-align: center">not available</td>
</tr>
<tr>
<td style="text-align: center"></td>
<td style="text-align: center"></td>
<td style="text-align: center"></td>
</tr>
</tbody>
</table>

## [Metered TURN server](https://www.metered.ca/stun-turn) pricing


There is a free trial available, where you get 500 MB of Global TURN server data every month along with API access 

The pricing for Metered is pay as you go plus you need to buy a specific plan as well

<table>
<thead>
<tr>
<th>Metered TURN server Pricinbg</th>
<th>Free Plan</th>
<th>Free trial</th>
<th>Growth</th>
<th>Business</th>
<th>Enterprise</th>
</tr>
</thead>
<tbody>
<tr>
<td>Bundled Usage</td>
<td>50 GB</td>
<td>500 MB</td>
<td>150 GB</td>
<td>500 GB</td>
<td>2 TB</td>
</tr>
<tr>
<td>Overage</td>
<td>X</td>
<td>x</td>
<td>$0.40 USD /GB</td>
<td>$0.20 USD/ GB</td>
<td>$0.10 USD / GB</td>
</tr>
<tr>
<td>GLobal Auto Geo Location Targeting</td>
<td>X</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
</tr>
<tr>
<td>API Access</td>
<td>X</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
</tr>
<tr>
<td>Uptime</td>
<td>99.99%</td>
<td>99.999% Uptime</td>
<td>99.999% Uptime</td>
<td>99.999% Uptime</td>
<td>99.999% Uptime</td>
</tr>
<tr>
<td>ultra low latency</td>
<td>X</td>
<td>less than 50 ms</td>
<td>less than 50 ms</td>
<td>less than 50 ms</td>
<td>less than 50 ms</td>
</tr>
</tbody>
</table>

## Conclusion

In this article we learned about Twilio and its turn server offerings. We also learned about its alternative the Metered TURN servers.

We learned about advantages and disadvantages of each and also about the benefits and unique features

Given this information you can decide for yourself which turn server provider is best for you and make an informed decision