cURL / Mailing Lists / curl-library / Single Mail

curl-library

Cacheing In

From: <CHRIS.CLARK_at_FRIENDSPROVIDENT.CO.UK>
Date: Mon, 11 Feb 2002 0:10:28 +0000

--- Received from FPU.CLARKC1 0115-9810103 11-02-02 00:05

  -> IN=curl-library_at_lists.sourceforge.net

Hi!

Here's the scene - as yet entirely theoretical, since at this point in
time I've never coded even so much as a single libcurl API call - but if
I get a good answer to this question, there'll be no stopping me!

I have a multithreaded app. It's on Windows NT. It talks HTTPS to a Web
server. Each thread talks to the same Web server, and only ever to that
same Web server. My threads are long-lived (they each last for the
lifetime of the app). Each thread has its own curl (easy) handle. When
each thread starts up, it creates its own curl handle, and then sets up
filenames on that handle for a client certificate, a client private key
and password, and a trusted server certificate, using curl_easy_setopt
calls.

The values of these filenames, passwords, etc, given by each thread are
identical (each thread is using a single client certificate and key, to
represent itself - a single client application - to the Web server, and
a single trusted server certificate to represent the one and only Web
server it talks to).

At a high rate of knots after that, my threads are called (in no
particular order, but in rapid succession) and a called thread will fire
off a single HTTPS URL to the (one and only) Web server. When the thread
gets the response, and processes it, it goes back to sleep for a while,
until it's prodded into life again.

My question is this - for each thread, how many times do the various
files (client certificate, client key, and server certificate) get read
in physically from disk? Is it only once each per thread (for the first
time the thread gets called to issue a URL)? That would be really neat,
as it would indicate a fantastic caching deal going on somewhere, either
in libcurl, or OpenSSL, or possibly both.

Or would it be what I fear, which is three disk reads (one per file),
per thread, per requested URL? Yes I know that even then I'd probably
get a good deal from a goodly-sized disk cache, but I'd like this thing
to really fly if I can make it.

Any takers? Thanks in advance for any illumination you can shed.

Chris

This e-mail may contain confidential information and/or copyright
material. This e-mail is intended for the use of the addressee
only. Any unauthorised use may be unlawful.

If you receive this e-mail by mistake please advise the sender
immediately by using the reply facility in your e-mail software.

Friends Provident Marketing Group consists of the following
companies:

Friends Provident Life and Pensions Limited.
Registered number 4096141.
Friends' Provident Unit Trust Managers Limited.
Registered number 970641
FP Life Assurance Limited.
Registered number 782698
Friends Provident Pensions Limited.
Registered number 475201
Friends Ivory & Sime Managed Pensions Funds Limited.
Registered number 1020044
Registered and Head Office of each of the above companies is at Pixham End,
Dorking, Surrey RH4 1QA.
Registered in England. Incorporated companies limited by shares.
Ivory & Sime Trustlink Limited. Registered number 151198
Registered and Head Office: One Charlotte Square, Edinburgh EH2
4DZ. Registered in Scotland. Incorporated company limited by
shares.

Companies within this Group transact life assurance, pension,
permanent health, unit trust and investment trust business

All are regulated by the Financial Services Authority.
Received on 2002-02-11