-
Notifications
You must be signed in to change notification settings - Fork 975
Open
Labels
Description
ConcurrencyLimit will be useful on the server side to limit the current requests being handled.
However, we can't use ConcurrencyLimit on the server side because:
- It is located in the
clientpackage and;
armeria/core/src/main/java/com/linecorp/armeria/client/limit/ConcurrencyLimit.java
Line 17 in df2c0e9
package com.linecorp.armeria.client.limit; ClientRequestContextis used as the argument of theacquire()method.
armeria/core/src/main/java/com/linecorp/armeria/client/limit/ConcurrencyLimit.java
Line 137 in df2c0e9
CompletableFuture<SafeCloseable> acquire(ClientRequestContext ctx);
So we need to move ConcurrencyLimit to common package first and implement ConcurrencyLimitingService similar to ConcurrencyLimitingClient
package com.linecorp.armeria.common.limit;
public interface ConcurrencyLimit {
CompletableFuture<SafeCloseable> acquire(RequestContext ctx);
}Discord thread: https://discord.com/channels/1087271586832318494/1087272728177942629/1328988059827568752