Forum Discussion
reset connections to lower priority group member when higher-ranked member is available
Application is designed such that traffic needs to go to the "main" server whenever it's available. Traffic should only go to the "standby" pool member(s) if the main node drops from the pool. (this has been achieved with a priority group, no problem.)
When "main" node comes back online, new connections will go to it (this is good) but existing connections will stick to the 'standby' pool member (this is the undesired behavior).
I've found iRule examples such as in https://devcentral.f5.com/questions/priority-group-failback that describe how one could do this for HTTP requests, but unfortunately these aren't HTTP sessions in my case -- so the 'when HTTP_REQUEST_SEND' event doesn't apply. I skimmed through https://devcentral.f5.com/wiki/iRules.Events.ashx and couldn't find anything that seemed applicable, and the various things I tried didn't seem to work.
Am I missing something easy here?
- JGCumulonimbus
Try this one:
when LB_SELECTED { if { [LB::status pool poolname member 10.0.0.1 80 ] equals "up" and [IP::addr [LB::server addr] equals 10.0.0.2] } { LB::reselect pool poolname member 10.0.0.1 } }
- JGCumulonimbus
Or, if you have problem with LB::reselect, you may force the end-user to re-connect:
when LB_SELECTED { if { [LB::status pool poolname member 10.0.0.1 80 ] equals "up" and [IP::addr [LB::server addr] equals 10.0.0.2] } { drop } }
Recent Discussions
Related Content
* 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