How to switch deployment slot with out any downtime in app service

sns 9,231 Reputation points
2023-01-20T16:22:09.94+00:00

How to switch deployment slot with out any downtime in app service , using traffic split between old and new version of application

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,408 questions
0 comments No comments
{count} votes

Accepted answer
  1. SanthiSwaroopNaikBukke-4908 595 Reputation points
    2023-01-20T17:21:18.1166667+00:00

    Switching deployment slots in Azure App Service without any downtime can be achieved using a feature called "Traffic Routing" or "Traffic Manager" which allows you to split traffic between the old and new version of your application. This is done by creating two deployment slots for your application, one for the old version (referred to as the "production" slot) and one for the new version (referred to as the "staging" slot).

    Here are the general steps to switch deployment slots in Azure App Service without any downtime:

    1. Create a new deployment slot: In the Azure portal, navigate to your App Service, and under "Deployment slots" click on "+Add slot" to create a new deployment slot.
    2. Deploy new version to the staging slot: Deploy the new version of your application to the staging slot.
    3. Test the new version: Test the new version of your application in the staging slot to ensure that it is working as expected.
    4. Start traffic routing: In the Azure portal, navigate to your App Service, and under "Deployment slots" click on "Traffic routing" and configure the traffic split between the production and staging slots.
    5. Monitor traffic: Monitor the traffic split between the production and staging slots to ensure that it is working as expected.
    6. Switch the production slot: When you are ready, switch the production slot to the new version of your application by swapping the slots.
    7. Remove the old slot: Once the new version is stable and all traffic is being served by it, you can remove the old slot.

    Note that this method allows you to reduce the downtime by gradually redirecting the traffic to the new version of the app, but there still may be some downtime during the process of swapping the slots. You could also use Azure Traffic Manager to route the traffic based on a set of rules, such as geographic location, to minimize the impact of the swap.

    It's important to test the new version of your application thoroughly to ensure that it is working as expected before switching deployment slots in production.

    It's also important to monitor

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful