Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS ALB : Rule priority

I want routing 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 highest rule priority for "/module/path1" than "/module/*" solves my requirement.

I read the documentation but didn't understand whether it suits my requirement.

like image 821
Kiran Avatar asked Dec 19 '22 08:12

Kiran


1 Answers

"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.

like image 67
Michael - sqlbot Avatar answered Jan 21 '23 16:01

Michael - sqlbot