-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
keepalive requests are slow #478
Comments
and some failing (probably due to the same issue) |
i'm not sure if it's related to setting maxSock (so that the global agent can create more connections) |
yeah it's a problem related to connection pooling.. if i disable the agent completely i get 530 req/sec which is definitely more acceptable.. i'll have to look into the way agents are setup'd.. maybe there's a bug there.. thanks for reporting! |
i've pushed a fix that removes the connection pool .. i'm using with the default agent it's real slow
after the patch (please note that v8's JIT still has to warm up, subsequent requests perform around 800+ req/sec)
ab performs very strangely.. it measures 500 req/sec one time, when i run it again it hangs (at random).. i checked and the connection isn't even received by the node server (if you have any clue about this, please do share :D ) |
I think you should first test with -t1 and -c1 which is single connection and one thread ... in which wrk is strangely terribly slow. No idea why ... I think ab2 shows good numbers with single thread single connection testing. Furthermore wrk does not show if it got valid responses ... |
As a proof that ab2 is not in the wrong, please try the following: |
mm it doesn't look slow to me.. what is weird is that
|
Well, as I pointed out it does not hang if it connects directly to the http server. With wrk (-r option does not work for me) and latest commit "[fix] pooled connections" afc4d09 I get only about 25req/s - I have triple checked that I have the right source and I see your latest commit ...
Compared to connecting directly to the http server:
Maybe the pooling is still on? |
I wonder if this is connected: nodejs/node-v0.x-archive#4769 - It says closed only 2 months ago, so perhaps 0.10 still has problems with keep-alive. |
i'm gonna look into that.. but i tested with both siege
and weighttp
|
I have just tried with node 0.11, I installed it with Node Version Manager. The behaviour is different in |
Also, in wrk headers there is no keep-alive. |
i'm making progress.. slowly.. it seems to be a bug related to how CLRF is sent (something that should be node's responsability).. more likely is ab being nasty http://stackoverflow.com/questions/4345602/problem-with-apachebench-ab-and-transfer-encoding-chunked it thinks the content length is a header apparently
|
Either ab is nasty or simply more strict to the HTTP standard. I on the other hand forced the |
no, because when you query a node.js server with |
both |
A workaround - just to get it working - would be to always set: |
i can't do that.. i would kill every keep-alive connection ever.. just use thanks for reporting this tho :) |
I see, so simply not worth fixing the use case solely for ab. |
i'm willing to implement that if you can find a way to send http/1.0 requests via http.request() .. if i do that manually (removing transfer-encoding chunked and setting content-length.. and i tried).. it's a huge performance hit |
see #477 (comment)
The text was updated successfully, but these errors were encountered: