Hello @ProkhorovDmytro-0185
AKS supports different Ingress Controllers but unfortunately popular Azure Application Gateway do not have support of rate limiting.
You can use Nginx Ingress with annotation nginx.ingress.kubernetes.io/limit-rpm
in AKS to apply rate limit instead of Azure Application Gateway.
There are more options to manage rate limit in Nginx Ingress
https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/#rate-limiting
Here is an example of Nginx Ingress usage together with annotation nginx.ingress.kubernetes.io/limit-rpm
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/limit-rpm: 1000
spec:
rules:
- http:
paths:
- path: /testpath
pathType: Prefix
backend:
service:
name: test
port:
number: 80
You may also limit rate using Web Application Firewall on Azure Front Door and put Azure Application Gateway or Nginx Ingress behind it.
You may configure a threshold on the number of web requests allowed from a client IP during a one-minute duration. This rule is distinct from an IP list-based allow/block custom rule that either allows all or blocks all request from a client IP. Rate limits can be combined with additional match conditions such as HTTP(S) parameter matches for granular rate control.