Organizations often need to run web apps in isolated environments to test them before deployment. They also need to deploy quickly and without affecting users.
Suppose you’re trying to decide whether to use slots as a streamlined way to deploy a web app in your social media system. You want to find out if deployment slots reduce downtime during deployments, if they ease rollbacks, and if you can set them up in Azure.
Here, you learn how deployment slots ease the testing and rollout of new code.
Use a deployment slot
Within a single Azure App Service web app, you can create multiple deployment slots. Each slot is a separate instance of that web app, and it has a separate hostname. You can deploy a different version of your web app into each slot.
One slot is the production slot. This slot is the web app that users see when they connect. Make sure that the app deployed to this slot is stable and well tested.
Use the other slots to host new versions of your web app. Against these instances, you can run tests such as integration tests, acceptance tests, and capacity tests. Fix any problems before you move the code to the production slot. The other deployment slots behave like their own App Service instances, so you can have confidence that your tests show you how the app runs in production.
After you’re satisfied with the test results for a new app version, deploy it by swapping its slot with the production slot. Unlike a code deployment, a slot swap is instantaneous. When you swap slots, the slot hostnames are exchanged, immediately sending production traffic to the new version of the app. When you use slot swaps to deploy, your app is never exposed to the public web in a partially deployed state.
kubernetes containarization training courses malaysia
Leave a Reply