I have been using Kong in ECS to great effect with manual rules I have set up using the REST/API. The rules are something like this:
HOST: service.one → Rate Limit 1000/second
HOST: service.one + api-key: 1234-5678 → Rate Limit 10,000/second
HOST: service.one + api-key: 1234-5678 + PATH: /special-path/* → Rate Limit 150,000/second
There are no examples that I can find on how to configure multiple Ingress rules to the same service and have those rules yield different rate limits. I can do this easily with the REST/API.
I have only been able to successfully configure Kong Ingress in the following way:
SERVICE: service.one
KongPlugin_1: rate-limiting second: 1000
INGRESS: ingress.one with annotations:
– kubernetes.io/ingress.class: kong
– Kong Hub | Plugins and Integrations | Kong - Open-Source API Management and Microservice Management KongPlugin_1
KONG_INGRESS:
route:
hosts:
- service.one
headers:
api-key:
- 1234-5678
And if I try to add any additional ingress pointing to the same service, only the last rule wins. There is no way to merge a hierarchy of rules.