Forum Discussion
Parveez_70209
Nimbostratus
Oct 08, 2014Irule to restrict number of concurrent sessions to 200
Hi Team,
We are trying to limit the number of concurrent/active during the initial patching activity.The problem is whenever we got an unscheduled activity, once the applications members booting...
PK_Bhatia
Nimbostratus
Oct 08, 2014Here is the irule, you can modify as you need
From http://devcentral.f5.com/wiki/iRules.table.ashx
Limit each client IP address to 20 concurrent connections
when CLIENT_ACCEPTED {
Set a subtable name with a standard prefix and the client IP
set tbl "connlimit:[IP::client_addr]"
Use a key of the client IP:port
set key "[IP::client_addr][TCP::client_port]"
Check if the subtable has over 20 entries
if { [table keys -subtable $tbl -count] > 20 } {
reject
} else {
Add the client IP:port to the client IP-specific subtable
with a max lifetime of 180 seconds
table set -subtable $tbl $key "ignored" 180
}
}
when CLIENT_CLOSED {
When the client connection is closed, remove the table entry
table delete -subtable $tbl $key
}
For the virtual server settings http://support.f5.com/kb/en-us/products/big-ip_ltm/manuals/product/ltm-implementations-11-2-1/30.html
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