Kong 2.1.0 version with kong ingress controller 0.9.1. I have three pods of kong running with Postgres DB.
I have configured the ingress and rate limit plugin as below:
Rate limit plugin:
apiVersion: configuration.konghq.com/v1 config: hide_client_headers: true limit_by: ip minute: 5 policy: local kind: KongPlugin metadata: name: sample--rate-limiting annotations: kubernetes.io/ingress.class: kong plugin: rate-limiting
apiVersion: extensions/v1beta1 kind: Ingress metadata: annotations: kubernetes.io/ingress.class: kong konghq.com/plugins: sample--rate-limiting name: sample-service spec: rules: - http: paths: - backend: serviceName: sample servicePort: 8012 path: /api/v1/sample
X-RateLimit-Remaining-Minute : 4
As per RateLimit-Reset, there is time, to reset the rate limit, so if I hit the request more than 25 times, it should reflect in the headers accordingly and for 6th request I should get 429 API Rate Limit exceeded error. I believe with policy local and 3 kong pods, I should hit rate limit after 15 api requests.
However, I am still able to successfully get the api response. Please let me know, if I nee to tweak the config or my understanding is not correct. Thanks