Answer the question
In order to leave comments, you need to log in
Scaling a NodeJS application?
There is a NodeJS application hosted on ubuntu server. I am using MongoDB as a database. I want to try to scale it by organizing several copies + load balancer. Advise some tutorials, articles, screencasts, well, in general, everything that is, or share your experience in creating a cluster for NodeJS applications.
Thank you!
Answer the question
In order to leave comments, you need to log in
Well, that's offtopic.
1) Don't use node.js as a load balancer, there is haproxy, nginx for that
2) Try github.com/nodejitsu/haibu or github.com/substack/fleet (I liked it better)
3) Don't use mongo for sessions and simple storage given key/value, there is redis for this, leveldb
In general, you need to understand what you want to scale for, for fault tolerance or for performance.
nodejs.org/api/cluster.html (within the same machine). You can add nginx (http://wiki.nginx.org/HttpUpstreamModule) as a proxy if there are multiple machines.
PS: in practice, I have not washed it down, but it should work well.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question