0

I want to apply rate limiting on remote_user in ingress-nginx but unable to find any way to do that. I tried having limit_req_zone directive in http-snippet and using limit_req zone in server-snippet annotation but it does not work. It gives me: zero size shared memory zone error

Ritik Jain
  • 143
  • 1
  • 6
  • https://theawesomegarage.com/blog/limit-bandwidth-and-requests-to-your-nginx-server-with-rate_limit-and-limit_req – Hackerman Aug 03 '23 at 18:16

1 Answers1

0

Achieving rate limiting on remote_user, You have to create a custom template for your ingress controller which will override the default template. Also this enables you to add custom logic to further set up rate limiting. Here are some good reads to help you on how you can achieve your goal. [1][2]

[1] http://nginx.org/en/docs/http/ngx_http_limit_req_module.html

[2] https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/