Forum Discussion
guy_deffaux_215
Nimbostratus
Apr 04, 2006Similar feature to LB::status under v9.0.5
Hi,
We are about to use iRules to load balance servers based on the state of other servers. For example the rule would look like "if poolB-node3 down go node poolA-node1 else use poolA". ...
guy_deffaux_215
Nimbostratus
Apr 05, 2006Thanks for the very quick reply. We used the function active_members which I was not aware before.
Let me explain what we do, as a reference:
- we only have 2 servers, each one runs 2 services Svc1 and Svc2
- the request logic is:
* a request must go to a server with Svc1 up
* if there is node with Svc2 up, go to this node
We create 2 pools, each one with the same 2 servers but each pool has its own monitor, pool1 monitor svc1 and pool2 monitors svc2.
The irule becomes:
if active_members(pool1) < 2
because we have only 2 servers, only 1 has svc1 up, so go to this one
pool pool1
else
we have 2 servers with svc1 up
if active_members(pool2) > 0
svc2 is up on at least 1 node, use pool2 to load balance
pool pool2
else
svc2 is down on both servers, load balance
pool pool1
A bit complex, but it achieves our purpose.
Thanks again
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