-
Does aerospike client provides connection pooling? Can application set pooling params?
-
We have observed lot of new connections open and close based on read/write load. Does aerospike optimize by reusing existing free connection or it creates new connection for every read/write query?
Can anyone throw some light on this?
Yes, some of the clients use connection pools and there are parameters for them.
Yes, the clients try to reuse sockets.
Which client are you using?
We are using nodejs client and are planning to use java client as well in some upcoming projects. In our current prod with nodejs client, we see lots of sockets being opened/closed and the number grows multifold as the traffic increase. We were hoping for sockets being reused in our prod but it’s not noticeable.
Take a look at the Node.js client’s documentation regarding managing connections in a Node cluster. I suggest you open up an issue with the aerospike/aerospike-client-nodejs
repo on Github if you’re running into problems with it.
The Node.js client does use connection pooling. It maintains a separate connection pool for every node in the cluster. The maxConnsPerNode
configuration parameter controls the max. size of the connection pool.
The client also maintains separate (per-node) connection pools for certain operations like queries, scans, legacy batch direct operations (batchGet/batchExists/batchSelect commands) and info commands.