Forum Discussion
Richard_Jones
Nimbostratus
Jan 19, 2007Limit user sessions to each node
Here is the problem I am trying to solve:
We have a pool of 6 servers. Each server can handle 400 concurrent users sessions. We have an array of pool member user counts, and we are tracking the number of sessions on each server by incrementing the user count when we see a new session cookie created (which is persisted on), and we decrement the user count when the session cookie is destroyed.
What I want to do is set the pool member status to "session disable" if the user count hits 400. That way, existing user sessions will continue due to persistence, but no new connections will hit this pool member. Is this possible?
If not, then is it possible to check the pool member user count after a load balancing decision has been made, and rebalance to a new node if the user count is over 400?
The problem I have run into is that I don't have access to the pool member ip address in HTTP_REQUEST events (I think that occurs before a load balancing decision. I just glanced at the LB_SELECTED event, and it looks like I can rebalance the user here. I will give this a try right now.
And I am also open to other ideas!
Thanks!
- Colin_Walker_12Historic F5 AccountI believe the command you're looking for is LB::status. Click here
- Richard_Jones
Nimbostratus
Thanks Colin - dimka___104021
Nimbostratus
Hi, - Colin_Walker_12Historic F5 AccountDid you check the link I posted above? Click here There's an example of reading the variable information there. Setting it would simply require you to add a parameter as per the listed syntax:
- Richard_Jones
Nimbostratus
Hi Colin, - Deb_Allen_18Historic F5 AccountNo, sorry, there isn't any way to do that in iRules.
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