We are using traefik as ingress controller in our cloud service deployed on Kubernetes
We noticed lot of scenario which are either false usage or continuous failure
For ex, Wrong API call from some consumers or Calls over wrong Hosts or invalid query parameters etc
This results in high failure rate and unnecessary resource consumption at service level to detect the failure and process it
We would like to reject requests based on
Bad IP
Client for which last 1000's of requests failed
Invalid API
Invalid query parameters
etc
What is the defined pattern or features we can use to achieve this in traefik
It does not sounds like something traefk could help with.
Bad IP
In most cases requests with bad IP will not even reach traefik
Client for which last 1000's of requests failed
Traefik has no concept of client identity, this is usually application level concept enforced via cookie or token identification. As such traefilk has no way of telling if it's the same client or not. There is a generic rate limit support, but it does not sound like it fits.
Invalid API
Again, this is something that traefik has not visibility of - should be handled on application level
Invalid query parameters
Same as above.
To me it sounds like you will have to look elsewhere.