ConnectionGroup Class
Represents a group of HTTP connections that share the same connection group identifier.
In HTTP/1.1, connections can be reused to improve performance. The ConnectionGroup class is used internally by the .NET Framework to manage these shared connections, ensuring that requests intended for the same logical connection are directed to the appropriate underlying socket.
Remarks
The ConnectionGroup is primarily an internal mechanism for the HttpClient and related classes. You typically do not interact with ConnectionGroup directly in your application code. Its purpose is to abstract the complexities of connection pooling and management for efficiency.
When an HttpClient makes a request, it may associate that request with a connection group. If subsequent requests are made to the same host and port, and they are also associated with the same connection group, the HttpClient will attempt to reuse an existing connection from that group rather than establishing a new one. This is crucial for reducing latency and the overhead associated with establishing new TCP connections and performing TLS handshakes.
The connection group identifier is often derived from the URI of the request, ensuring that connections to different hosts or different endpoints on the same host are kept separate.
Namespace
Assembly
System.Net.Http.dll