Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

Rate Limit on excessive errors #153

Open
jasenf opened this issue Nov 17, 2022 · 0 comments
Open

Rate Limit on excessive errors #153

jasenf opened this issue Nov 17, 2022 · 0 comments

Comments

@jasenf
Copy link

jasenf commented Nov 17, 2022

Hi,

We have a number of customers who build out client apps to our API and leave unattended for long periods of time. Eventually their calls become problematic for one reason or another and start returning useless data (ex: searching continuously for an item that has been deleted and the search should have stopped.). This is a drain on our database resources and we would like to conditionally rate limit these API calls once a certain threshold of "invalid" calls are mades.

In most cases where this is happening, we catch them with internal customized exceptions (customer doesn't see the exception of course). We would like to use the exception handler to start throttling specific users when the exception count reaches some value. So, if a specific IP address makes a call to our API that is throwing an internal exception 10 times within 5 minutes, we would like to throttle them back and restrict them from making any more calls for the next 20 minutes.

Can WebApiThrottle be extended to easily do this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant