1
votes

La limitation de débit du contrôleur d'entrée Nginx ne fonctionne pas

  annotations:
    kubernetes.io/ingress.class: "nginx"
    nginx.ingress.kubernetes.io/limit-connection: "1"
    nginx.ingress.kubernetes.io/limit-rpm: "20"
and the container image version, iam using,
image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.22.0trying to send 200 requests in ten mins of range (and per min it is like a 20 requests from a single ipaddress) and after that it has to refuse the requests.

0 commentaires

3 Réponses :


0
votes

Essayez de changer cette limite-connexion: en limit-connections:

Pour plus d'informations, consultez this

Si cela ne vous aide pas, veuillez saisir vos commandes ou décrire comment testez-vous vos limites de connexion.


1 commentaires

fait les améliorations et cela ne fonctionne pas. s'il vous plaît voir la réponse ci-dessous, elle décrit comment je fais les choses.



0
votes
I changed it to the limit-connections, I am mentioning the annotations in the ingress yml file and applying it and i can in the nginx conf the following 

`worker_rlimit_nofile 15360;
    limit_req_status                503;
    limit_conn_status               503;
    # Ratelimit test_nginx
    # Ratelimit test_nginx `
   ` map $whitelist_xxxxxxxxxxxx $limit_xxxxxxxxxx {
    limit_req_zone $limit_xxxxxxxx zone=test_nginx_rpm:5m rate=20r/m;
            limit_req zone=test_nginx_rpm burst=100 nodelay;
            limit_req zone=test_nginx_rpm burst=100 nodelay;
            limit_req zone=test_nginx_rpm burst=100 nodelay;`


when i kept this annotations, 

 ` nginx.ingress.kubernetes.io/limit-connections: "1" 
  nginx.ingress.kubernetes.io/limit-rpm: "20" `

I can see the above burst and other things in the nginx conf file, can you please tell me these make any differences ?

1 commentaires

Salut Raja, veuillez ne pas ajouter plus de réponses à votre sujet si vous fournissez plus d'informations. Mettez simplement à jour le message d'origine.



1
votes

Quelle version d'entrée de nginx utilisez-vous? veuillez utiliser quay.io/aledbf/nginx-ingress-controller:0.415 puis vérifiez, Veuillez également regarder ce lien - https://github.com/kubernetes/ingress-nginx/issues/1839


0 commentaires