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:

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Leo Kyrpychenko
Leo Kyrpychenko

Written by Leo Kyrpychenko

Building the future, team visibility advocate

No responses yet

Write a response