Forum Discussion
David_21149
Nimbostratus
Apr 20, 2010Getting the configured members of pool in iRule
The Specific Problem:
I can't find a way to get the configured members of a pool as a list (member1, member2...) or as a test (is this ip:port in this pool?). I seem to only be able to do the following:
- get the active members as a list, or
- test the status of a member in a pool, but where "down" can either mean "failed monitor" or "not in the pool at all"
We are running 9.4.5
Background:
As part of a search sharding scheme, we are segregating search by a parameter in the URI and sending queries to different pools. This works fine. Our second step is to relieve the search servers from indexing the content they won't have to field queries for. Our approach is to have the search servers ask the very same vserver that is actually loadbalancing the search traffic to see if they are responsible for a certain set of searches. It is important to us to do this so that there is one and only one implementation of the sharding scheme, and therefore things will never get out of sync. In the iRule, we watch for a parameter called "cust_in_my_pool=ask" and then we form a response of YES/NO instead of passing the search onto the search servers.
More on the Problem:
We have this logic working fine -- kind of. We actually cannot see the configured members of the pools. We can only see the active members. Or, using LB::status, we can test if a member is "up" or "session_disabled". The problem with this approach is that a member being down by monitor yields "down," and a member not being in the pool at all also yields "down." So our server must be passing its health check for our logic to work, and this is not good b/c a fresh server w/ no indexes or a broken server that we want to fix will not pass its healthcheck and therefore won't be able to learn what indexes it needs to become a healthy happy search server.
Thanks for reading,
Dave
- hoolio
Cirrostratus
Hi Dave, - David_21149
Nimbostratus
Thanks Aaron. - David_21149
Nimbostratus
From my SE, Doug: "members" command is in v10: http://devcentral.f5.com/wiki/default.aspx/iRules/members.html
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