Setup nginx limit request burst number at ingress

8/23/2018

I am wondering if it is possible to specify the burst value inside the ingress config or ingress controller configmap.

limit_req zone=one burst=5 nodelay

Br, Tim

-- Tim
kubernetes
kubernetes-ingress
nginx

1 Answer

8/23/2018

If the aim is to limit the request processing rate for requests from a particular IP then I think what you can do is use the near-equivalent nginx.ingress.kubernetes.io/limit-rps. It seems to have a limitation on controlling the burst (which is five times the limit) but should do the job. There's an example of using this in https://carlos.mendible.com/2018/03/20/secure-your-kubernetes-services-with-nginx-ingress-controller-tls-and-more/

I'm not sure if it gives quite as much flexibility as the form of limit_req zone=one burst=5 nodelay but presumably it would work for your purposes?

-- Ryan Dawson
Source: StackOverflow