Few things to take for consideration before deciding on the numbers, those are CPU, Database size, number of concurrent requests. Say we have configured our application to serve 100 concurrent requests coming per second, in which 0.25% are spent on database querying which is 15 seconds are spent on database. In this case the we need to set the number of db connections to 25. which would be the optimum in most cases. But it also depends on the query size, network .
For a Nodejs Application, say we are using four cpu's and we have used cluster to spawn child process. Each process will run a node thread.
Less is good. Keep the connections minimum to better performance
For a Nodejs Application, say we are using four cpu's and we have used cluster to spawn child process. Each process will run a node thread.
Less is good. Keep the connections minimum to better performance
(core_count * 2) + spindle_count
spindle_count is disk spindle time to fetch the data.