Maxim_Taskov_90
Jun 26, 2008Nimbostratus
Match URI Path and Choose Pool Plus Pool Availability Check
Hi ...
I am trying to create a rule with the following logic and assign it on a single virtual server:
1. If URI path matches string class MyURI (listing about fifteen URI paths) AND the active members of Pool2 are more than zero, choose Pool2.
2. If URI path does not match string class MyURI OR Pool2 has zero active members, choose Pool1.
I came up with the following ... please tell me if the logic will be processed correctly, that will satisfy the above two requirements and if this is the most efficient way to accomplish my objective:
when HTTP_REQUEST {
if { [matchclass [HTTP::uri] starts_with $::MyURI] } {
if { [active_members Pool2] > 0 } {
pool Pool2
} else {
pool Pool1
}
}
}
Thanks!