Direct Line performance improvements

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 backend storage system that will dramatically improve the performance of your Direct Line conversations. This new backend 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 datacenters, we’re observing 100ms faster requests. Our requests from Seattle to California have dropped from 300ms to around 180ms.

The most dramatic improvement has been in our European datacenters, which is 400ms faster than it was, and our Asian datacenter, which is consistently 450ms faster.

To enable this feature, open the Bot Framework developer portal, visit your bot, navigate to your Direct Line configuration page and select the “High-speed storage” option.

Note that this feature is in preview. If you are interested in greater stability, our existing storage stack (in service since we launched nearly a year ago) is still available as the default storage option.

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!

The Bot Framework Team