8
votes

We have multiple webApps hosted on Azure. I want to design a consistent and standard mechanism to show an "Under Maintenance" static html page in case of Azure outage (planned and unplanned). At the moment we are not leveraging Availability sets or Load Balancer.

Any ideas are appreciated?

2
what kind of webapps do you have (.NET, Python, Java)? What kind of service are they running on (App Service, VM, etc.)? - Preston Martin
Mix of .Net, WebApi and Python. They are running on ASE (Application Service Environment). - Sam
request --> Traffic Manager --> additional endpoint outside Azure that you only bring up when s** hits the fanfare. - evilSnobu

2 Answers

19
votes

I would suggest:

  1. Add a new deployment slot called "maintenance" to your web app service.
  2. Create a separate web project that redirects all URL requests to a maintenance page message, and publish this project to the maintenance slot.
  3. When you're ready to take your site down, swap the slots between your production slot and the maintenance slot.
  4. When your maintenance is complete, swap the slots back and your site should be up and running.
1
votes

Azure application gateway enables this features where you can define custom page. You can add listener rule to redirect to custom page.

Steps to follow to enable in application gateway Reference Document

enter image description here