Forum Discussion
kanokwut_thanad
Nimbostratus
Mar 08, 2005Concurrent connection limit
Hi,
We are using Big-IP 6400 in our network for managing of 30-40k concurrent connections with 4-5 comprehensive rules.
Now, I would like to limit concurrent connections ...
hirox_127495
Mar 24, 2005Historic F5 Account
This code will work on 9.0.4...
when RULE_INIT {
array set ::active_clients { }
log local0. "phase1"
}
when CLIENT_ACCEPTED {
set client_ip [IP::remote_addr]
if { [info exists ::active_clients($client_ip)] } {
if {$::active_clients($client_ip) > 10 } {
log "Client $client_ip has too many connections"
reject
return
} else {
log local0. "$::active_clients($client_ip)"
incr ::active_clients($client_ip)
}
} else {
set ::active_clients($client_ip) 1
}
}
when CLIENT_CLOSED {
if { [info exists ::active_clients($client_ip)] } {
incr ::active_clients($client_ip) -1
if { $::active_clients($client_ip) <= 0 } {
unset ::active_clients($client_ip)
}
}
}
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