HAProxy setup for NodeJS

Leo Kyrpychenko
1 min readJul 28, 2015

--

Want to scale Node.JS with HAProxy to 100K requests per second?

The following config is an example of HAProxy configuration that can be used to have a load balancer for your Node.JS/Java/C# Apps.

The problem that you can easily hit limit of around 65K requests per second if all you connections (for benchmarking f.e.) will be coming from the ip:port pair, which is explained by a limit between two pairs of ip:port that is called port exhaustion.

Below you can find an example of HAProxy configuration for load balancing. What out also for nbproc configuration if you see that HAProxy is getting overloaded which will increase amount of processes required (sudo service haproxy restart is required).

Useful links:

--

--

Leo Kyrpychenko
Leo Kyrpychenko

Written by Leo Kyrpychenko

Building the future, team visibility advocate

No responses yet