3

We have a website hosted behind Azure Application gateway load balancer. When we take site down for maintenance it shows 502 error to end users, which isn't nice. Even if we put App_offline.htm, it shows 502.

Any other way by which this can be done? Thanks in advance.

huysmania
  • 1,054
  • 5
  • 11
Amit
  • 191
  • 4
  • 14

3 Answers3

2

As of 26th Oct 2018 Application Gateway allows custom error pages which will show when sites are down for maintenance. https://feedback.azure.com/forums/217313-networking/suggestions/18749326-application-gateway-custom-error-pages

Go to the App Gateway, select listeners and the listener for your site. Edit and go to customer errors, you can specify for 403 and 502 (bad gateway) which is what is shown if you use app_offline or take the site down.

app gateway 502 custom error

Documentation here: https://learn.microsoft.com/en-us/azure/application-gateway/custom-error

  • 1
    This was asked before custom error pages were implemented. Nonetheless, this is correct answer after Gateway has been changed. I wil accept this as an answer – Amit Oct 29 '18 at 14:29
0

The best way that this can be done would be to redirect DNS, as there is no mechanism to redirect application gateway.

If you redirected the primary site to a small static site for the duration of your outage, that would give you the frontend you need. By setting the TTL on the records you're going to move to a very small value (60 seconds etc) then once the existing TTL has expired, there will be very quick switch over to the new address

Michael B
  • 11,887
  • 6
  • 38
  • 74
0

How about using custom health probes with Application Gateway.

https://learn.microsoft.com/en-us/azure/application-gateway/application-gateway-probe-overview