kevin_49292
May 02, 2014Nimbostratus
irule: load balance connections for diff pools
Hi
I have a situation were I need to send 50% of traffic to one pool & the rest 50% traffic to a diff pool ( i.e, 1st conn - pool A, 2nd conn pool B 3rd pool A 4th pool B.....) 2) is if the Pool A goes down then it should replace with Pool C & sme with pool B (if pool b goes down it should redirect to pool D)
when CLIENT_ACCEPTED { if { (rand() = .50 } { if { [active_members POOL-A] > 0 } { pool POOL-A } else { pool POOL-C } } else { if { [active_members POOL-B] > 0 } { pool POOL-B } else { pool POOL-D } } }
Let me know if this works, or if theres any better way to do this?
Thanks!