Forum Discussion
Brady_11518
Nimbostratus
Apr 26, 2013Check if node is offline (down) or unavailable (busy)
I'd like to be able to return two different splash pages if there is a problem, one if the nodes are all offline due to monitor failure (site down for maintenance), but a different one if no nodes are unavailable, but some or all are due to pool members hitting their connection limits.
Can this be done?
Thanks!
4 Replies
- Michael_Yates
Nimbostratus
Hi Brady,
The Monitors control the availability of a server in a pool and any manual up/down changes that are made to the server by an Administrator are simply treated like as an up/down status that you would get with a monitor (with the exception of currently connected connections if the Node is Disabled or Forced Off-Line).
You can use the active_members command in an iRule to get the number available servers and made decisions on what to do with the traffic based on that.
If you have 4 servers in a pool and none are available do X, but if all four are available do Y, etc.
Connection Limits are treated as a "Node Down" / Unavailable if you hit it (starting in v11 (not sure if it's just v11 or v11.1 or 2) you can start Queuing connections in a pool).
Hope this helps. - Brady_11518
Nimbostratus
Well, I am already using active_members to determine if the pool is down.
However if it is down I would like to be able to determine if it is down because all members are offline (red diamond in gui), or because all members are unavailable (yellow triangle in gui). If red diamond, it's down due to monitors, if yellow triangle, it's down because all members have reached their connection limit. In the first instance I'd like to send a "maintenance" response, in the second I'd like to send a "busy" response.
Does that make sense? - nitass
Employee
However if it is down I would like to be able to determine if it is down because all members are offline (red diamond in gui), or because all members are unavailable (yellow triangle in gui). may we use irule for connection limit instead of setting in gui? so, we will be able to differentiate between offline and unavailable.
e.g.
CMP compatible Connection Limit per pool member
https://devcentral.f5.com/community/group/aft/1174552/asg/50
just my 2 cents. - Kevin_Stewart
Employee
Aside from writing you're own connection limiting code, it would be difficult, in an iRule, to differentiate between an "up" server and an unavailable server (which is also technically "up"). You can, however, differentiate between a "down" server (based on a monitor) and a server that is administratively taken offline. As for the unavailable servers, you should be able to alleviate this with TCP queuing, so that when a server reaches its connection limit, requests are queued until either the resource frees up or some threshold it met.
TCP queuing was introduced in 11.0.0, so if you have the "Enable Request Queuing" option in the pool member configuration settings, you can enable this and control the actual queuing with an iRule. See the following wiki page for more information:
https://devcentral.f5.com/wiki/iRules.LB_queue.ashx
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