Spring HTTP throttling request integration

Looking at implementing restrictions on access to an HTTP request and I wonder if Poller is an option or should Interceptor be used? The idea has the rule "X number of requests / operations in the Y time interval" and should work through the cluster.

0
source share
1 answer

It depends on what you want to do for the throttled subscriber; throw an exception (after some timeout) or wait forever. Using the queue channel after the gateway (with a limit and send-timeouton the gateway) will work, and will throw an exception if the time is exceeded; setting the timeout to -1 (default) will be blocked forever.

error-channel " " ( -).

, - Vs. .

0

Source: https://habr.com/ru/post/1543100/


All Articles