L
L
likejavascript2013-03-11 23:12:38
Programming
likejavascript, 2013-03-11 23:12:38

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

4 answer(s)
T
Tenkoff, 2013-04-27
@Tenkoff

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.

B
bohdan-shulha, 2013-03-11
@bohdan-shulha

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.

V
Vlad911, 2013-03-11
@Vlad911

did you measure performance? where is the bottleneck?

Y
Yuri Shikanov, 2013-03-12
@dizballanze

I recently wrote a post on this topic .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question