Forum Discussion
kimjim_51067
Mar 20, 2012Nimbostratus
I 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...
tdk_51797
Mar 26, 2012Historic F5 Account
For the 50% case, you could optimise the rule as follows:
when HTTP_REQUEST {
set flag 0
Check the path
if { [HTTP::path] eq "/build/apps/medrec/jaml" }{
For 50% of traffic send a 502 response
if { $flag == 0 }{
HTTP::respond 502 content {html...}
set flag 1
}
else {
set flag 0
}
}
}
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