New Twilio Edge Locations Improve Application Performance

June 23, 2020
Written by

Twilio Edge Locations Banner

Over the years, organizations have used the Twilio platform to build mission critical applications. And with the growth and the adoption of our services around the world, enterprises are able to use the Twilio platform from any part of the world to build applications. Some of those applications built using Programmable Voice APIs, for example, are time sensitive. Any latency when dealing with the APIs could affect the overall quality and user experience. In addition, certain businesses require additional security that is not available over the public Internet.

Today, Twilio is launching Edge Locations that improve the performance of REST, websocket, and webhook callbacks near your geographical location.

How Edge Locations will help

Twilio’s new Edge Locations will greatly improve Programmable Voice, Programmable SMS, Notify and Webhook Callback performance. Twilio Edge Locations provide businesses the security, performance and resiliency they require for mission critical operations. They bring Twilio’s public and private network connectivity geographically closer to a business’s location for improved performance. Twilio products can now be accessed through eight public Edge Locations and seven private Edge Locations globally.

Businesses can leverage private Edge Locations for improved:

  1. security: through network peering or virtual private network
  2. performance: by isolating traffic away from the Internet
  3. resiliency: with multiple redundant entry points for load balancing or failover

Edge locations improve the performance of your applications with the following benefits:

  • Reduced latency for highly interactive, real time interactions such as voice dialing, muting, sending chat messages, etc.
  • Increased flexibility and options for network failover between Edge Locations.
  • Improved security, quality of service and availability by removing the public Internet.

Edge Locations Explained

With Edge Locations, we are deploying a regional connectivity layer. This is a set of regional ingress/egress points for REST, websocket, and webhook callbacks. Edge Locations both optimize routing to Regions, as well as significantly speeding up expensive operations, such as Transmission Control Protocol (TCP), Transport Layer Security (TLS), and authentication.  

Map of Twilio Edge Locations

How can I get started with Edge Locations?

In order to use the Edge Location with your applications, you need to specify the edge for your incoming and outgoing connectivity to Twilio.

Specifying Edge Location for API Ingress

https://api.frankfurt.us1.twilio.com  (In this example, Frankfurt is the selected Edge Location.)

Specifying Edge Location for Webhook Egress

https://customer.com/foo?q=bar#e=sydney (In this example, the fragment e= specifies the desired Edge Location.)

// Download the helper library from https://www.twilio.com/docs/node/install
// Your Account Sid and Auth Token from twilio.com/console
// DANGER! This is insecure. See http://twil.io/secure
const accountSid = 'AC90fcab1cbebe3080aaf20686503bbbfd';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken, { 
    edge: 'sydney'
});

client.calls
      .create({
         url: 'http://demo.twilio.com/docs/voice.xml',
         to: '+14155551212',
         from: '+15017122661'
       })
      .then(call => console.log(call.sid));

When will Edge Locations be Available?

Twilio Edge Locations are available to all Twilio customers starting today; the eight public Edge Locations are located in Australia, Brazil, Ireland, Frankfurt, Japan, Singapore, Ashburn, VA and Umatilla, OR and the seven private Edge Locations are in Frankfurt, London, Singapore, Tokyo, Sydney, Ashburn, VA and San Jose, CA.

Customers can target a specific Edge Location in their code by connecting to a specific Edge Location URL or by setting the Edge Location attribute in their helper library.

For a list of all the Edge Locations available see our documentation.