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

Do I need to worry about "max socket pooling"? #158

Closed
felixchan opened this Issue Jan 15, 2012 · 3 comments

Comments

Projects
None yet
4 participants
@felixchan

felixchan commented Jan 15, 2012

According to this : http://engineering.linkedin.com/nodejs/blazing-fast-nodejs-10-performance-tips-linkedin-mobile

" http limits you to 5 sockets per host "

Do I need to worry about this in this library? If so, is there a way to turn it off completely?

@mikeal

This comment has been minimized.

Show comment
Hide comment
@mikeal

mikeal Jan 15, 2012

Member

yes, we use node's internal http client so we have the same limitation. i'd advise against making it unlimited though, but it's possible.

require('http').globalAgent.maxSockets = Infinity
Member

mikeal commented Jan 15, 2012

yes, we use node's internal http client so we have the same limitation. i'd advise against making it unlimited though, but it's possible.

require('http').globalAgent.maxSockets = Infinity

@mikeal mikeal closed this Jan 15, 2012

@cloudgifts

This comment has been minimized.

Show comment
Hide comment
@cloudgifts

cloudgifts May 9, 2013

Is this how to set it within an app? Or do I need to modify the request module itself? Thanks.

ie. for app.js

var http = require('http');
http.globalAgent.maxSockets = 30;

var https = require('https');
https.globalAgent.maxSockets = 30;

var request = require('request');

cloudgifts commented May 9, 2013

Is this how to set it within an app? Or do I need to modify the request module itself? Thanks.

ie. for app.js

var http = require('http');
http.globalAgent.maxSockets = 30;

var https = require('https');
https.globalAgent.maxSockets = 30;

var request = require('request');

@thomblake

This comment has been minimized.

Show comment
Hide comment
@thomblake

thomblake May 29, 2014

@cloudcash Yes that is correct

thomblake commented May 29, 2014

@cloudcash Yes that is correct

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