Forum Discussion
Irule 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 up, its start seeing a lot of connections which is hanging the process.
So, we are trying to create a new Irule which we are planning to apply to the virtual-server limiting the sessions to only 200.
Kindly suggest.
Thanks and Regards PZ
5 Replies
- PK_Bhatia
Nimbostratus
Can you not set it up in the VIP itself? I mean why irule?
- Parveez_70209
Nimbostratus
Hi,sorry a bit new to this field..if not irule which option i need to select and put the value 200. But why irule is because we dont want manual intervention at the time of the unplanned activities. We will create and irule and place it offline into the lb. Whenever we need we will juat push the same from the batch script.
- PK_Bhatia
Nimbostratus
Here 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
- Parveez_70209
Nimbostratus
Sorry to say that PK Bhatia: the mentioned Irule is not working. This is restricting the connections limit: let's say for example 20 for each and every IP.
Hi Team,
Kindly guide whether the below Irule will work ? ================== https://devcentral.f5.com/wiki/iRules.virtual_server_connection_limit_with_HTTP_response.ashx?lc=1
Thanks and Regards PZ
- PK_Bhatia
Nimbostratus
That was quick, I think you missed the part that you need to modify...
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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