Kong: [request] Throttling Control

Created on 13 May 2015  路  5Comments  路  Source: Kong/kong

Definition:

Throttling is to defer operations, where requests can be suspended or curtailed, with an exception generated to inform the consumer that the system is busy and that the operation should be retried later.

Thoughts / Ideas:

  • Rejecting requests from consumers who have already requested certain endpoints more than _n_ times per _x_ time unit (seconds, minutes, etc ...) over a given _period_ of time.
  • Disabling or downgrading tiers of offending consumers based on same rules
  • Defaulting to cache for throttled consumers?
idenew plugin

Most helpful comment

+1 for a throttling plugin. One of the missing features compared to alternative solutions.

All 5 comments

Isn't the rejecting requests from consumers already available via ratelimting plugin?

@tamizhgeek there could be significant difference between a traditional rate limiting behaviour and throttling. there also overlap in certain aspects.

in this case, throttling is dynamic over a range of time, vs. with rate limiting it's a fixed limit to a time unit.

e.g. you can have BOTH rules working together:

rate limiting:
500 req / day
1000 req / month total
each count towards upper limit
primarily used to limit access to data over time.

throttle:
100 req / secons
no upper limits / counting towards rate quotas.
primarily used to slow down requests to avoid server overload

also, since this would be a separate plugin would need it's own logic for rejecting requests...

+1 for a throttling plugin. One of the missing features compared to alternative solutions.

I was searching for a plugging like this. This issue is closed now and I don't see a throttle plugin on the kong website. Are there any alternatives that implement this behaviour?

Kong Enterprise Edition (EE) includes https://docs.konghq.com/enterprise/latest/plugins/rate-limiting-advanced/ plugin which offers a sliding window option. Using a sliding window has the effect of limiting the rate of requests - requests occurring at a consistently excessive rate will be rejected. More details are available here https://docs.konghq.com/enterprise/latest/rate-limiting/ and here https://konghq.com/blog/how-to-design-a-scalable-rate-limiting-algorithm/

Going forward, please move the discussion of features to Kong Nation https://discuss.konghq.com/ - Github Issues are reserved for bug reports. Thanks!

Was this page helpful?
0 / 5 - 0 ratings