Forum Discussion
Jonas_Karlsson1
Feb 15, 2005Historic F5 Account
Checking node status from iRules
Hi,
As far as I can see from documentation available and posts to this forum there is no way to check the status of a node from within an iRule. Correct?
Cheers
Jonas
10 Replies
- Brian_Gupta_115
Nimbostratus
This thread will get you started...
http://devcentral.f5.com/default.aspx?tabid=28&forumid=5&postid=1602&view=topic
-Brian - Brian_Gupta_115
Nimbostratus
You need to create a universal persistence profile that executes an iRule. (Or are you past that point?)
Can you post what you have so far?
Thanks,
Brian - Brian_Gupta_115
Nimbostratus
Did you test this? Is there a reason you can't use a health monitor to take the node in question out of the pool.
Thanks,
-Brian - Jonas_Karlsson1Historic F5 AccountHi,
I have only looked at it to see if it's possible to do what's needed. If I can find a way to check if the server is up it can be done.
Cheers
Jonas - Brian_Gupta_115
Nimbostratus
I think the right approach is to use a health monitor to manage the pool's node status. And you can then write a custom universal persistence profile to manage the persistence info.
Devs? What do you think? Is my suggestion the preferred approach?
Thanks,
Brian - Jonas_Karlsson1Historic F5 AccountWould it be possible for persistence profile to select another node and have the iRule check what node was actually selected? Then I could modify the persistence entry to go point to that node instead.
Cheers
Jonas - Brian_Gupta_115
Nimbostratus
I don't think you need to do that. Double check with support, but I'm pretty sure persistence entries for a node that is marked down by a monitor get invalidated.
-Brian - unRuleY_95363Historic F5 AccountYes, Brian, you are correct on this. When a persist entry is used, it is first checked to see whether the resulting pool member is still active. If it is not still active, the persist entry will be replaced after the connection is re-load-balanced. This sounds like it should handle the scenario.
If they are interested in more specifically controlling the node that gets selected in the event the node is down, you could write a rule that would first do the persist lookup and node select, then if the connection failed to that node (because the node is down), you could pick the new node using whatever mechanism you want (in the LB_FAILED rule event). (I should also add that when the node in the persist entry is down, the LB_FAILED event is not triggered - it's treated more like there was no persist entry to begin with). - Jonas_Karlsson1Historic F5 AccountGreat!
That looks like the way to do it.
The only problem is that i can't find any reference to LB_FAILED anywhere in the documentation or on this site. Anything special that would be good to know about it=
Cheers
Jonas - JRahm
Admin
In regards to:
(I should also add that when the node in the persist entry is down, the LB_FAILED event is not triggered - it's treated more like there was no persist entry to begin with)
Do you mean marked down by LTM, or that the server connection failed? I'm trying to figure out what to do with the 15 seconds between server failure and LTM recognition of that failure for connections that I've built an entry into the session table.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
