Using deployment slots
In the previous exercise, we deployed our API to the existing web app, completely overwriting the original code. Sometimes, it is better to perform a test deployment first to ensure any updates are working correctly.
We can achieve this in Azure using something called deployment slots. A deployment slot is essentially a side-by-side deployment of your Web App. It isn't the same as a test or development environment, which would have its own database and support infrastructure – it is a live deployment, except it doesn't replace the existing Web App.
Instead, it deploys to a different slot and gets a unique URL, but it still uses the same backend services, such as databases. We can then test the deployment to ensure everything is correct, and if we are happy, we can swap the slots – making the new version the live version.
Let's see an example of this in action. First, we need to change the pricing tier of the Web App as deployment...