Implementing Rate Limit based on Nginx policy How to implement rate limiting in a virtual server #6078
-
For a single nginx controller, the rate limit can be implemented accurately, but for multiple pods, the limit rate will double with the number of pods. |
Beta Was this translation helpful? Give feedback.
Answered by
j1m-ryan
Jul 29, 2024
Replies: 1 comment
-
Hi @datavisorrunziyang , this feature was recently implemented. You can use the Eg like this apiVersion: k8s.nginx.org/v1
kind: Policy
metadata:
name: rate-limit-policy
spec:
rateLimit:
rate: 1r/s
key: ${binary_remote_addr}
zoneSize: 10M
scale: true |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
vepatel
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @datavisorrunziyang , this feature was recently implemented. You can use the
scale
paramater on the rateLimit policy from version3.6.0
. You can see the docs on this hereEg like this