Hi tkrn4,
You can create separate pools for each set of servers (I am grouping them together so that the iRule makes more sense):
pool.for.set.1.on.port.8080
host1:8080 (JBOSS HTTP)
host2:8080 (JBOSS HTTP)
pool.for.set.1.on.port.8081
host1:8081 (JBOSS HTTP)
host2:8081 (JBOSS HTTP)
pool.for.set.1.on.port.8082
host1:8082 (JBOSS HTTP)
host2:8082 (JBOSS HTTP)
Then try this:
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"/customer_a*" { pool pool.for.set.1.on.port.8080 }
"/customer_b*" { pool pool.for.set.1.on.port.8081 }
"/customer_c*" { pool pool.for.set.1.on.port.8082 }
}
}
Note the Wildcard "*" is placed at the end because entries in a switch statement are literal.
Hope this helps.