Forum Discussion
kimjim_51067
Nimbostratus
Mar 20, 2012I need to create an irule that will reject a specified percnetage of traffic.
Can some one help me in creating an irule that will reject percentage (ex- 50%) of the traffic .
I need this because when there is a heavy traffic my systems are unable to handle ,so i want to a...
hoolio
Cirrostratus
Mar 27, 2012I like your thinking TDK. But using a local variable for this would be specific to that TCP connection. So if you use that logic, every other HTTP request to the specific URI on each TCP connection would be dropped. I'd guess this wouldn't lead to dropping 50% of requests as some (or most?) clients would not reuse their TCP connections to make multiple requests to that specific URI.
You could use a session table entry to create a flag that you increment and then reset to 0 (https://devcentral.f5.com/wiki/iRules.CMP_v10_compatible_counters_using_the_session_table.ashx).
However, using expr will give a much more even distribution compared with a local variable, regardless of the connection reuse behavior of clients. And it doesn't require any session tracking complexity.
Aaron
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