Skip to content

Commit

Permalink
edit links and capitalizations
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffwmartinez committed Dec 4, 2024
1 parent 57e5c3f commit 4a4008c
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions _posts/2021-9-16-App-Service-Restarts.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "Web App (Windows) Restart Operations"
title: "Web App (Windows) restart operations"
author_name: "Ignacio Alvarez Arenas"
category: diagnostics
toc: true
Expand All @@ -9,46 +9,46 @@ toc_sticky: true

This document covers some common operations that can be performed in an App Service and the effects in terms of availability and restart operations. Restarts on an App Service can be triggered either manually or by configuration changes. This document describes the effects only in App Services running on Windows operating system.

## User-Initiated Restart Operations
## User-Initiated restart operations

From a user perspective, a restart can be initiated by using any of the following methods:

### App Service Restart in Portal/Powershell/Azure CLI
### App Service restart in portal/PowerShell/Azure CLI

This action will restart all the processes in every instance where your App Service is running. This will essentially restart your application fully, therefore expect some HTTP 503 errors during the process and a possible increase of resource consumption such as CPU during the operation. If settings such as Application Initialization are applied, the application won’t be fully available until the initialization completes as expected.

Kudu process is also restarted, so some operations can fail until the process is restarted.

Other App Services running on the same App Service Plan will not be restarted

### Advanced Application Restart of instance
### Advanced application restart of instance

When restarting using the Advanced Application Restart feature in Diagnostic tools, the process of the specific instance selected will be restarted, and all the requests will be redirected to the other active instances if there were any. If settings such as Application Initialization are applied, the application won’t be fully available until the initialization completes as expected.

### Soft Restart
### Soft restart

When applying soft restart, which you can learn about here: [Web Apps - Restart](https://docs.microsoft.com/en-us/rest/api/appservice/web-apps/restart), the process will be recycled but it won’t go through a full re-load Slowness in requests can be expected. All the instances will be restarted when this operation is applied.
When applying soft restart, which you can learn about here: [Web Apps - Restart](https://learn.microsoft.com/rest/api/appservice/web-apps/restart?view=rest-appservice-2024-04-01), the process will be recycled but it won’t go through a full re-load Slowness in requests can be expected. All the instances will be restarted when this operation is applied.

## Restart of Specific App Service Plan worker node
## Restart of specific App Service Plan worker node

Restarting a specific worker node of a specific App Service Plan is possible through API. The consequences of restarting the worker node are that all those App Services running on that instance will get their processes restarted. All the other instances will remain up and running. You can learn more about this operation here: [App Service Plans - Reboot Worker](https://docs.microsoft.com/en-us/rest/api/appservice/app-service-plans/reboot-worker)
Restarting a specific worker node of a specific App Service Plan is possible through API. The consequences of restarting the worker node are that all those App Services running on that instance will get their processes restarted. All the other instances will remain up and running. You can learn more about this operation here: [App Service Plans - Reboot Worker](https://learn.microsoft.com/rest/api/appservice/app-service-plans/reboot-worker?view=rest-appservice-2024-04-01)


## Deployment Slots Restarts
## Deployment slots restarts

Restarting any deployment slot won’t affect any of the other deployment slots available for the app.

On the other hand, restarting an application could cause a possible increase in resource consumption, and depending on the application sometimes those extra resources can be high, so be aware that even though restarting a slot should not affect the other slots, resources are still shared, so it can indirectly affect the other slots if the App Service Plan does not have enough resources.

## Swap Operations
## Swap operations

Swapping between slots will trigger restarts of the source and destination slots as described here:

[Set up staging environments - Azure App Service](https://docs.microsoft.com/en-us/azure/app-service/deploy-staging-slots)
[Set up staging environments - Azure App Service](https://learn.microsoft.com/azure/app-service/deploy-staging-slots?tabs=portal)

It is important to mention the use of Swap with preview. While this won’t stop the service from restarting, it will help make sure that the service is ready before the swap executes, so the swap will not be confirmed until the user confirms it, giving the opportunity to test it before swapping slots, therefore reducing downtime too.

## Scaling Operations
## Scaling operations

Scaling out/in operations does not trigger a start or stop operation apart from the newly added instance or the instance that is going to be removed. Some slowness can be experienced in these operations on requests directed to the specific instance that is being added or removed.

Expand All @@ -65,12 +65,12 @@ These two options will restart the specific instance of your application if it m

Enabling/Disabling Auto-Heal rules (proactive or custom) will have a full restart effect, including processes such as Application Initialization. Errors such as 503 can be expected.

## Health Check Feature
## Health Check feature
Enabling HealthCheck will restart the application, so slowness can be expected.

HealthCheck feature also has some restart effects by design, as if a specific instance is having problems, it will try to restart the instance as explained in [Health Check Feature](https://docs.microsoft.com/en-us/azure/app-service/monitor-instances-health-check). Additionally, if an instance becomes unavailable for a long time, HealthCheck will replace the unhealthy instances, up to a maximum of 3 per day.
HealthCheck feature also has some restart effects by design, as if a specific instance is having problems, it will try to restart the instance as explained in [Health Check Feature](https://learn.microsoft.com/azure/app-service/monitor-instances-health-check?tabs=dotnet). Additionally, if an instance becomes unavailable for a long time, HealthCheck will replace the unhealthy instances, up to a maximum of 3 per day.

## Configuration changes effects on Availability
## Configuration changes effects on availability

Most of the configuration changes trigger some sort of restart. It is important to be aware that any config changes in sections such as the ones listed below can trigger a restart, so it is recommended to plan accordingly before any change.

Expand Down

0 comments on commit 4a4008c

Please sign in to comment.