cancel
Showing results for 
Search instead for 
Did you mean: 
Chad_Jenison
Nimbostratus
Nimbostratus

Problem this snippet solves:

Implements Round Robin LB to avoid CMP idiosyncracies

How to use this snippet:

Attach this iRule to virtual server

Code :

when RULE_INIT {
    set static::betterRoundRobinDebug 1
}

when CLIENT_ACCEPTED {
    set betterRoundRobinPoolMemberPick [lindex [active_members -list [LB::server pool]] [expr {[table incr [virtual]_count] % [active_members [LB::server pool]]}]]
    if {$static::betterRoundRobinDebug} {
        log "LB Pool: [LB::server pool] - ActiveMembersList: [active_members -list [LB::server pool]] - Attempt to Pick: $betterRoundRobinPoolMemberPick"
    }
    pool [LB::server pool] member [lindex $betterRoundRobinPoolMemberPick 0] [lindex $betterRoundRobinPoolMemberPick 1]
}

Tested this on version:

12.1
Version history
Last update:
‎15-Feb-2017 12:25
Updated by:
Contributors