<p>i am not able to understand one point in the <strong>rate-limiting</strong> of <strong>Nginx ingress</strong></p>
<p>i was referring to one article regarding rate limiting with nginx ingress : <a href="https://medium.com/titansoft-engineering/rate-limiting-for-your-kubernetes-applications-with-nginx-ingress-2e32721f7f57#:%7E:text=When%20we%20use%20NGINX%20ingress,configure%20rate%20limits%20with%20annotations.&amp;text=As%20an%20example%20above%2C%20the,qps" rel="nofollow noreferrer">https://medium.com/titansoft-engineering/rate-limiting-for-your-kubernetes-applications-with-nginx-ingress-2e32721f7f57#:~:text=When%20we%20use%20NGINX%20ingress,configure%20rate%20limits%20with%20annotations.&amp;text=As%20an%20example%20above%2C%20the,qps</a>)%20on%20the%20Hello%20service.</p>
<p>in <strong>limitation section at last</strong></p>
<blockquote>
<p>It applies to the whole ingress and is not able to configure
exceptions, eg. when you want to exclude a health check path /healthz
from your service.</p>
</blockquote>
<p>if i am creating two <strong>ingresses</strong> with different <strong>names</strong>, one has path <strong>/hello1</strong> and another <strong>/hello2</strong> both pointing to the <strong>same service backend</strong>.</p>
<p>Now if i am adding rate limiting to only one ingress or path <strong>/hello1</strong> will it affect another? if the same <strong>host or domain</strong> is there ???</p>
<p><strong>ingress 1</strong> : <code>example.com/hello1</code> - rate-limit set</p>
<p><strong>ingress 2</strong> : <code>example.com/hello2</code> no rate limiting</p>
<p>Thanks in advance</p>

<p>Rate limit will be applied only to that ingress where you specified it. What is basically nginx-ingress doing in the background - it merges rules into 1 huge config, however  they applies to different objects.</p>
<p>e.g 2 different ingresses for same host and diff path.</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: test1
  annotations:
    kubernetes.io/ingress.class: 'nginx'
    nginx.ingress.kubernetes.io/limit-rps: '5'
spec:
  rules:
  - host: example.com
    http:
      paths:
      - path: /path1
        backend:
          serviceName: service1
          servicePort: 8080
</code></pre>
<p>and</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: test2
  annotations:
    kubernetes.io/ingress.class: 'nginx'
    nginx.ingress.kubernetes.io/limit-rps: '10'
spec:
  rules:
  - host: example.com
    http:
      paths:
      - path: /path2
        backend:
          serviceName: service1
          servicePort: 8080
</code></pre>
