0 votes
ago by (120 points)

Hello,

We are using the Rebex.Net library on Windows Server 2008 R2 SP1 to support TLS 1.2/1.3 communication.

We did not experience any issues with Rebex.Net 7.0.8943, but after upgrading to version 8.0.9797, we started seeing significant performance problems when making requests in parallel.

A simplified example of our code is shown below:

Parallel.For(1, 10, i =>
{
    var creator = new HttpRequestCreator();

    creator.Settings.SslAcceptAllCertificates = true;
    creator.Settings.SslAllowedVersions = TlsVersion.TLS12;
    creator.Settings.SslAllowedSuites =
        TlsCipherSuite.ECDHE_RSA_WITH_AES_128_GCM_SHA256 |
        TlsCipherSuite.ECDHE_RSA_WITH_AES_256_GCM_SHA384;

    creator.Settings.UseLargeBuffers = true;
    creator.Proxy = null;
    creator.Register();

    HttpRequest request = creator.Create(url);

    request.Method = "POST";

    byte[] buffer = Encoding.UTF8.GetBytes(data);
    request.ContentLength = buffer.Length;

    using (Stream stream = request.GetRequestStream())
    {
        stream.Write(buffer, 0, buffer.Length);
    }

    var response = (HttpResponse)request.GetResponse();
});

With Rebex.Net 8.0.9797, both GetRequestStream() and GetResponse() take a very long time to complete.
In addition, although we are executing requests in parallel, it appears that only two requests are processed simultaneously, while the remaining requests wait in a queue.

We spent considerable time investigating the issue and tried various approaches, but were unable to resolve it.
As a test, we downgraded to Rebex.Net 7.0.9796, and the performance issue immediately disappeared.
Parallel requests worked as expected again.

Because the problem only occurs with the 8.x version, we suspect there may have been a change in the networking, connection management, TLS handling, or threading behavior between versions 7 and 8.

Are there any known changes in Rebex.Net 8 that could explain this behavior?

Also, is there anything we might be missing in our implementation or configuration?
Any guidance or recommendations would be greatly appreciated.

Thank you for your help.

Applies to: Rebex TLS, Rebex HTTPS

Please log in or register to answer this question.

...