Forum Discussion
Jun 14, 2006
You could do this with a counter.
when RULE_INIT {
initialize the global counter
set ::request_num 0
}
when HTTP_REQUEST {
Increment the counter
incr ::request_num
if { $::request_num < 10 } {
request 1-9 will go to poolA
pool poolA
} else {
the 10th request will go to poolB
pool poolB
Reset the counter
set ::request_num 0
}
}
Basically this will keep a request counter. For the requests 1-9 it will use poolA (90%). For the 10th request (the other 10%) it will use poolB and then reset the counter.
I'm sure there are other ways to do this but this should get you started.
-Joe