Does NuGet respect ServicePointManager.DefaultConnectionLimit for per-host HTTP connection limits?
0 reputation · 10 Dec 2025, 14:32 UTC
Goal
Determine whether NuGet’s HTTP client honors the global ServicePointManager.DefaultConnectionLimit setting when establishing connections to package sources, or whether it relies exclusively on its own internal defaults.
Constraints and uncertainty
The maxConcurrentDownloads setting in NuGet.Config limits overall parallel downloads but does not expose per-host connection limits. NuGet’s shared HttpClient defaults to two connections per host unless overridden. Documentation does not clarify whether the client reads ServicePointManager.DefaultConnectionLimit set by the hosting application, leaving a gap in predictable configuration. Changing that global property affects all libraries in the AppDomain, so confirming NuGet’s behavior is necessary before applying a workaround.
Questions
- Does NuGet’s download pipeline observe
ServicePointManager.DefaultConnectionLimitat runtime? - If not, is there a supported mechanism to configure per-host connection limits without a custom
HttpMessageHandler?