Netflix / concurrency-limits

Apache License 2.0
3.23k stars 307 forks source link

Rest Client concurrency limiter - Clarification #188

Closed banandh closed 1 year ago

banandh commented 1 year ago

Hi - I'm invoking a REST based service from my application using webclient, and would like to use this ConcurrencyLimitServletFilter in my client to apply backpressure to limit the number of request sent to the server so the server will not get overloaded too much and client will not wait a long time to get connection failure.

ConcurrencyLimitServletFilter can this filter be used for both client and server concurrency limiting?

If someone can provide a Sample of how to register ConcurrencyLimitServletFilter in webclient will be helpful.

fedorka commented 1 year ago

Unfortunately, ConcurrencyLimitServletFilter is a servlet filter and is not applicable to Spring Webclient.

We don't currently have project reactor adapters for this library. You may consider using the bulkhead capability from resilience4j .