I am trying to implement rate limiting feature to my AKS using nginx ingress rate limiting. I have just provided limit-rps:10
in nginx ingress resource. Still, i dont see expected behavior which is rps * default burst rate. Could somebody help on how rate limiting works in nginx and how to set the configuration in nginx resource?
kind: Ingress
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"extensions/v1beta1","kind":"Ingress","metadata":{"annotations":{"kubernetes.io/ingress.class":"nginx","nginx.ingress.kubernetes.io/limit-rpm":"1","nginx.ingress.kubernetes.io/proxy-body-size":"30m","nginx.ingress.kubernetes.io/rewrite-target":"/$2","nginx.ingress.kubernetes.io/ssl-redirect":"false"},"name":"hop-ingress","namespace":"default"},"spec":{"rules":[{"http":{"paths":[{"backend":{"serviceName":"example-service","servicePort":80},"path":"/"}]}}]}}
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/limit-connections: "1"
nginx.ingress.kubernetes.io/limit-rps: "1"
nginx.ingress.kubernetes.io/proxy-body-size: 30m
nginx.ingress.kubernetes.io/rewrite-target: /$2
nginx.ingress.kubernetes.io/ssl-redirect: "false"
creationTimestamp: "2021-08-13T13:33:12Z"
generation: 2
name: hop-ingress
namespace: default
resourceVersion: "21201898"
selfLink: /apis/extensions/v1beta1/namespaces/default/ingresses/hop-ingress
uid: 574f4cf5-6b66-414f-ba2c-3c36c9d62ef0
spec:
rules:
- http:
paths:
- backend:
serviceName: example-service
servicePort: 80
path: /
pathType: ImplementationSpecific
- http:
paths:
- backend:
serviceName: productpage
servicePort: 9080
path: /productpage(/|$)(.*)
pathType: ImplementationSpecific
status:
loadBalancer:
ingress:
- ip: 13.71.57.131