Ora

What is the maximum number of deployment slots that you can add to WebApp1?

Published in Azure Deployment Slots 3 mins read

You can add a maximum of five deployment slots to WebApp1.

Understanding Azure App Service Deployment Slots

Deployment slots are a valuable feature in Azure App Service that enable you to deploy different versions of your web application. They are essentially live apps with their own hostnames. The primary purpose of deployment slots is to facilitate:

  • Zero-Downtime Deployments: Deploy new code to a staging slot, warm it up, and then swap it into production, ensuring continuous availability for your users.
  • Testing in Production: Test new features or configurations in a near-production environment before making them live.
  • Easy Rollback: If issues arise after a swap, you can quickly revert to the previous working version by performing another swap.

Impact of App Service Plan on Slot Limits

The number of deployment slots available for your web app is determined by the chosen App Service Plan tier that your application runs on. Different tiers offer varying capabilities and resource allocations, including the maximum number of allowed deployment slots.

For an Azure App Service web app, such as WebApp1, which is running in the Standard App Service plan, the maximum number of deployment slots you can add is indeed five. Higher tiers provide more slots to accommodate complex deployment strategies and numerous environments.

Here's a breakdown of typical deployment slot limits across common App Service Plan tiers:

App Service Plan Tier Maximum Deployment Slots
Free / Shared 1 (production only)
Basic 3
Standard 5
Premium V2 20
Isolated V2 100

Benefits of Utilizing Deployment Slots

Leveraging deployment slots in your development and deployment pipeline offers several significant advantages:

  • Seamless Code Deployment: Avoid service interruptions during updates. New code is deployed to a staging slot, tested, and then swapped into the production slot.
  • Reliable Rollbacks: In case of unexpected issues with a new deployment, you can instantly revert to the previous stable version by swapping the slots back.
  • Staging and Pre-production Environments: Create dedicated slots for different stages of your development lifecycle, such as development, QA, staging, and user acceptance testing (UAT).
  • A/B Testing Capabilities: Direct a percentage of your live traffic to a new version in a slot to gather user feedback or test performance without affecting all users.
  • Isolated Testing: Test new features or bug fixes in an environment that closely mirrors production without impacting the live application.

Practical Considerations for Using Slots

When working with deployment slots, consider these practical insights to maximize their benefits:

  1. Always deploy your application to a non-production slot first, rather than directly to the production slot.
  2. Thoroughly test the deployed application in the staging slot before initiating a swap to production.
  3. Be mindful of slot settings; some settings are "sticky" (tied to the slot) while others are "non-sticky" (swapped with the content). Database connection strings are a common example of settings you might want to keep sticky.
  4. Utilize Azure's auto-swap feature for automated deployments, but ensure robust pre-swap validation if enabled.