Forum Discussion
jasona_40790
Aug 23, 2012Nimbostratus
iRule that redirects to Sorry Pool when pool is down
When all of the webservers in a pool are down, I want my users to be directed to the "SorryPage" server pool that will display a maintenance/down page. I've been reading through the forums and I thi...
nitass
Aug 25, 2012Employee
for maintenance page, i think we should use HTTP_REQUEST event and HTTP::uri command in addition to pool command since we may have to change url when sending to maintenance pool. and i do not think we need to save default pool name in CLIENT_ACCEPTED event.
e.g.
[root@ve10:Active] config b virtual bar list
virtual bar {
snat automap
pool foo
destination 172.28.19.79:80
ip protocol 6
rules myrule
profiles {
http {}
tcp {}
}
}
[root@ve10:Active] config b pool foo list
pool foo {
monitor all fake
members 200.200.200.101:80 {}
}
[root@ve10:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST {
if {[active_members [LB::server pool]] < 1} {
HTTP::uri /
pool sorrypool
}
}
}
[root@ve10:Active] config b pool sorrypool list
pool sorrypool {
members 200.200.200.102:80 {}
}
default pool is down
[root@ve10:Active] config b pool foo|grep -i pool
POOL foo LB METHOD round robin MIN/CUR ACTIVE MEMBERS 0/0
+-> POOL MEMBER foo/200.200.200.101:80 inactive,down
client accesses virtual server and is sent to sorrypool instead
[root@ve10:Active] config ssldump -Aed -nni 0.0 port 80 and not host 200.200.200.10
New TCP connection 1: 172.28.19.251(44474) <-> 172.28.19.79(80)
1345898352.5804 (0.0009) C>S
---------------------------------------------------------------
HEAD /something HTTP/1.1
User-Agent: curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
Host: 172.28.19.79
Accept: */*
---------------------------------------------------------------
New TCP connection 2: 200.200.200.80(44474) <-> 200.200.200.102(80)
1345898352.5875 (0.0070) C>S
---------------------------------------------------------------
HEAD / HTTP/1.1
User-Agent: curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
Host: 172.28.19.79
Accept: */*
---------------------------------------------------------------
just my 2 cents.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects