cURL / Mailing Lists / curl-library / Single Mail

curl-library

Link between curl_easy handle and connection

From: Pierre Brico <pierre.brico_at_gmail.com>
Date: Sun, 6 Mar 2016 19:05:11 +0100

Hello,

I'm currently writing a injector tool to perform benchmark on web
application. This tool is based on libcurl and libevent.

This tool creates a curl_easy handle per virtual user. The multi interface
is then used in conjunction with the libevent library to execute all
transfers.

I have troubles with the application I'm benchmarking and I suspect the way
the connection are managed in libcurl.

Some explanations:
each virtual users has its own CURL handle. When the user wants to
communicate with the server, it uses the CURL handle. But it seems that
when starting a transfer, libcurl gets a connection from a pool, execute
the transfer and put it back to the pool (this suppose HTTP 1.1 protocol).
BUT as the user authenticates with one connection, it can't use another
connection to send request to the server. The application security detects
something strange and blocks all subsequent calls. To verify, I've used
the CURLOPT_FORBID_REUSE to force closing the connection and re-open a new
one and it looks to work properly... But performance are very bad which is
logic!

So my question is: is it possible to link one connection to one CURL handle
(no pool usage)?

Thanks for you help,
Pierre

-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2016-03-06