Aerospike nodejs client count connection

can someone help with a question? When i use comand: netstat -antu | grep :3000 | grep -v LISTEN | awk ‘{print $5}’ | cut -d: -f1 | sort | uniq -c always i see maximum 5 conenction per one nodejs worker. For example if i use 2 workers i see 10 connection, if 4 - 20. Nodejs client can use only 5 open connections to aerospike? Whe i use C# i have many more connections.

@Dmitry_S, the max. number of connections depends on the number of libuv worker threads you use. The default thread pool size is 4. You can increase the limit by setting the UV_THREADPOOL_SIZE environment variable, e.g.

$ cd benchmarks
$ UV_THREADPOOL_SIZE=8 node main
info: host: 192.168.33.10 port:3000, namespace: test, set: demo, worker processes: 1, keys: 100000, read: 50%, write: 50%
info: Mon Feb 15 2016 11:33:45 GMT+0800 (SGT) read(tps=4629 timeouts=0 errors=0) write(tps=4628 timeouts=0 errors=0)
...

$ netstat -p tcp -a -n | grep -e .3000 -e .3100 | grep -v LISTEN | awk '{print $5}' |  sort | uniq -c
9 192.168.33.10.3000
9 192.168.33.10.3100

(Note, I have configured the benchmark to run with a single worker process.)

The one additional connection per node is for the cluster tend process which runs in it’s own, separate thread.

thanks for you response! Now i try to use process.env.UV_THREADPOOL_SIZE=64; in nodejs code and it’s worked.