Retrace will reach End of Life on March 31, 2027. Click here to learn more.

Testing in Production with Microsoft Azure

  |  March 1, 2018
Testing in Production with Microsoft Azure

_ How do you test that a feature in your application actually works? Or that it is actually being used?

Usually, you’d perform lots of tests in separate environments, like a QA or Acceptance environment. Or you’d route a certain percentage of your production traffic to the new version of your site to test if and how usage of your new features. This latter approach used to be very difficult. You had to implement and configure a load balancer to route some of the traffic to the new version of your application.

Microsoft Azure makes all of this much easier. First of all, you can easily host your application in Azure App Services. These are managed services in Azure that you can use to easily run your web applications and APIs. They scale automatically and have features like easy authentication and deployment slots.

Azure App Services deployment slots

Azure App Services deployment slots can help you to set up different environments for your application easily. A deployment slot is simply an identical hosting environment that can host the new version of your app, next to your existing environment. If you run your application in an Azure Web App, a deployment slot is a Web App that lives right next to that.

The main advantage of having deployment slots is that they allow you to easily push the new version of your application to production by performing a swap operation. This ensures that your application is warmed up before it goes into production, which enables you to deploy without any downtime.

Deployment slots are great and can provide several environments for you. But how can they help you to test out new features on some of your users? As you’ve expected; Azure has a feature for this and it is actually called Testing in Production. Let’s explore it!

Using the App Services Testing in Production feature

Testing in Production is a feature of Azure App Services and, you guessed it, it allows you to test in production. It uses deployment slots to do so. It’s actually very easy to configure and use.

In the Azure Portal, in the blade of your Web App, you’ll find the Testing in Production feature. There you can tell it to route a certain percentage of production traffic to one of your deployment slots. I’ve chosen to route 20% of production traffic to the qa deployment slot, which contains the new version of my application.

Now 20% of my users see the new version of my app and are actually testing it in production. And I can easily turn this off, or tweak it to route more or less traffic. And all I had to do to enable it was to click a few buttons and hit save. Azure takes care of the load balancer, and it is even included in the price of the App Service.

Keep in mind that when you do something like this, you need to make sure that the new version of your application in the deployment slot is connected to the same data as production, and is able to use the same authentication mechanisms and third-party services. These things might need additional configuration as a deployment slot has a different URL than your production slot, although users don’t notice that when they are routed through the Testing in Production feature.

Measuring everything

It’s nice that some users access the new version of my app, but how do I know that it actually works? Or if new features are actually being used? To find out, I need to gather as much information as possible by instrumenting my application.

There are many tools for measuring application usage and things like performance and exceptions. There are tools like Application Insights and Stackify Retrace. I currently prefer the latter because it can show me all of the exceptions that happen in my app, without explicitly having to instrument my application for it. Instrumenting your app with Stackify Retrace is really easy. This article on the Stackify Blog explains how to make Retrace work with ASP.NET Core and Azure.

Using tools like these, you can find out what your users are doing. Find out if and how they are using your new features, and find out if everything is working correctly and as performant as in the previous version of your application.

Conclusion

Testing is very important and setting up environments and testing in production can be difficult to do without the power of Microsoft Azure.

Azure App Services deployment slots make it very easy to have multiple environments to test in. And the Testing in Production feature allows you to route production traffic to one of those deployment slots with a few clicks.

This is the Azure cloud at its best. Like I always say: Azure takes care of the plumbing and all of the boring and difficult stuff, so that you can focus on building things that really matter.

Let me know what you think in the comments.

 

Improve Your Code with Retrace APM

Stackify's APM tools are used by thousands of .NET, Java, PHP, Node.js, Python, & Ruby developers all over the world.
Explore Retrace's product features to learn more.

Learn More
togel slot situs toto pucuk4d agb99 toto slot toto togel indobet situs toto toto slot toto slot toto slot toto toto slot slot depo 10k toto togel 8kuda4d toto judi bola kenangan4d toto situs toto toto toto toto situs toto toto toto slot bobatoto daftar situs toto logototo situs toto situs toto toto bydplay patentoto situs toto slot 4D situs toto leon188 situs toto slot gacor terbaru toto toto situs toto situs toto MORFINTOTO ilmutoto toto mix parlay bayitoto toto toto toto toto ilmutoto toto toto mawar800 login popotogel prize hongkong malam ini toto joker11 toto slot pucuk4d lingkartoto Pucuk4D Login UGSLOT slot gacor ilmutoto https://foundvinylrecords.com/ depo 5k slot gacor panen100 semibola MySlot188 77ag monk4d popo togel tikus4d https://asupantoto.co/ Login Batak5D pompa4d lingkartoto Pakde4D lingkartoto emas 55 AMANAHTOTO efekjitu slot pascol4d login pascol4d login sbobet88 sbobet88 https://nolimithoki.dev/ ini777 benteng786 dinasti33 slot slot gacor kaskustoto situs toto slot88 slot gacor slot jepang slot depo 5k pucuk4d patentoto https://www.juara288.asia/ flokitoto https://www.aishe-j.org/ barges88 mataramtoto https://shopjoliboutique.com/ apo388 slot 4d RP888 toto toto toto toto toto slot gacor toto pascol4d situs toto kari4d flokitoto slot gacor logototo slot depo 5k bobatoto bobatoto bobatoto slot gacor sontogel PASCOL4D LOGIN mpo slot sumbartoto mataramtoto slot gacor situs toto slot situs slot situs toto pakde4d link slot sumbartoto Login bandar toto mataramtoto popotogel login slot gacor nobu99 situs toto logototo logototo logototo logototo logototo logototo logototo logototo logototo logototo logototo logototo logototo logototo logototo logototo logototo logototo logototo logototo logototo Slot Malaysia bobatoto
togel slot situs toto pucuk4d agb99 toto slot toto togel indobet situs toto toto slot toto slot toto slot toto toto slot slot depo 10k toto togel 8kuda4d toto judi bola kenangan4d toto situs toto toto toto toto situs toto toto toto slot bobatoto daftar situs toto logototo situs toto situs toto toto bydplay patentoto situs toto slot 4D situs toto leon188 situs toto slot gacor terbaru toto toto situs toto situs toto MORFINTOTO ilmutoto toto mix parlay bayitoto toto toto toto toto ilmutoto toto toto mawar800 login popotogel prize hongkong malam ini toto joker11 toto slot pucuk4d lingkartoto Pucuk4D Login UGSLOT slot gacor ilmutoto https://foundvinylrecords.com/ depo 5k slot gacor panen100 semibola MySlot188 77ag monk4d popo togel tikus4d https://asupantoto.co/ Login Batak5D pompa4d lingkartoto Pakde4D lingkartoto emas 55 AMANAHTOTO efekjitu slot pascol4d login pascol4d login sbobet88 sbobet88 https://nolimithoki.dev/ ini777 benteng786 dinasti33 slot slot gacor kaskustoto situs toto slot88 slot gacor slot jepang slot depo 5k pucuk4d patentoto https://www.juara288.asia/ flokitoto https://www.aishe-j.org/ barges88 mataramtoto https://shopjoliboutique.com/ apo388 slot 4d RP888 toto toto toto toto toto slot gacor toto pascol4d situs toto kari4d flokitoto slot gacor logototo slot depo 5k bobatoto bobatoto bobatoto slot gacor sontogel PASCOL4D LOGIN mpo slot sumbartoto mataramtoto slot gacor situs toto slot situs slot situs toto pakde4d link slot sumbartoto Login bandar toto mataramtoto popotogel login slot gacor nobu99 situs toto logototo logototo logototo logototo logototo logototo logototo logototo logototo logototo logototo logototo logototo logototo logototo logototo logototo logototo logototo logototo logototo Slot Malaysia bobatoto