greim / hoxy

Web-hacking proxy API for node
http://greim.github.io/hoxy/
MIT License
597 stars 102 forks source link

bad/no support for keepalive connections #10

Open zdila opened 13 years ago

zdila commented 13 years ago

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.

greim commented 13 years ago

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 commented 13 years ago

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.

zdila commented 13 years ago

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

greim commented 13 years ago

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

zdila commented 13 years ago

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

Please add version check on startup :-)

zdila commented 13 years ago

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/

greim commented 13 years ago

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 commented 13 years ago

Version check added.

greim commented 10 years ago

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.