Q:

.NET HttpClient doesn't reuse tcp connections for parallel requests

I have the following nodejs server. It serves only json on HTTP and records whenever a new tcp connection is established:
var http = require('http');

var response = [{"name":"Alice"},{"name":"Bob"}];
var count=0;
http.createServer(function (req, res) {
  res.writeHead(200, {'Content-Type': 'text/json'});
  res.end(JSON.stringify(response));
}).on('connection', function(socket) {
  console.log('new TCP stream is established ' + count)
  count++;
  socket.setTimeout(5000);
}).listen(5000);

I query this server with the following C# program that starts 10 http requests and doesn't wait for their response
//to check connection reuse across processes
Console.WriteLine("ProcessID " + Process.GetCurrentProcess().Id);

HttpClient client = new HttpClient();
client.BaseAddress = new Uri("http://mypc.domain.com:5000");

for (int i = 0; i < 10; i++)
{
    var result = client.GetAsync("/"); // or client.GetAsync("/").Result
    Console.Writeline("requested " + i);
}

When I run it I see the following output:
new TCP stream is established 0
.
.
new TCP stream is established 9
It created 10 tcp connections.
Now when I run the C# program in quick succession (under the 5 second timeout set on the server). I don't see any new TCP connections being created. The 10 new requests reuse the TCP connections from the previous run.
Is there a way to have HttpClient only create and reuse one TCP connection for parallel requests?
Is it possible to make parallel requests over the same TCP connection at all?

A:

Since you're starting requests extremely quickly they all require a new connection. There should not be any reuse (not guaranteed but likely).

Now when I run the C# program in quick succession

There is no connection reuse across processes. There is no reuse here. However you thought you found that to be true - it's not. I'm not familiar with node.

Is there a way to have HttpClient only create and reuse one TCP connection for parallel requests?

TCP connections can only run multiple HTTP requests in parallel through pipelining which is not a sure way to optimize. I think you can turn on HTTP pipelining with .NET.

Is it possible to make parallel requests over the same TCP connection at all?

Yes, by pipelining.
I don't think pipelining should necessarily be your goal since it also serializes responses.
You probably should rely on HTTP keep alive which, I think, is on by default. There is no harm in 10 TCP connections existing. If you change your program a bit you will see 100% reuse:
for (int i = 0; i < 10; i++)
{
    var result = client.GetAsync("/").Result; //Wait here
    Console.Writeline("requested " + i);
}

Or:
while (true) {
    for (int i = 0; i < 10; i++)
    {
        var result = client.GetAsync("/"); //NO waiting here
        Console.Writeline("requested " + i);
    }
    Thread.Sleep(1000); //wait/hope for requests to finish
}

