Multiple node.js client instances


#1

Hi

This question is a question for the node.js folks and the java folks.

The java documentation says

[…] Each AerospikeClient/AsyncClient instance spawns a maintenance thread that periodically makes info requests to all server nodes for partition maps. Multiple client instances would create additional load on the server. Therefore, use only one client instance per cluster in a program and share that instance among multiple threads. AerospikeClient and AsyncClient are thread-safe […]

Is it something that we should be concerned about also for the node.js client? Since node.js is not multithreaded we have many many clients connecting to aerospike using the aerospike node.js client.

Thank you for your help


#2

Hi Mlabour,

If you are creating many client instances, each one of them will be spawning their own maintenance threads. Because nodejs is built on top of aerospike c client and C client spawns those threads for every instance. Would you give us more details about how many client instances you are creating, and what is the throughput/load for each of those instance?


#3

Hi gayathri Thank you for your response. We have between 3000 and 6000 node.js process. Each of them has an instance of the aerospike node.js client. Do yo think that is an issue? Thank you


#4

Hi mlabour,

Are you running all the 3000-6000 processes in a single machine. Each process can open upto 300 connections depending on the load in each process. If the load per process is relatively high, the process opens upto 300 connections. And if all the processes are running in a single machine, then the total number of connections will be number of process * connection per process (maximum of 300).

Thanks


#5

Hey gayathri, Thank you for your answer. I am running 30 processes per machine. Each machine has 32 cores. There are 100 machines.


#6

Hi mlabour,

Then there can only be 9000 maximum connections opened per machine.