Forum Discussion
Les_Marstaeller
Nimbostratus
May 24, 2006Who to tell which server is being selected by an irule
Hi,
I am using the iRule below to control server pool failover when a pool member goes down:
-------------------------------------------------------------------------
rule http_sticky_failover {
when RULE_INIT {
set ::active_HTTP 192.168.222.61
set ::backup_HTTP 192.168.222.62
}
when CLIENT_ACCEPTED {
pool WS_pool member $::active_HTTP 80
}
when LB_FAILED {
if { [LB::status pool WS_pool member $::backup_HTTP 80] eq "up" } {
set temp $::active_HTTP
set ::active_HTTP $::backup_HTTP
set ::backup_HTTP $temp
pool WS_pool member $::active_HTTP 80
}
}
}
--------------------------------------------------------------------------
Is there any way to tell which pool member is currently the active one?
Also, Is there any way to change which pool member is active, apart from causing a server to go down?
As always, thanks for help you can give me.
Les
Canberra, Australia.
- JRahm
Admin
Yep. From the iRules wiki: - Colin_Walker_12Historic F5 AccountA link to the LB::server command that citizen_elah was good enough to point out above: Click here
- Les_Marstaeller
Nimbostratus
Thanks for your help (yet again citizen_elah). - Colin_Walker_12Historic F5 AccountThose are iRule commands, so they need to be included in a rule.
- Les_Marstaeller
Nimbostratus
Thanks Colin. - JRahm
Admin
Les, to see your active connections from the cli, use the b conn command:
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