Forum Discussion

breasoner_11658's avatar
breasoner_11658
Icon for Nimbostratus rankNimbostratus
Aug 16, 2010

direct similar uris to their own pools via datagroup

Hi -

 

 

I have an iRule that was working just fine until I made a recent addition. The rule finds the uri and directs traffic to a pool based on the information contained in a datagroup:

 

 

when CLIENT_ACCEPTED {

 

set DATA_GROUP my_class

 

}

 

when HTTP_REQUEST {

 

set uri [string tolower [HTTP::uri]]

 

log local0.notice "Incoming Request: $uri"

 

set pool [class match -value $uri contains $DATA_GROUP]

 

if { $pool ne "" } {

 

log local0.notice "Directing to: $pool"

 

pool $pool

 

}

 

}

 

 

The datagroup looks like this:

 

 

clienta := Client-A-Pool

 

clientb := Client-B-Pool

 

 

The problem that I'm running into is we added a second site for clienta, in which the uri is clienta1. I added a line to the datagroup:

 

 

clienta1 := Client-A1-Pool

 

 

But it doesn't work. Anytime I go to http://mysite.com/clienta1, traffic gets directed to Client-A-Pool.

 

 

Anyone have any ideas on how I can make this work?

 

 

Thanks,

 

 

Brian.

7 Replies