Christofer_Tib1
Apr 26, 2006Nimbostratus
iRule with several pools bring down whole VS
Hi.
I have a VS with a iRule on it that sends the traffic based on the host header to different pools.
The problem I'm having now is that if one of these pools goes down then all Wide-IPs (6 of them) that point to this VS also goes down.
I would like the Wide-IP only responsible for that pool to go down in this case, the rest of the Wide-IPs should be ok.
So if as example below pool seldmgt17-http goes down then only test2.test.com wide-ip should go down and not the other two Wide-IP.
Is there some way to do this in iRules or do we need to use some other thing.
I was looking at LB::up but that don't seems to be just right for this.
Best Regards Christofer Tibbelin
example
3 Wide-IP
test1.test.com
members VS(10.10.10.1)
test2.test.com
members VS(10.10.10.1)
test3.test.com
members VS(10.10.10.1)
VS 10.10.10.1
no default pool, only a irule that sends traffic to the different pools.
iRule: __________________________________________________
when HTTP_REQUEST {
HTTP::header replace "X-origin-IP" [IP::client_addr]
Don't allow data to be chunked so we can correctly
replace payload below
if { [HTTP::version] eq "1.1" } {
if { [HTTP::header is_keepalive] } {
HTTP::header replace "Connection" "Keep-Alive"
}
HTTP::version "1.0"
}
if { [HTTP::host] starts_with "test1.test.com" } {
HTTP::uri "/test1[HTTP::uri]"
pool seldmgt16-http
} elseif { [HTTP::host] starts_with "test2.test.com" } {
HTTP::uri "/test2[HTTP::uri]"
pool seldmgt17-http
} elseif { [HTTP::host] starts_with "test3.test.com" } {
if { [ matchclass [IP::client_addr] equals $::proxy_ip_list ] } {
HTTP::uri "/test3[HTTP::uri]"
pool seldmgt18-http
} else {
drop
}
} else {
drop
}
}