-
Notifications
You must be signed in to change notification settings - Fork 0
client.setMaxSockets()
Helper for setting the maximum number of concurrent outgoing HTTPS connections. The library expects and integer value. Otherwise it defaults to 5 which is the internal value of node.js itself. This works by setting the undocumented property: https.Agent.defaultMaxSockets. This change affects all the HTTP / HTTPS clients built on top of the core http.js / https.js libraries. In other words, if you call this helper for an aws2js client, it has side effects for other libraries using the core HTTP support.
Since the core modules themselves handle the concurrency, messing with the HTTP Agent per client instance brings little benefit, but it complicates the actual code that manages this feature. Therefore, using https.Agent.defaultMaxSockets is the preferred for achieving this goal of increasing the max concurrency.