You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by aealexsandrov <ae...@gmail.com> on 2018/04/20 14:59:02 UTC

Re: connection pool in ignite

Hi,

From:

https://ignite.apache.org/releases/latest/javadoc/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.html

This SPI caches connections to remote nodes so it does not have to reconnect
every time a message is sent. By default, idle connections are kept active
for DFLT_IDLE_CONN_TIMEOUT period and then are closed. Use
setIdleConnectionTimeout(long) configuration parameter to configure your own
idle connection timeout.

By default, one connection will be active for every remote node at the same
time.

In case if you expected that client will communicate with server heavily
then you can use next options:

setUsePairedConnections(true) - maintain connection for outgoing and
incoming messages separately. By default, will create one connection for
outgoing and one connection for incoming messages;

setConnectionsPerNode - Sets number of connections to each remote node. In
this case new connection could be created on demand. But total count will
not be greater than this option.

Andrei



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/