我发现了对这个问题的其他回应,但如果有人有配置解决方案方面或者在其他情况下是分布式缓存服务限制,我想解释我的用例。
集群 4 VM 中的DATA GRID Server 8.2.3,配置如下
{
"distributed-cache": {
"mode": "SYNC",
"remote-timeout": 17500,
"state-transfer": {
"timeout": 60000
},
"encoding": {
"key": {
"media-type": "text/plain"
},
"value": {
"media-type": "application/x-protostream"
}
},
"locking": {
"concurrency-level": 1000,
"acquire-timeout": 15000,
"striping": false
},
"statistics": true
}
}
应用端客户端 HOT-ROD版本,标准 Jcache lib 版本12.1.11.Final-redhat-00001
@PostConstruct
private void setUp() {
LOGGER.info("START [setUp] CACHE");
File conf = new File(System.getenv("CLIENT_HOTROD_FILE_PATH"));
URI uri = conf.toURI();
// Retrieve the system wide cache manager via org.infinispan.jcache.remote.JCachingProvider
javax.cache.CacheManager cacheManager = Caching.getCachingProvider("org.infinispan.jcache.remote.JCachingProvider")
.getCacheManager(uri, this.getClass().getClassLoader(), null);
this.cache = cacheManager.getCache(DATAGRIDKEY);
LOGGER.info("END [setUp] cache " + this.cache.getName() );
}
客户端配置是默认的。
我执行的测试是:在集群上的分布式缓存 infinispan 上大量放置数据 应用程序经常收到来自服务器的响应超时,如下所示:
[1/26/22 14:58:02:767 CET] 00001ffd HOTROD W org.infinispan.client.hotrod.impl.protocol.Codec20 checkForErrorsInResponseStatus ISPN004005: Error received from the server: org.infinispan.util.concurrent.TimeoutException: ISPN000476: Timed out waiting for responses for request 1770 from DM10RH08
有没有办法通过配置优化服务器端和客户端的性能?