Please use this template for troubleshooting questions.
My issue:
How I encountered the problem: want to setup global rate limit with memcached in nginx ingress as annotations doesn’t support in the latest nginx releases
NGINX Ingress controller released a feature similar to global rate limit in their 5.0.0 release. This utilises NGINX Plus zone sync along with our rate limiting functionality to achieve the same results without the requirement to run memcached in cluster.
An alternative to the NGINX Plus solution for OSS users is the nginx.org/limit-req-scale annotation which will set a rate limit per pod based on the number of pods running. So if you want a global rate limit of 10r/s and you have two replicas of the NIC pods, each pod will individually get a rate limit of 5r/s. This adjusts as the replica count scales up or down.
There are some limitations to this approach (as documented) but may work well for many users.