On Fri, Jan 23, 2015 at 6:09 PM, Oleg Kalnichevski <ol...@apache.org> wrote:
> On Mon, 2014-12-29 at 15:15 +0100, Philippe Mouawad wrote: > > Hi Oleg, > > Thanks for answers. > > Clarifications below inline. > > Regards > > > > Hi Philippe > > sorry for such a long delay in answering your message. > > > No problem, I understand you can be busy. > > > One can force SSL renegotiation by evicting all idle connections from > > > the connection pool. > > > > > Ok, that's good to know, so it means even today it would be better to > call > > this instead: > > > > httpClient.getConnectionManager().closeIdleConnections(1, > > TimeUnit.MICROSECONDS); > > > > > > Yes, it is. > Ok will do it. > > > > > > Please note that if JMeter needs to simulate several physical users > > > having a separate connection pool per distinct user may be the easiest > > > and the most representative strategy. > > > > > > > What is the object to use if it's not 1 HttpClient per user as we do > today > > ? > > > > PoolingHttpClientConnectionManager does not seem to be the one, as if > > it's shared among threads, how could we reset it only for 1 user ? > > > > You should continue using one HttpClient instance per distinct user > either with a pooling or basic connection manager. The only thing you > might want to customize is changing SSL context initialization from > eager to lazy. > > Does it means we are stuck with 1 HttpClient instance per distinct user ? Regarding eager to lazy, let me be a bit lazy :-), but as you seem to know exactly what to do could you point me to the involved classes ? I must reckon I have a lot of work on JMeter so if you can help me speedup this It would be great. Thanks in advance Regards > Hope this helps > > Oleg > > > > > > Cheers > > > > > > Oleg > > > > > > > Thanks > > > > Regards > > > > > > > > On Thu, May 15, 2014 at 10:39 AM, Oleg Kalnichevski < > ol...@apache.org> > > > > wrote: > > > > > > > > > On Wed, 2014-05-14 at 19:46 +0100, sebb wrote: > > > > > > On 14 May 2014 12:28, Oleg Kalnichevski <ol...@apache.org> > wrote: > > > > > > > > > > ... > > > > > > > > > > > >> Issue is not present in HTTPCLient 3.1 > > > > > > > > > > > > > > Philippe > > > > > > > > > > > > > > If HttpClient is used correctly, this code should only be > executed > > > only > > > > > > > once. Why does JMeter create more than one instance of > HttpClient? > > > > > > > > > > > > We currently create an instance for each instance of different > proxy > > > > > > settings and each protocol and each authority, because the > client is > > > > > > created with these settings. > > > > > > > > > > > > This is also done for each thread. > > > > > > > > > > > > IIRC, this was necessary originally. We have not rewritten the > code > > > > > > yet to use all the latest features. > > > > > > > > > > > > > > > > I see. For the time what you can do is to use a custom SSL socket > > > > > factory that lazily initializes SSL context when requested for the > > > first > > > > > time. This is exactly what HC 3.1 does. It will be somewhat slower > > > given > > > > > that one would need to mutex to synchronize access to the > > > initialization > > > > > code. > > > > > > > > > > Oleg > > > > > > > > > > > > Oleg > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > > > To unsubscribe, e-mail: > httpclient-users-unsubscr...@hc.apache.org > > > > > > For additional commands, e-mail: > httpclient-users-h...@hc.apache.org > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- Cordialement. Philippe Mouawad.