Clustering - Guidance

19 views
Skip to first unread message

defunct...@gmail.com

unread,
May 21, 2015, 12:21:49 PM5/21/15
to action...@googlegroups.com
Good morning,

I am new to actionhero and am looking for some guidance on clustering, I am wondering what the optimal settings would be for a load balanced sever with each serve consisting of 24 cores and 65GB of ram.

Each server will also be running nginx in front.

Thanks

Evan Tahler

unread,
May 21, 2015, 2:06:02 PM5/21/15
to action...@googlegroups.com, defunct...@gmail.com, defunct...@gmail.com
The general rule of thumb with node is that as long as you have the RAM for it, you want to use all the CPUs you can.  Since node is single-threaded (and actionhero doesn't fork), the math is easy!  

If you leave 4 cores for NGINX ( I think that's the default config), 1 core for the cluster-master, and 1 core for "OS stuff", you can have 18 workers.   It's usually the case that you'll run out or RAM before CPUs, but that's the lame-duck answer.   Make sure you don't start using SWAP space!   You can profile your app and get an idea how much a single running process consumes, and do the math.  

The reason to leave a core for the cluster-master, even though it isn't doing much work, is to leave CPU time around for dealing with all the connections and inter-process communication. 

defunct...@gmail.com

unread,
May 21, 2015, 2:35:28 PM5/21/15
to action...@googlegroups.com, defunct...@gmail.com
Evan,

That sounds to be about what I was thinking I just wanted to clarify, Thank you for the response.
Reply all
Reply to author
Forward
0 new messages