Open
Description
Customers behind certain firewalls or load balancers, such as Azure's SNAT, have a limit on the number of connections they can make per ip/port endpoint.
HttpClient
has a MaxConnectionsPerServer
setting, but the limit is not actually applied per-server, but rather per-pool, with each pool being partitioned by a number of connection properties:
- Kind, describing the type of connection (HTTP, HTTPS, Proxied HTTPS, etc.)
- Host, the hostname in the request URI.
- Port, the port in the request URI.
- SslHostName, the SNI value associated with the connection (might be hostname from URI, might be Host header)
- ProxyUri, the proxy that is being used to transport the connection.
- Identity, the user the connection was authenticated over.
It is unreasonable to apply a meaningful SNAT limit on top of HttpClient
because the client will pool connections and does not expose connection lifetime events to the user.