<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hello,<br>
<br>
Have a look at split_clients which does something similar:<br>
<a class="moz-txt-link-freetext" href="http://nginx.org/en/docs/http/ngx_http_split_clients_module.html">http://nginx.org/en/docs/http/ngx_http_split_clients_module.html</a><br>
<br>
You can use resulting variable to select upstream, response or
whatever you need.<br>
<br>
On 25.01.2017 03:01, Thangamani J wrote:<br>
</div>
<blockquote
cite="mid:CAKEqK21BHKgnZ3G8U7+bw8A9P73SPOt4w-sbz5wQy=X3dTi7Pg@mail.gmail.com"
type="cite">
<div dir="ltr">Hi team,
<div><br>
</div>
<div>I'm in process of implementing following use case, please
help me with your inputs.</div>
<div><br>
</div>
<div>let's say I have endpoint /rate-limit and it should </div>
<div>75% of time, it should return "SUCCESS" as text</div>
<div>25% of time, it should return "FAILED" as text</div>
<div><br>
</div>
<div>I did try limit_req_zone which goes by request per second
and when exceeds it responds with status code 503. But in this
case i want an actual response and the percentage of
FAILED/SUCCESS to be configurable.</div>
<div><br>
</div>
<div>Any pointers for above use case would be helpful.</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Thanga.</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
nginx mailing list
<a class="moz-txt-link-abbreviated" href="mailto:nginx@nginx.org">nginx@nginx.org</a>
<a class="moz-txt-link-freetext" href="http://mailman.nginx.org/mailman/listinfo/nginx">http://mailman.nginx.org/mailman/listinfo/nginx</a></pre>
</blockquote>
<p><br>
</p>
</body>
</html>