0

We have a web API server that sits behind Azure WAF and Traffic manager and everything is working fine except when the API returns 503 for maintenance and here are the steps to reproduce the issue.

  1. API starts to return 503 starting at 10:00 pm with Retry-After: 10:10 pm
  2. From 10:00 pm to 10:02 pm, the requests hit the server and the server returns 503 correctly.
  3. From 10:03 pm to 10:10 pm, Microsoft-Azure-Application-Gateway/v2 returns 502 and the requests don't even hit the server
  4. From 10:10 pm the requests can hit the server again.

We do not want Azure Gateway to return 502 during the maintenance window. How can I make it so that the Gateway does not return 502?

jong shin
  • 682
  • 1
  • 5
  • 19

1 Answers1

0

Seems like below is your traffic flow.

Client -> Traffic Manager -> Application Geteway -> API

During the API maintenance window, it returns HTTP 503. The application gateway probing is marking the backend server as unhealthy as the default HTTP status range doesn't include 503. You change the application gateway and Traffic Manager custom probe HTTP status to 200-503.