2

I want to add a load balancer infront of my nodejs websockets server. The plan is to add another node on another physical machine and have a load balancer in front. The load balancer will also be on its own physical machine.

The requirement is that several 1000s of simultaneous connections could be handled and I'm a bit worried about bouncys upper limitations.

I like the consistency of using bouncy since it is a node module, but at the same time it seems like nginx could handle more socket connections or be a bit more stable.

Anyone who has experience with bouncy or nginx as load balancer and could give me some advices?

Thanks!

Patrik Grinsvall
  • 584
  • 1
  • 4
  • 22

1 Answers1

1

nginx is pretty good for mass connections, check these answer.

https://stackoverflow.com/a/16289251/2325522

there you can see how to use Nginx as load balacer.

The only problem that you can have is the mass band-width needed to serve 1000's of simultaneous connections.

Example:

5000 clients * 0.25Mb/request (a little one)

=

1250mb (1.25Gb outgoing band-width)

Hope these solve your doubts.

Community
  • 1
  • 1
jmingov
  • 13,553
  • 2
  • 34
  • 37
  • Bandwidth is not an issue. I think nginx is a good solution but at the same time i like the idea of having the load balancer as a node module since the rest of the site uses node.js. – Patrik Grinsvall May 20 '13 at 11:39
  • 1
    hi again! look these article https://engineering.gosquared.com/optimising-nginx-node-js-and-networking-for-heavy-workloads. and these quesdtion on SO http://stackoverflow.com/questions/11079145/why-install-server-nginx-apache-with-node-js – jmingov May 20 '13 at 11:49
  • Thanks! It seems like nginx is the way to go! – Patrik Grinsvall May 20 '13 at 14:33