Yugandhar
Jun 15, 2018Nimbostratus
Pool Selection and Persistence using iRule
Hi,
Can we forward traffic to a particular pool based on the host(domain) section of the URL and apply persistence of 500ms using the below iRule.
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] equals "ad.test.xya.com" } {
pool xya_Test--pool
} elseif { [string tolower [HTTP::host]] equals "bc.test.xya.com" } {
pool xya_Test--pool
} elseif { [string tolower [HTTP::host]] equals "vf.test.xya.com" } {
pool xya_Test--pool
persist 500
} elseif { [string tolower [HTTP::host]] equals "lg.test.xya.com" } {
set clientip [IP::remote_addr]
pool xya_Test--pool
persist uie $clienip 500
}else {
pool Default_VIP--pool
}
}
Thanks,
Yugandhar.