Skip to content
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

Relevance in later versions of NODE #62

Closed
tony-gutierrez opened this issue May 2, 2018 · 3 comments
Closed

Relevance in later versions of NODE #62

tony-gutierrez opened this issue May 2, 2018 · 3 comments

Comments

@tony-gutierrez
Copy link
Contributor

I noticed that the benchmark script in this library really just compares keep-alive to non-keepalive.

Has any benchmarking been done against the normal http.Agent or https.Agent using keepalive and the same maxSockets?

Are there any performance benefits to using this library?

@tony-gutierrez
Copy link
Contributor Author

So, found an answer to my own question. Node doesn't do socket timeouts in many versions. I use 8.9.4 and it doesn't do it there (No timeout option: https://nodejs.org/docs/latest-v8.x/api/http.html#http_new_agent_options). Version 10 does seem to have a timeout option that it passes into the socket, but apparently this does not close the socket (https://nodejs.org/api/net.html#net_socket_settimeout_timeout_callback).

So using this library will indeed add that functionality to certain versions of Node.

@fengmk2
Copy link
Member

fengmk2 commented Jul 20, 2018

agentkeepalive using the same code base as http.Agent.
You can find the different between these two agents: What's different from original http.Agent?

@killagu
Copy link
Member

killagu commented Jul 20, 2018

Node 8.9.4 have time option in agent constructor but no documented.

If the socket is timeout, will emit timeout event.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants