Forum Discussion
dennypayne
Dec 16, 2008Employee
This sounds do-able, I'm not sure of the best way to do the ratio but certainly you can use the snatpool command based on a decision that is made in the iRule logic of when to use each one.
My first thought is just a loop from 1 to 10 where the first 6 connections are sent to snatpool 1 and the rest to snatpool 2. Someone can probably think of a more efficient way to do that but here goes...
pseudocode:
when RULE_INIT {
set counter 0
}
when CLIENT_ACCEPTED {
if $counter < 6 {
snatpool pool-1
} else {
snatpool pool-2
}
increment $counter (not sure of the best syntax here)
if $counter > 9 {
set counter 0
}
}
Denny
EDIT: edited the code a bit...