Forum Discussion
Rick_110395
Nimbostratus
Aug 08, 2011iRule behavior when pools are down
For example......in this iRule what would happen if a connection was initiated to "host1.domain.com", but srvpool1 is down. What would the iRule do with the connection?
when HTTP_REQUES...
Muhammad_64435
Nimbostratus
Aug 08, 2011hello,
You can handle this situation intelligently when this occurs.
There could be 2 scenarios when pool is "down":
1. All pool members are down [ health check failed ] or disabled manually or connection limit reaches - high demand
2. Pool is emtpy [ yes you can have an empty pool in LTM :) ]
In my opinion, your iRule will look like this:
when HTTP_REQUEST {
if { [HTTP::host] starts_with "host1" } {
check if all members are down or disable then send to virtual waiting room that may send you back for retry
if { [active_members srvpool1] == 0 } {
HTTP::redirect "http://sorry.domain.com/pleasewait.html?[HTTP::host][HTTP::uri]"
}
check if pool is empty, means maintenance is in progress
if { ![members srvpool1] } {
log local0. "Pool is empty" ;
HTTP::redirect "http://sorry.domain.com/maint.html"
}
if all good then just proceed to the pool
pool srvpool1
} elseif { [HTTP::host] starts_with "host2" } {
pool srvpool2
} elseif { [HTTP::host] starts_with "host3" } {
pool srvpool3
} elseif { [HTTP::host] starts_with "host4" } {
pool srvpool4
} else {
pool default-pool
}
}
Hope it helps.
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
