Forum Discussion
bob_rao_7722
Mar 14, 2006Historic F5 Account
iRule that will limit connections
I am trying to write an irule that will do the following:
1) limit the web servers to 50 connections each.
2) any connection after 50 will be redirected to another site.
3) Clients are...
Deb_Allen_18
Mar 14, 2006Historic F5 Account
Hey Bob --
The rule you've created will actually enforce a connection limit at the rule/virtual server level, not for each pool member. You could set connection limits on each node as required, and use "observed" or "least connections" lb method to ensure that all servers are utilized up to the max of the VS limit without the skewing you're seeing.
And unless I'm reading your code wrong, it looks like you may want to reverse the comparison of total to max? Looks like you're redirecting only if total < max?
And finally, in case the rule might be applied to more than 1 VS, you should be aware that since the rule uses global array values for the counter, that array value would be shared across multiple instances of the same rule.
HTH
/deb
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