I have a server A and multiple servers that are behind in a local network with the server A (Server A has connection outside)
Server A has a webpage that does multiple ajax request to a script like this
//Get myserverB_IP from database
...
$url = "https://myserverB_IP/someurl.php"
$ch = curl_init();
curl_setopt($ch,CURL_VERSION_SSL,TRUE);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt($ch, CURLOPT_FRESH_CONNECT, false);
curl_setopt ($ch, CURLOPT_TIMEOUT,30);
curl_setopt($ch, CURLOPT_COOKIEJAR, '/tmp/sess.txt');
curl_setopt($ch, CURLOPT_COOKIEFILE, '/tmp/sess.txt');
curl_exec($ch);
...
With http, everything worked fine, but when adding https there is a big delay because every single ajax call requests a new key exchange to the serverB
There is any way to reuse the connection to avoid the key exchange in every request ?