curl-library
Multiple multi-handles in multiple thread: what's the best practice
Date: Thu, 25 Nov 2010 23:41:14 +0800
Hi,
We use multiple multi-handles by libcurl's multi-interface for HTTPS
uploading on Solaris 10 server.Because of the performance costs on openssl's
read/write (we need to transfer over 1000 files within 1 second, but the
single threaded multihandle can only achieve 300 jobs because of openssl
costs), we decided to use the multi-interface in multiple threads.
I just want to know if the following design can work as expected:
1> Each mult-handle will be used in one single thread, no sharing with other
threads
2> Each live easy-handles will be only used in a certain thread
(adding/removing from the thread multi-handle)
3> The same easy handles might be scheduled to different threads, so
different multi handles in different time slice; but can only exist in 1
thread during a certain transfer
4> Openssl thread safe lock functions will be applied.
5> All the easy handles will be cached when they are removed from a running
thread's multi-handle, no cleanup/re-initialization
If the above solution won't work, is there any best practice or suggestion?
Thanks!
Best Regards,
Fei
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-11-25