Ignite Semaphore 不支持高流量?

Ignite Semaphore doesn't support high traffic?

我有一个 ignite 5 Client + 1 Server 集群,客户端从网络接收请求并将 REQ 发送到 ignite 服务器进行进一步处理,在我的例子中,我想为传入请求添加并发限制,我使用代码如下:

public boolean handleEntrustRequest(TestEntrustInfo TestEntrustInfo) {

    if(!concurrencySemaphore.tryAcquire()){

        return false;
    }

    try {
        return handleEntrustRequestReal(TestEntrustInfo);
    }finally {

        concurrencySemaphore.release();
    }

}

我尝试将限制数量设置为100000,即不限制传入请求。

在低并发流量下,比如50~100左右代码运行流畅, 但是随着流量的增加,我可以看到请求无法正常发送给客户端,请求似乎挂起然后超时,但是如果我删除上面的代码 可以快速处理具有 1000 个并发流量的传入请求。

在这个 link 中: https://cwiki.apache.org/confluence/display/OPENWHISK/2018-02-14+OW+Tech+Interchange+-+Meeting+Notes 我看到了这句话:

New LB, the state is consistent even locally, slots to invokers impl. with semaphores (low level of concurrency);

同时粘贴 jstack: 请在这里检查 https://textsave.de/text/E5yRP0iEqSxkzwqw

正如 Roman 所说,使用客户端特定的信号量足以解决此问题。