0
votes

Is it possible to setup Azure Application Gateway to use one server as fallback if the first server is unhealthy?

We currently have this setup in our path-based rules:

/images/* -> server 1 (only server in pool 1)
/* -> server 2 (only server in pool 2)

If we take down server 1, images will return 502 gateway error even if server 2 should be able to handle it. I expected unhealthy servers to be temporarily removed from the path-based rules until they are healthy.

1
Did you know Azure Application Gateway? I think that it can do this. docs.microsoft.com/en-us/azure/application-gateway/…Wayne Yang
Yes, its the Azure Application Gateway we are using. Sorry for being unclear.Robert
Hi,Robert, May I know about what your issue is ? Since you're using Application Gateway,is your question how to achieve this feature or else? You can add your VMs into the backend pool of the Application Gateway.Wayne Yang
I have two pools. I want all traffic to be redirected to the second pool if the first does not respond (unhealthy). The second pool is capable to handle all traffic.Robert
Two pools ? You need to add two VMs into one backend pool .Also , it's necessary to configure VNet and probe, etc. refer this document :docs.microsoft.com/en-us/azure/application-gateway/…Wayne Yang

1 Answers

0
votes

Yes, It's possible to use Application Gateway to achieve that.But you need to add the two VMs in one backend pool.

Just go to one backend pool and then add the second VM into the pool. Then click save.

Also,it's necessary to configure VNet and probe, etc.

enter image description here

More about how to use Application Gateway to offer various layer 7 load balancing capabilities for VMs, refer to this document.