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 apply this irule so that it will drop 50% or 25% of my traffic , so that systems will not be crashed.
He is the sample i am thinking of which is not working
when HTTP_REQUEST {
if { ([string match {/build/apps/medrec/jaml} [HTTP::path]]) }{
HTTP::respond 502 or reject }
}
}
please help.
If there is any better option than reject like sending a fake response for 50% of the traffic that would be more helpful.
HTTP::respond 502 content {
some html tags
}