To take advantage of the new features, all you need to do is make sure you’re using the 1.2 version of twilio.js as described here. There are no code changes required.
We’re releasing this SDK update after plenty of real world testing and usage. In that testing, we found that GLL can regularly shave off 500 milliseconds in audio latency, and often more. So why does that matter? Let’s take a deeper dive into how latency and media routing (the route your voice takes from your phone to the person you’re calling) affects your calls.
You go first...No you...No please after you...
Ever had those conversations with someone where you’re constantly speaking over the top of each other? That’s usually due to latency. Your voice takes so long to reach the other person on the line, that there’s a gap in conversation. They mistake this silence as a deliberate pause, thinking you’ve finished your thought. By the time your voice reaches them, they’re already mid-sentence and your voices clash.
In the old days, when a user placed a call using their local telecom provider, the media (audio) from the call would route to that provider’s local infrastructure. This was a great way of keeping a handle on call latency, but it meant that providers could only offer services within their service area. If you were too far out of that geographic area, your quality call suffered.
Cloud communication platforms work in a different way than local telecom providers. They open up global communication services to users worldwide. But, with this freedom to call anywhere comes the geographic challenge of latency.
Using other cloud platforms, your media always routes back to the platform’s home country. Even though the media packets (encapsulating your voices) are travelling at close to the speed of light, there can still be enough latency that you encounter the “you go first...no, you” problem. We’ve invested in Twilio GLL heavily over the past couple of years in order to provide a different approach which brings you intelligent media routing for a great call experience.
Global Service, Local Media
So what does GLL do? In a nutshell, GLL gives you the benefit of centralized signaling intelligence and always routes media to our closest data center – any one of our seven data centers spread around the world. We pick the best media path to minimize geographic distance and also minimize the amount of hops your media travels over the public internet. This means wherever in the world you’re deploying Twilio Client, you get local media, local latency conditions, and great conversations – all controlled by your app logic from a single centralized place.
Read more about GLL here