11

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?

Sam
  • 519
  • 1
  • 7
  • 32
  • what kind of webapps do you have (.NET, Python, Java)? What kind of service are they running on (App Service, VM, etc.)? – Preston Martin Jan 31 '18 at 22:41
  • Mix of .Net, WebApi and Python. They are running on ASE (Application Service Environment). – Sam Jan 31 '18 at 23:09
  • 1
    request --> Traffic Manager --> additional endpoint outside Azure that you only bring up when s** hits the fanfare. – evilSnobu Feb 01 '18 at 13:57

2 Answers2

24

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.
CokoBWare
  • 456
  • 3
  • 13
  • Depending on how your slots are initially populated (Azure release pipelines) you need to excercise some discipline with this technique, in order to avoid inadvertantly deploying old releases of your application into the production slot. This has the potential to happen if you fail to swap the maintenance slot back after use, then deploy to production, then subsequently attempt to swap into maintenance mode. – Chris Peacock Jan 18 '23 at 12:40
1

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

Rahul Shukla
  • 646
  • 6
  • 19