Share via


Application Gateway Path-Based Routing priority

Question

Thursday, February 15, 2018 11:58 PM

If I have an application gateway with a path-based rule with two paths set:

/Site/* -> backend pool 1

/Site/5/* -> backend pool 2

Which rule takes priority?  Is there any documentation as to the order that rules get resolved?

All replies (5)

Friday, February 16, 2018 8:13 AM

Rules are processed in the order they are listed in the portal. It is highly recommended to configure multi-site listeners first prior to configuring a basic listener. This ensures that traffic gets routed to the right back end. If a basic listener is listed first and matches an incoming request, it gets processed by that listener.

For more details, refer “URL Path Based Routing Overview” and “Create an application gateway with path-based routing rules using the Azure portal”.

Do click on "Mark as Answer" and “Vote as Helpful” on the post that helps you, this can be beneficial to other community members.


Friday, February 16, 2018 6:10 PM

Is there a way I can reorder the paths inside the Path-based rule?  Azure seems to put them in the same order regardless of the order I create them.


Saturday, February 17, 2018 1:14 PM

Rules are processed in the order they are listed, and traffic is directed using the first rule that matches regardless of specificity. If you have a rule using a basic listener and a rule using a multi-site listener both on the same port, the rule with the multi-site listener must be listed before the rule with the basic listener in order for the multi-site rule to function as expected.

 

For more details, refer below mentioned links:

Path-based rule

Create the default listener and rule

listener and redirection rule

 

Do click on "Mark as Answer" and “Vote as Helpful” on the post that helps you, this can be beneficial to other community members.


Tuesday, February 20, 2018 4:52 PM

Yaswanth,

I understand that if you have multiple rules, they are evaluated in order.  I'm refering to the order of the routes listed inside of a single, path-based rule.  What is the priority when you have multiple paths INSIDE of a path based rule that matches a given request?


Monday, March 12, 2018 12:28 AM

They are still evaluated in the order in which they are defined within the path map.