Max connections per IP #80

KimSchneider opened this Issue Jul 28, 2011 · 10 comments


None yet

2 participants



we want to use the node-http-proxy in combination with express.

Our setup ist the following:

Main server:

  • express listening on port 443
  • node-http-proxy listening on port 84 and forwards to 443

Proxy server

  • node-http-proxy listeing on port 443 and forwards to main server port 84 or another tomcat server


  • clients connect to proxy server
  • depending on the url, they are routed to main server or tomcat server
  • if routet to main server the connection is kept open for about 30 seconds (long-polling)

Everything works fine if our clients connect directly to the main server. If they connect over the proxy server we can have 5 request and nothing else happens until those requests are closed.

We have to be able to connect a minimum of 500 clients by long polling. Any way we can manage this?

Thanks for your help.


are you sure that this is caused by node-http-proxy?

there was recently a discussion on the mailing list about this topic:


oh sorry, it might besomething to do with this:


okay, read through the code in node-http-proxy: default connections is set to 100.

you'll want to include:


how are you generating the requests?


Thanks for your reply. I am not really sure, if it has to do with express. I already modified the http-proxy and hard coded the defaults to 10000 connections.

After some checks it realy seems to be limited to 5 connections. So, the max connections have no effect or express accepts only 5 connections, too. To be honest, I don't know how to set the max connections on express and did not find any solution, yet.

To answer your question, we have a c# client that talks to our online servers via https requests.


Found a solution, here you go: #84


hi, how are you testing this?

I have not yet seen http-proxy limiting it self to 5 concurrent connections.

here in a test I am using, it does not respond until it has 10 connections, so if some thing is limiting connections to 5 then it would timeout.

but that is not the behavior that I am seeing.

can you run the test and tell me what happens?


I testet this using an basic node webserver that counts incoming connections, but does not close them. I started a proxy that forwards every request to the webserver.

Run jMeter or any other http stresstool with more than 5 concurrent threads. In my testcases everytime I used the proxy the counter stopped at 5 and if I did not use the proxy I have been able to open as many connections as I wanted.

My fix changed it to the behaviour we need :)


oops, I forgot to link my test.

can you post your test as a gist so that I can reproduce the issue here?


That's my testcase. Open it 10 times in your browser or run a http stress tool against it.


thanks. I've reproduced your issue.

@dominictarr dominictarr added a commit that closed this issue Aug 2, 2011
@dominictarr dominictarr Merge branch 'patch-1' of…

closes #80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment