Skip to content

Commit

Permalink
set min idle 4, max connections between nodes to 64, and fix deprecat…
Browse files Browse the repository at this point in the history
…ion warning
  • Loading branch information
mdavis95 committed Nov 12, 2022
1 parent 62cde51 commit 818103f
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import io.zulia.server.connection.client.handler.InternalStoreHandler;
import org.apache.commons.pool2.impl.GenericObjectPool;

import java.time.Duration;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Level;
import java.util.logging.Logger;
Expand Down Expand Up @@ -79,9 +80,9 @@ public void addNode(Node node) {

GenericObjectPool<InternalRpcConnection> pool = new GenericObjectPool<>(
new InternalRpcConnectionFactory(node.getServerAddress(), node.getServicePort()));
pool.setMinIdle(1);
pool.setMaxTotal(8);
pool.setMinEvictableIdleTimeMillis(1000L * 60L * 5L);
pool.setMinIdle(4);
pool.setMaxTotal(64);
pool.setMinEvictableIdle(Duration.ofMinutes(5));

internalConnectionPoolMap.putIfAbsent(nodeKey, pool);
}
Expand Down

0 comments on commit 818103f

Please sign in to comment.