Venu Kemthur created HTTPCLIENT-2007:
----------------------------------------

             Summary: Performance Issue with Pooled Connection Manager + Custom 
socket factory 
                 Key: HTTPCLIENT-2007
                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2007
             Project: HttpComponents HttpClient
          Issue Type: Bug
          Components: HttpClient (classic)
    Affects Versions: 4.5.9
            Reporter: Venu Kemthur


We are using HttpClient 4.5.9 to connect to a service which expects Client Cert 
(MTLS)

Since we are using PoolingHttpClientConnectionManager, had to use the following 
mechanism to create and set a LayeredConnectionSocketFactory when instantiating 
PoolingHttpClientConnectionManager
{code:java}
ConnectionSocketFactory plainsf = <...>
LayeredConnectionSocketFactory sslsf = <...>
Registry<ConnectionSocketFactory> r = 
RegistryBuilder.<ConnectionSocketFactory>create()
        .register("http", plainsf)
        .register("https", sslsf)
        .build();

HttpClientConnectionManager cm = new PoolingHttpClientConnectionManager(r);
HttpClients.custom()
        .setConnectionManager(cm)
        .build();{code}
Tested this service with K6 load testing tool and see latency in seconds. Seems 
like it keeps growing from milliseconds (20ms) all the way to 8 seconds.

K6 in a minute could only do 45 QPS with this latency.

Same code when replaced with JDK 11 HttpClient could do 600 QPS!

We are using this client in other scenarios (non-MTLS) and we have no issues in 
that path.

Is there a known issue with *Pooling Connection Manager* 
+*SSLConnectionSocketFactory*



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to