Home > Net >  Which settings should Azure App Service pre-production slot use?
Which settings should Azure App Service pre-production slot use?

Time:09-30

I have 3 App Service slots in Azure:

  • ExampleName (Production)
  • ExampleName/master
  • ExampleName/staging

CI/CD is configured this way:

  • on push to branch 'master' deploy to 'ExampleName/master' slot
  • on push to branch 'staging' deploy to 'ExampleName/staging' slot

I read about deployment best practices in Azure docs and they say that:

Continuous deployment should never be enabled for your production slot. Instead, your production branch (often main) should be deployed onto a non-production slot. When you are ready to release the base branch, swap it into the production slot.

Image

I am new to this and quite confused about which settings should the "ExampleName/master" slot use before swapping slots? Should it use the production database and other services? Or it should use the ones from the staging environment?

Since the version of the already running app in the production slot can be different from "/master" one I am thinking that it shouldn't use the production one, but don't know if I am right or not.

CodePudding user response:

You should use different app services for your prodcution and non-production workload. Because behind the scene they use the same resources. So making stress test on your non-production slot you may take entire site down.

The prhase prodution slot and stagind slot doesn't refer to environments. They just saying that one slot is main and serve traffic. It is used to minimize downtime. So first you may publish your app to staging slot, you can make small tests to be sure that all is fine and swap slots. But this is not designed for becoming and environment.

  • Related