Forum Discussion
David_Bradley_2
Nimbostratus
Mar 07, 2007LB::reselect from SERVER_DATA doesn't work
I need some help. I want to make an intelligent decision within my iRule about whether or not to send a TCP session to a particular node. Here's the deal. The TCP server on the nodes will return the word "FULL" in response to a TCP connection request if it isn't accepting any new connections. I can catch this "FULL" string within the SERVER_DATA event. But then I want to LB::reselect to select a new node. This apparently won't work. It says "invalid context for LB::reselect" or something along those lines. How can I pull this off? Thanks.
- helix90_35879
Nimbostratus
LB::reselect only works in request context. Once you have gotten to HTTP_response you are outside the context where a reselect is allowed. - David_Bradley_2
Nimbostratus
That's what I was afraid of. I'm not sure what you mean by passive health monitor. Is this something I can put in the iRule? If so, perfect. If not, i need something more. Here's the scenario. We have several thousand clients, all of varying degrees of weight, that connect to our services. Each server has a finite capacity of, let's say, 100. As clients come in, their weight gets decremented, by the server from this 100. Now let's say a particular server has capacity of 20 left but the LB attempts to direct a client with a weight of 30 to it. I want the server to basically deny my request, forcing the LB to select a new pool member. We own the server software source code, so we can make it behave however we want. What would happen if the server didn't respond at all? How would the 'pool' command deal with that internally? If it realizes the TCP session wasn't fully established and does it's own reselect, that would be good enough. I could definitely work with that. - tamins_90207Historic F5 Account
- ourback_109474
Nimbostratus
Take a look at LB::detach http://devcentral.f5.com/wiki/default.aspx/iRules/LB__detach.html . I think it will do what you need in that 'context.' - David_Bradley_2
Nimbostratus
Thanks. Will an LB::detach force a reselect to happen?
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