Forum Discussion
piyush_Mahu_727
Nimbostratus
Jun 21, 2007irule to change pool based on state of another server or pool
We have two load balanced silos for mail based in two separate sites. Each silo consists of (for inbound email) an Internet SMTP server, a VIP that load balances across multiple email scrubbers and th...
Deb_Allen_18
Jun 22, 2007Historic F5 Account
Al is correct that changes elsewhere won't affect local iRule decisions, but I think we could take a bit of an outside-the-box approach to solve the problem:
I suppose you could define at each site a pool (not used for LB) that contains only the remote SMTP server, just for the purpose of monitoring its status. (You wouldn't need to know the status of the local SMTP server, I think, because if it's a silo, no traffic would come through the local scrubber VS from the dead SMTP server, right?)
You'd keep the existing local scrubber pool as the default pool, and create as you mention another global scrubber pool containing all the scrubbers from both sites.
Then in an iRule, use the LB::status command to check if the remote SMTP server is down, and choose the appropriate pool accordingly:
when RULE_INIT {
set ::RmtSvrIP 192.168.1.1
set ::RmtSvrPool RemoteSMTPServer
}
when CLIENT_ACCEPTED {
if {([LB::status pool $::RmtSvrPool member $::RmtSvrIP 25] != "down") } {
pool LocalScrubberPool
} else {
pool GlobalScrubberPool
}
}
HTH(I'd be interested to know if this works for you.)
/deb
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