Summary
The Http / 2 protocol provides the ability to multiplex multiple requests over a single connection. This allows you to use connections more efficiently - see https://http2.imtqy.com/faq/#why-is-http2-multiplexed
I expect that I can use .Net Core HttpClient for this. My test (based on below) however indicates that there is a ratio of requests to TCP connections: 1: 1.
Is multiplexing supported in .Net Core HttpClient? And if so, how is this achieved?
While we work
I have an example application (here you can find repo here with the following code;
using (var httpClient = new HttpClient())
{
var request1 = new HttpRequestMessage(HttpMethod.Get, "https://www.google.com");
request1.Version = new Version(2, 0);
var request2 = new HttpRequestMessage(HttpMethod.Get, "https://www.google.com");
request2.Version = new Version(2, 0);
var task1 = httpClient.SendAsync(request1);
var task2 = httpClient.SendAsync(request2);
Task.WaitAll(task1, task2);
var response1 = task1.Result;
var response2 = task2.Result;
Console.WriteLine($"Response 1 - Http Version: {response1.Version}, Http Status Code: {response1.StatusCode}");
Console.WriteLine($"Response 2 - Http Version: {response2.Version}, Http Status Code: {response2.StatusCode}");
}
This code gives the following results (so I know that Http / 2 is used);
Response 1 - Http Version: 2.0, Http Status Code: OK
Response 2 - Http Version: 2.0, Http Status Code: OK
Wireshark , 2 - TLS;

HttpClient , (1 , 1 ..).