Hello,

Have a look at split_clients which does something similar:
http://nginx.org/en/docs/http/ngx_http_split_clients_module.html

You can use resulting variable to select upstream, response or whatever you need.

On 25.01.2017 03:01, Thangamani J wrote:
Hi team,

I'm in process of implementing following use case, please help me with your inputs.

let's say I have endpoint /rate-limit and it should
75% of time, it should return "SUCCESS" as text
25% of time, it should return "FAILED" as text

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.

Any pointers for above use case would be helpful.

Thanks,
Thanga.


_______________________________________________
nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx


_______________________________________________
nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to