简体   繁体   中英

Setup nginx limit request burst number at ingress

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

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?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM