hoxy icon indicating copy to clipboard operation
hoxy copied to clipboard

bad/no support for keepalive connections

Open zdila opened this issue 14 years ago • 9 comments
trafficstars

Testing with ab -n 100 -c 1 -k -X localhost:8080 http://localhost/ is more than 10x slower than without -k argument. Also report shows errors.

zdila avatar May 16 '11 16:05 zdila

Thanks for finding this. It might be a couple of issues. Upgrading the code to use http.request() (which reuses client objects) speeds things up considerably. But it still reports failed requests. Continuing investigating...

greim avatar May 16 '11 20:05 greim

And for me at least it was throwing "too many listeners" errors, since it was adding listeners to the same socket each time when connection was reused in keepalive mode. This aspect should hopefully be easy to fix.

greim avatar May 16 '11 21:05 greim

Hi greim. After last update the hoxy doesn't work at all and the browser timeouts.

zdila avatar May 18 '11 08:05 zdila

Which version of node are you on? The fix for the performance issues has dependencies on the client connection pooling in 0.4.x.

greim avatar May 18 '11 17:05 greim

Default Ubuntu Natty: martin@bono:~$ node -v v0.2.6

Please add version check on startup :-)

zdila avatar May 18 '11 18:05 zdila

with v0.4.7 it works but ab shows may failed connections (if used with -k):

ab -n 100 -c 1 -k -X localhost:8080 http://localhost/

  • in this case 50 are failed. With -v 2 argument you can see mixed headers and message. BTW my tested page is standard Apache "It works!" page.

zdila avatar May 18 '11 19:05 zdila

Thanks. Incidentally I'm also doing my tests on an Apache "It works!" page. The failed requests are some weird low-level stream issue that I'm still trying to understand. Will reply here if/when I find a fix.

greim avatar May 19 '11 05:05 greim

Version check added.

greim avatar May 19 '11 21:05 greim

I realize this is old, but can anyone comment if this is still an issue? v0.x branch is still around if fixes are badly needed.

greim avatar Feb 13 '14 16:02 greim