hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Fulghum <ryan.fulgh...@gmail.com>
Subject Re: HTTPClient 4.3.6 : SSL Session reuse
Date Wed, 15 Apr 2015 17:38:24 GMT
> Are you using mutual SSL authentication by any chance?

I don't think so. This is an Android client relying on root certificates
stored in cacert.bks file on the Android file system, to identify the
server. Server is using certificate issued by a CA. We do not pass any
client certificate explicitly.

> What's the benefit of performing this in parallell?
Better throughput.

Following is how we are configuring the Connection Manager:

SSLContext sslContext = new SSLContextBuilder().build();

httpClientbuilder.setSslcontext(sslContext);


SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(

   sslContext, SSLConnectionSocketFactory.
BROWSER_COMPATIBLE_HOSTNAME_VERIFIER);


  // Register HTTP and HTTPS

Registry<ConnectionSocketFactory> socketFactoryRegistry = RegistryBuilder

   .<ConnectionSocketFactory> create()

   .register("https", sslsf)

   .register("http",  PlainConnectionSocketFactory.getSocketFactory())

   .build();


  // initialize Pooling Connection Manager

PoolingHttpClientConnectionManager cm = new
PoolingHttpClientConnectionManager(socketFactoryRegistry);





On Wed, Apr 15, 2015 at 12:43 PM, Stefan Magnus Landrø <
stefan.landro@gmail.com> wrote:

> What's the benefit of performing this in parallell?
>
> 2015-04-15 17:22 GMT+02:00 Oleg Kalnichevski <olegk@apache.org>:
>
> > On Wed, 2015-04-15 at 10:30 -0400, Ryan Fulghum wrote:
> > > Apologies for not being clear.
> > >
> > > For multipart upload, we break the files into chunks of 10 MB and
> upload
> > > each part through a separate http request. It is not done over one
> > > connection. This is to support resumable upload.
> > >
> > > So, if we are to upload a file of size 100 MB we will have (start
> upload
> > +
> > > 10 part upload + end upload request)so a total of 12 connections.
> > >
> > > We are looking to reuse same SSL context for these 12 requests.
> > >
> >
> > Are you using mutual SSL authentication by any chance?
> >
> > Oleg
> >
> > > Thank you.
> > > On Apr 15, 2015 10:12 AM, "Stefan Magnus Landrø" <
> > stefan.landro@gmail.com>
> > > wrote:
> > >
> > > > 2015-04-15 15:40 GMT+02:00 Ryan Fulghum <ryan.fulghum5@gmail.com>:
> > > >
> > > > > We are using HTTPClient 4.3.6 to conduct Multipart File uploads
> over
> > > > HTTPs.
> > > > > As the file size grows bigger the upload operation becomes chatty.
> > > >
> > > >
> > > > Chatty? What exactly do you mean?
> > > >
> > > >
> > > > > Lot of
> > > > > connections (contextually related) are established in short span
of
> > time.
> > > > >
> > > >
> > > > How come?
> > > > What's the max nb connections in your client?
> > > >
> > > > >
> > > > > In a bid to reduce the time taken for SSL handshake for these
> > request we
> > > > > want to enable SSL session reuse.
> > > > >
> > > > > 1. How to do this? Is this something that is enabled by default?
> > > > > 2. How to verify that SSL sessions are indeed being reused and
> > handshakes
> > > > > are abbreviated?
> > > > > 3. What are the beat practices around SSL session reuse?
> > > > >
> > > > > Please advise or point to relevant documentation.
> > > > >
> > > > > Thank you.
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > BEKK Open
> > > > http://open.bekk.no
> > > >
> > > > TesTcl - a unit test framework for iRules
> > > > http://testcl.com
> > > >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> > For additional commands, e-mail: httpclient-users-help@hc.apache.org
> >
> >
>
>
> --
> BEKK Open
> http://open.bekk.no
>
> TesTcl - a unit test framework for iRules
> http://testcl.com
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message