Return-Path: Delivered-To: apmail-jakarta-commons-httpclient-dev-archive@www.apache.org Received: (qmail 61788 invoked from network); 22 Mar 2004 06:59:35 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 22 Mar 2004 06:59:35 -0000 Received: (qmail 64262 invoked by uid 500); 22 Mar 2004 06:59:12 -0000 Delivered-To: apmail-jakarta-commons-httpclient-dev-archive@jakarta.apache.org Received: (qmail 64246 invoked by uid 500); 22 Mar 2004 06:59:12 -0000 Mailing-List: contact commons-httpclient-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Commons HttpClient Project" Reply-To: "Commons HttpClient Project" Delivered-To: mailing list commons-httpclient-dev@jakarta.apache.org Received: (qmail 64230 invoked from network); 22 Mar 2004 06:59:11 -0000 Received: from unknown (HELO mtagate1.de.ibm.com) (195.212.29.150) by daedalus.apache.org with SMTP; 22 Mar 2004 06:59:11 -0000 Received: from d12relay02.megacenter.de.ibm.com (d12relay02.megacenter.de.ibm.com [9.149.165.196]) by mtagate1.de.ibm.com (8.12.10/8.12.10) with ESMTP id i2M6xJVC126636 for ; Mon, 22 Mar 2004 06:59:19 GMT Received: from d12ml067.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12relay02.megacenter.de.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i2M6xEId282214 for ; Mon, 22 Mar 2004 07:59:20 +0100 In-Reply-To: <405B5404.4000006@expedia.com> To: "Commons HttpClient Project" MIME-Version: 1.0 Subject: Re: Multithreaded Connection manager question and 400+ servers X-Mailer: Lotus Notes Release 6.0 September 26, 2002 From: Roland Weber X-MIMETrack: S/MIME Sign by Notes Client on Roland Weber/Germany/IBM(Release 6.0|September 26, 2002) at 22.03.2004 07:55:48, Serialize by Notes Client on Roland Weber/Germany/IBM(Release 6.0|September 26, 2002) at 22.03.2004 07:55:48, Serialize complete at 22.03.2004 07:55:48, S/MIME Sign failed at 22.03.2004 07:55:48: The cryptographic key was not found, Serialize by Router on D12ML067/12/M/IBM(Release 6.0.2CF2|July 23, 2003) at 22/03/2004 07:59:18, Serialize complete at 22/03/2004 07:59:18 Message-ID: Date: Mon, 22 Mar 2004 07:59:04 +0100 Content-Type: multipart/alternative; boundary="=_alternative 002611B0C1256E5F_=" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N --=_alternative 002611B0C1256E5F_= Content-Type: text/plain; charset="US-ASCII" Hello Andre, you should try to get some real-life data to decide on connection management. Like a trace on how many connections are made to which hosts in what frequency. Then you can verify whether the frequently used hosts support connection keep-alive or not. I agree with Michael's assessment that a single connection per thread is the best way to go in this situation, unless you are sure there is some gain in connection reuse. By implementing a custom connection manager, you have full control over how long connections are kept alive, so you can manage that risk. Servers that cannot handle more than one request per connection are supposed to send "connection: close" headers back, and/or use HTTP 1.0. Connections will only be reused for servers that clearly indicate by the HTTP protocol version and connection headers that they are capable of handling another request. cheers, Roland Andre John Mas 19.03.2004 21:11 Please respond to "Commons HttpClient Project" To: "'Commons HttpClient Project'" cc: Subject: Multithreaded Connection manager question and 400+ servers Hi, At the company I work for we are developing a middleware application that routes SOAP messages from one party too another, using HTTP. I have suggested that we use the MultithreadedConnectionManager, though at the moment there is some reluctence. The issue seems to be because we are potentially connecting to 400+ different servers. The danger of keeping a connection open could mean that there are no connections left to connect to another server to send the messages. There are also worries that some of the parties we connect to have basic HTTP implementations (there are a lot of homebrew solutions in C/C++) and therefore don't handle more than one query/answer on the same connection. I should mention that at the moment we create a new HTTPClient for every connection and the client is not reused across any threads. Because of the shear volume of traffic we are likely to be handling I am wanting to find ways of optimizing the use of every API we use, while not breaking anything. Has anyone used HTTPClient in this sort of situation? What is the best way to go about using HTTPClient for this? Is there anything else I should know? regards Andre --------------------------------------------------------------------- To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org --=_alternative 002611B0C1256E5F_=--