0
votes

We have a Azure DevOps release pipeline with an ARM template deployment as the start of each release. We do this to make sure our Azure resource stays in sync with the ARM template configured in our repository.

I expected that if there is a change, the Azure App Service would restart, but if there is no change (the deploy just verifies the app is still in sync) no restart would be required. But it seems the Azure App Service restarts anyway in that case and our users can get a "Service Unavailable" message (for seconds). It is only a short downtime, but still. Similar to the downtime on the swap.

The "Web App Restarted” tab for the resource does give some information. It states there were 2 restarts with the message “User(Site Binding Change)”. One of those I can understand from the Swap we do after the ARM template deployment. So it looks like during the ARM template deployment it does a “Site Binding Change”. Why would that be the case?

I thought that ARM templates were meant to specify the systems configuration. So on deployment the first step would be a verification step and when there was no change, the ARM template would not do anything to the system. But this seems an incorrect assumption.

Can someone confirm if this expected behavior? Or if I have something misconfigured?

1
It is described in this document that if the resource already exists in the resource group and its settings are unchanged, no operation is taken for that resource. When redeploying an existing resource in incremental mode, all properties are reapplied. The properties aren't incrementally added. To minimize the random cold starts, you can set this app setting WEBSITE_ADD_SITENAME_BINDINGS_IN_APPHOST_CONFIG to 1 . See hereLevi Lu-MSFT
Thanks @LeviLu-MSFT, your comment is the answer! After setting is setting, the recycle went away for both the ARM template deployment and for the swap.Erik Steinebach

1 Answers

1
votes

It is described in this document that if the resource already exists in the resource group and its settings are unchanged, no operation is taken for that resource. When redeploying an existing resource in incremental mode, all properties are reapplied. The properties aren't incrementally added.

To minimize the random cold starts, you can set this app setting WEBSITE_ADD_SITENAME_BINDINGS_IN_APPHOST_CONFIG to 1. See here.