I need to increase the number of outbound http sockets usable by a module I am writing. I know it is possible to do this globally using:
//
Given that the setting determines how many concurrent connections are available per host, there is no way to set this specifically for individual modules. What you should do however is make sure that you're not reducing the number of concurrent connections from what the user has already specified. For example, if someone sets their maxSockets to 5000, and you set it to 1000 in your module, bad things could happen. I would recommend something like the following
var max = 1000;
if(http.globalAgent.maxSockets < max) {
http.globalAgent.maxSockets = max;
}