1

I have a web server (Windows/IIS) hosting various web applications running as a VM on Azure.

Now, I'll need to do some maintenance on the web server, which will involve shutting down and reconfiguring the VM. During this downtime (which should be short, but could be longer if anything unexpected happens), clients accessing the web applications will run into a timeout, which is not very user-friendly. Instead, I'd like them to see a nice "This server is undergoing maintenance, please try again in a few minutes" message.

The best idea I could come up so far would be to:

  1. Create a second VM with a web server (maybe a simple Linux machine, so that I can store and keep the web server config file for the next time I need this), serving only the static maintenance message for all requests.
  2. Attach the external IP of our production VM to this "maintenance notice VM".
  3. Do the maintenance.
  4. Attach the external IP of our production VM back to the production VM.

Step 1 seems like a lot of work to set up (especially since all sites use HTTPS), so I'm wondering if there's an easier way that I'm missing.

Related questions I've found:

Heinzi
  • 2,217
  • 5
  • 32
  • 52

1 Answers1

0

You don't need a full web server to host a static maintenance page, you can use Azure Storage static web hosting.

My suggestion would be to setup a static we app for your management page, then put traffic manager in front of your existing app, with two back ends, one pointing to the app, one to the static maintenance page. You can then disable/enable the appropriate back end when you need it.

Sam Cogan
  • 38,736
  • 6
  • 78
  • 114