Direct Line performance improvements

[Updated on 7/18/2018]

Many of you know about the Direct Line API – it’s the easiest way to embed your bot in your own mobile app, webpage, or server-to-server application. Direct Line is also used within the Bot Framework Web Chat control, and we’ve got updates to share with you about both Direct Line and Web Chat!

Our most exciting new feature is a new back end storage system that will dramatically improve the performance of your Direct Line conversations. This new back end relies on Redis as the primary store (with durable storage to Azure Table Storage) and is decentralized in a way that the old stack was not.

In our US data centers, we’re observing 100 ms faster requests. Our requests from Seattle to California have dropped from 300 ms to around 180 ms. The most dramatic improvement has been in our European data centers, which is 400 ms faster than it was, and our Asian data center, which is consistently 450 ms faster.

Geographic Direct Line endpoints

High-speed storage is great, but what happens when your HTTP calls aren’t routed to a datacenter near you? If you’re certain your clients are in Asia, North America, or Europe, we now offer geographic-specific endpoints you can call to ensure your traffic ends up in exactly the right datacenter. It’s a great way to avoid sending your packets on an accidental trans-Atlantic or trans-Pacific journey!

You now have four endpoints available:

  • directline.botframework.com routes your client to the nearest datacenter. This is the best option if you do not know where your client is located.
  • asia.directline.botframework.com routes only to Direct Line servers in Eastern Asia.
  • europe.directline.botframework.com routes only to Direct Line servers in Europe.
  • northamerica.directline.botframework.com routes only to Direct Line servers in North America.

To use these endpoints, simply replace “directline.botframework.com” with the geo-specific endpoint that works best for your clients. Directline.botframework.com remains the default and will still route to all datacenters.

Note: this feature is intended for optimizing performance only. We don’t yet have a feature for retaining data in a particular country.

Support

If you encounter problems with either the geographic endpoints or the new high-speed storage, please file an issue at our Bot Builder SDK repo on Github.

Happy Making!

Dan Driscoll from the Bot Framework Team