Return-Path: X-Original-To: apmail-hc-httpclient-users-archive@www.apache.org Delivered-To: apmail-hc-httpclient-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 536CF17AF9 for ; Mon, 13 Oct 2014 09:59:36 +0000 (UTC) Received: (qmail 3875 invoked by uid 500); 13 Oct 2014 09:59:35 -0000 Delivered-To: apmail-hc-httpclient-users-archive@hc.apache.org Received: (qmail 3838 invoked by uid 500); 13 Oct 2014 09:59:35 -0000 Mailing-List: contact httpclient-users-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpClient User Discussion" Delivered-To: mailing list httpclient-users@hc.apache.org Received: (qmail 3824 invoked by uid 99); 13 Oct 2014 09:59:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Oct 2014 09:59:35 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.85.217.179] (HELO mail-lb0-f179.google.com) (209.85.217.179) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Oct 2014 09:59:09 +0000 Received: by mail-lb0-f179.google.com with SMTP id l4so6098188lbv.38 for ; Mon, 13 Oct 2014 02:59:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=jShLGKBUwnlAKO7/mq/lNEsSV1eeejmjKzbrlCbZ/4g=; b=jgqPCGNF9USylwCRCgJs4+ALTGW1o2BIE72iEcoOwZa3ueexpiXlcw/waXgUN2shaw OUrZCMwU0QHh/f6jaFVuuCYo0UwACMAU2ykprHgLixkrjb8XGICn22F6cadrBQFUpf4A HCKj4u4OX9oTp9EtdQy6zoqNc4bYqtO+3G9QFiJK1UzXlQ0uF4aGKwtjQbzA3GuZ6blP 5X4wvCDsW5EAMevaoqnMupHSRnOLmFFP7JBLaA0ke3P+NyQBMmn0ESHWUC7SaZ/f+Qfy awY+ypDuwUDVVHf7LI4Wk6r6mcBreLKF0l37ASmctm5ZC0YUKuYgA5BUR/Bq1RmKrgJo rCmQ== X-Gm-Message-State: ALoCoQlREnGe0PSqOf6pHL5/H0ebIiefSGxZ5K09aj3meRmDo/xs228Imd1wUYskRDjY5HHcEfYP MIME-Version: 1.0 X-Received: by 10.152.19.195 with SMTP id h3mr22864524lae.71.1413194347880; Mon, 13 Oct 2014 02:59:07 -0700 (PDT) Received: by 10.114.201.129 with HTTP; Mon, 13 Oct 2014 02:59:07 -0700 (PDT) Date: Mon, 13 Oct 2014 11:59:07 +0200 Message-ID: Subject: Using HTTPClient for mulithreaded HTTP Get download From: Arnold Maderthaner To: httpclient-users@hc.apache.org Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org Hi ! I'm trying to write a simple application that does a multi threaded HTTP Get download from a server which needs to download approx. 2000 files. I have a list of URLs that I want to fetch and want the binary content to be stored either on the filesystem or in memory. Depending on configuration I want to use 10 threads to download this from the server. What is the best method to implement this ? Should I use an ExecutorService with a fixed thread pool and create an own HTTPClient for each thread or is there some better (less expensive) approach ? yours Arnold --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org For additional commands, e-mail: httpclient-users-help@hc.apache.org