Forum Discussion
- ReganAndersonEmployee
Hi Kirit, there are a few examples of this functionality in the iRules CodeShare:
Virtual server connection limit with HTTP response https://devcentral.f5.com/wiki/iRules.virtual_server_connection_limit_with_HTTP_response.ashx
virtual server connection rate limit with tables https://devcentral.f5.com/wiki/iRules.virtual_server_connection_rate_limit_with_tables.ashx
Another option would be putting an iRule on your Virtual Server that checks for "active_members" and if none are available it will redirect them to a Friendly Page?
I ask because you could then apply individual connection limits to your servers (once all of the servers in the pool have reached their connection limit they are considered "unavailable" which would then trigger your "active_members" iRule).
Setting a connection limit on the Virtual Sever would not have the same behavior:
SOL9812: Overview of BIG-IP TCP RST behavior
When a virtual server connection limit is configured, and the maximum number of concurrent connections is exceeded for the virtual server, the BIG-IP sends a TCP RST packet in response to connection attempts. The TCP RST packet is sent on the client side of the connection, and the source IP address of the reset is the relevant virtual server IP address.
Its always nice to have options.
- Kirit_Patel_521NimbostratusMichael I need something limit by sessions. So lets says 4 users logged in that should be 4 sessions. If the limit is set to 5 . The 5th user should be redirected to a friendly page. But other 4 sessions should stay on Is thats possible?
- Michael_YatesNimbostratus
Another option would be putting an iRule on your Virtual Server that checks for "active_members" and if none are available it will redirect them to a Friendly Page?
I ask because you could then apply individual connection limits to your servers (once all of the servers in the pool have reached their connection limit they are considered "unavailable" which would then trigger your "active_members" iRule).
Setting a connection limit on the Virtual Sever would not have the same behavior:
SOL9812: Overview of BIG-IP TCP RST behavior
When a virtual server connection limit is configured, and the maximum number of concurrent connections is exceeded for the virtual server, the BIG-IP sends a TCP RST packet in response to connection attempts. The TCP RST packet is sent on the client side of the connection, and the source IP address of the reset is the relevant virtual server IP address.
Its always nice to have options.
- Kirit_Patel_521NimbostratusMichael I need something limit by sessions. So lets says 4 users logged in that should be 4 sessions. If the limit is set to 5 . The 5th user should be redirected to a friendly page. But other 4 sessions should stay on Is thats possible?
- JRahmAdmin
If by user, something like this in the codeshare is what you're looking for:
- nitassEmployee
So lets says 4 users logged in that should be 4 sessions. If the limit is set to 5 . The 5th user should be redirected to a friendly page. But other 4 sessions should stay on Is thats possible?
i think it seems to be limiting http user session rather than tcp connection or http request.
CodeShare Refresh: HTTP Session Limit by Colin Walker
https://devcentral.f5.com/articles/codeshare-refresh-http-session-limit
HTTP session limit by hamish at travellingkiwi.com
https://devcentral.f5.com/wiki/irules.HTTP_Session_Limit.ashx
just my 2 cents
- Stefan_KlotzCumulonimbus
Hi Michael, interesting your statement regarding differences between connection limit set on a VS or on Poolmembers. But based on SOL9849 this works only if there is at least one other member available. But how can I handle it if the connection limit is reached for ALL members in a pool? Will the "active_members" part of an iRule with for example a redirect to a sorrypage still be triggered and working or is the TCP RST packet sending out before? Thank you!
Ciao Stefan :)