Clustering Node.js on Bluemix -


will node.js app on bluemix automatically scaled run on multiple processors, or need implement myself using node's clustering api? , if use clustering, there more 1 cpu available?

short answer: need use node cluster module take full advantage of cores in each instance. or, can increase number of instances.

long answer: each instance of application push bluemix runs in warden container. resource control managed linux cgroups. number of cores per instance not can control. running quick test on bluemix, os.cpus() showed 4 cores. if want take advantage of 4 cores, in 1 bluemix instance (warden container) of node.js application, should use nodes cluster module.

keep in mind, can increase number of instances (horizontal scaling), achieve near linear results depending on bottleneck on use of external services. if have 3 instances, each of instances has 4 cores, , built-in load balancer distributes traffic among 3 instances.


Comments

Popular posts from this blog

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - UML - How would you draw a try catch in a sequence diagram? -

c++ - No viable overloaded operator for references a map -