You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, Problem
While configuring the latest Zuul (2.6.2) concurrency protection mechanism, I found out that Zuul will accept 1 more connection than the limit.
I can send 31 requests without being throttled, i.e. the 32nd connection is actually blocked.
Code
After looking at the code, it looks like this was done by design (or a bug?) where the concurrent counter is incremented after checking for the limit in BasicNettyOrigin.java (or >= should be used instead ?) :
@Override
public void preRequestChecks(HttpRequestMessage zuulRequest) {
if (concurrencyProtectionEnabled.get() && concurrentRequests.get() > concurrencyMax.get()) {
rejectedRequests.increment();
throw new OriginConcurrencyExceededException(getName());
}
concurrentRequests.incrementAndGet();
}
Question
Is this a known issue or is it by design ?
(of course, in my case I can just increment the max+1 to fix the issue, but I wanted to check)
Thanks!
The text was updated successfully, but these errors were encountered:
Hi,
Problem
While configuring the latest Zuul (2.6.2) concurrency protection mechanism, I found out that Zuul will accept 1 more connection than the limit.
Example
For instance, with the following config:
I can send 31 requests without being throttled, i.e. the 32nd connection is actually blocked.
Code
After looking at the code, it looks like this was done by design (or a bug?) where the concurrent counter is incremented after checking for the limit in BasicNettyOrigin.java (or
>=
should be used instead ?) :Question
Is this a known issue or is it by design ?
(of course, in my case I can just increment the max+1 to fix the issue, but I wanted to check)
Thanks!
The text was updated successfully, but these errors were encountered: