Kiran
Kiran

Reputation: 539

AWS ALB : Rule priority

I want to route for /module/path1 to one pool of instances and all other paths in that module /module/* to another pool of instances.

I want to know whether setting the highest rule priority for /module/path1 than /module/* solves my requirement.

I read the documentation but didn't understand whether it suited my requirements.

Upvotes: 7

Views: 15635

Answers (1)

Michael - sqlbot
Michael - sqlbot

Reputation: 179314

"Priority" is used here to mean "order of evaluation" or "sequence."

Thus the "highest" priority is rule #1 even though "1" is the lowest number.

Each rule has a priority. Rules are evaluated in priority order, from the lowest value to the highest value.

http://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-listeners.html#listener-rules

So, in your case, /module/path1 needs a lower priority index than /module/*, because you need to evaluate /module/path1 before evaluating /module/*. If /module/* is evaluated first, then /module/path1 will never be evaluated.

Upvotes: 19

Related Questions