cURL / Mailing Lists / curl-library / Single Mail


Re: easy, multi or share?

From: Daniel Stenberg <>
Date: Mon, 23 May 2005 20:49:50 +0200 (CEST)

On Mon, 23 May 2005, Michael Mastroianni wrote:

> Just looking for some advice. I'm using libcurl in an application that has
> to spider hundreds of thousands of sites, and is expected to be up for weeks
> at a time.
> I'm currently using the easy interface, with around 300 threads. I tried
> re-using curlhandles, but didn't see any real benefit.

The benefit is when you do more requests to one of the sites in the connection
cache. Or resolve a name you have in the DNS cache. Or reconnect to a HTTPS
site you have in the session ID cache.

> My question is: if you had to write such an application using libcurl, which
> interface would you use?

I honestly can't tell.

The multi interface automatically allow all handles share DNS cache.

> Also, is there any benefit to re-using a connection to go to a host
> different from the one in the previous connection?

Nope. None that I can think of.

  Commercial curl and libcurl Technical Support:
Received on 2005-05-23