Forum Discussion
Chris_Miller
Altostratus
Jul 30, 2010Efficient way to set variable here?
Syntax aside, here's what I'm trying to do:
Virtual Server can send traffic to multiple pools. In this case, pool A and pool B
set A [current connections pool_A/active_members pool_A]
set B [current connections pool_B/active_members pool_B]
set C to whichever is smaller, A or B
pool pool_$C
3 Replies
- hoolio
Cirrostratus
Hi Chris,
You'd need to track the current connections by incrementing a counter in LB_SELECTED or SERVER_CONNECTED and decrement it in CLIENT_CLOSED. The math would be pretty simple after that using the expr and active_members commands.
Aaron - Chris_Miller
Altostratus
Thanks Aaron - I'm somewhat surprised we don't have a "current_connections" command yet since LTM is already tracking that as a stat.
Ah well. - hoolio
Cirrostratus
You're not the only one. I'm not sure why VS and pool connection stats aren't exposed in iRules. It might be worth a case with F5 Support to find out why.
Aaron
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