jwhite18
May 25, 2016Nimbostratus
Irule Integration
Hi guys,
I have this irule:
when HTTP_REQUEST {
switch [HTTP::cookie hectorlbhkg] { - - {
pool [HTTP::cookie hectorlbhkg]
set selected ""
}
default {
set rand [expr { rand() }]
if { ($rand < .33) and ([active_members www.hector.com_cluster_2a] >= 3) } {
pool www.hector.com_cluster_2a
set selected www.hector.com_cluster_2a
} elseif { ($rand < .66) and ([active_members www.hector.com_cluster_2b] >= 3) } {
pool www.hector.com_cluster_2b
set selected www.hector.com_cluster_2b
} elseif {([active_members www.hector.com_cluster_2c] >= 3)} {
pool www.hector.com_cluster_2c
set selected www.hector.com_cluster_2c
}
}
} } when HTTP_RESPONSE { if {$selected ne ""}{ HTTP::cookie insert name hectorlbhkg value $selected path "/" } }
And I have created this one:
when HTTP_REQUEST { if { [string tolower [HTTP::header User-Agent]] contains “msie7” or "msie8" } { pool } }
Is there a way I can integrate in to one without having to create them separately?
Cheers