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 then a VIP for Internal mail servers. The problem is that email scrubbers in one site can't handle the load if the Internet SMTP server on one of the silos goes down. One of the solutions (instead of adding more scrubbers) is to create another pool in each site that has scrubbers from both sites in it. The idea is to be able to call this pool in case if either one of the Internet SMTP servers goes down.
So in short, an irule attached to the scrubber VIP needs to be able to change a pool based on the state of members in another pool. Any suggestions in this regard will be highly appreciated.
Thank you,
PM
- Al_Carandang_11
Nimbostratus
Since iRules are triggered by incoming connections and not changes in a pool member's state, I don't see how this can be done by iRules. - Deb_Allen_18Historic F5 AccountAl 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:
HTHwhen 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 } }
- Deb_Allen_18Historic F5 AccountForgot to mention (in case it didn't jump right out at you) that you'd have to run an SMTP monitor/health check against the remote SMTP server to determine its status.
- piyush_Mahu_727
Nimbostratus
Thank you. I was concerned if this idea would work or not. I am going to try this in my dev environment and respond with results. You are correct that I dont need to know the status of the local SMTP server - only the one on the other site. The same applies for VIP configuration on the other site. I did catch the monitoring requirement as that is key to this approach, thanks for pointing it out though.
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