Forum Discussion
Brian_Kinsey_10
Nimbostratus
Jun 11, 2008Connection Limits
I have a pool with three servers; Server1, Server2, and Server3. I would like to force the first 1000 connections to all go to Server1. Once the connection limit is reached, persisting connections wil...
Brian_Kinsey_10
Nimbostratus
Jun 11, 2008I have done some more research, and it doesn't look like connection limits on the pool members will meet my requirements. I believe that once a member falls below the limit, it will start taking connections again, which I do not want to happen. I started working on an iRule....
when RULE_INIT {
array set ::active_connections { }
}
when HTTP_REQUEST {
if LB::status pool pool1 member 10.10.10.1 up
set servername server1
if active_connections($servername) <= 1000
use pool pool1 member 10.10.10.1 80
incr ::active_connections($servername)
else LB::status pool pool1 member 10.10.10.1 80 down
use pool pool1 member 10.10.10.2 80
set servername server2
incr ::active_connections($servername)
if LB::status pool pool1 member 10.10.10.2 80 up
set servername server2
if active_connections($servername) <= 1000
use pool pool1 member 10.10.10.2 80
incr ::active_connections($servername)
else LB::status pool pool1 member 10.10.10.2 80 down
use pool pool1 member 10.10.10.3 80
set servername server3
incr ::active_connections($servername)
else use 10.10.10.3
set servername server3
use pool pool1 member 10.10.10.3 80
incr ::active_connections($servername)
}
when CLIENT_CLOSED {
incr ::active_connections($servername) -1
}
I know I need more brackets, but other than that, will this work?
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
