hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Florent Blondeau <fblond...@pingwy.com>
Subject Re: [GlassFish] Using HttpClient from within an App server
Date Tue, 18 Dec 2007 11:36:58 GMT
Thanks for your answers,

5 000 is not a real limit,  It will depends on the load tests, and  I 
don't really expect to reach that number.
As my app is distributed, I can increase the number of machines if 
resources are too much stressed.
I understand better what really is the MTHCM... I think I will have to 
make a custom WorkManager which could 
take care of the connections itself if I want to use a single instance 
of HttpClient and then get better performances...
It's a pretty hard thing to do I think, and I'm going to see that later, 
if the perfs are really a problem.
 I'm going to try the multiple instances  solution. I will keep in mind 
your wise advise about closing connections

Thanks to all

Florent

Raymond Kroeker a écrit :
> You will probably; hit a ceiling in terms of a total number of open file
> handles before you get to 5000.
>
> Raymond
>
> On Dec 17, 2007 11:35 AM, Roland Weber <ossfwot@dubioso.net> wrote:
>
>   
>> Hello Florent,
>>
>>     
>>> As I can't create threads directly in the App server, I can't use the
>>> MultiThreadedHttpConnectionManager...
>>>       
>> MTHCM is not really multithreaded, it is just thread-safe for use
>> in multithreaded applications. Unfortunately though, there is one
>> background thread for connection GC. You could copy MTHCM and
>> remove the connection GC mechanism. It's not easy though, the
>> code is rather complex.
>>
>>     
>>> Can I use as many HttpClient
>>> instances as the number of
>>> threads I have (about 5000) ?
>>>       
>> You can, if you can live with 5000 connections being open
>> at the same time. Just make _very_ sure that you close
>> the connections (SimpleHttpConnectionManager.shutdown,
>> or create with the auto-close flag) once you don't need
>> them anymore.
>>
>> hope that helps,
>>  Roland
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
>> For additional commands, e-mail: httpclient-users-help@hc.apache.org
>>
>>
>>     
>
>
>   


-- 
Pingwy
27, rue des arènes
49100 Angers


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