How do you handle persistent connections

May 12, 2014 at 5:31 PM
Does Casablanca knows how to handle persistent connection pools, i.e. creating a new http_client instance to the same IP and port will reuse the previously underlying constructed tcp socket or it will always create a new socket and establish a new connection?
Coordinator
May 13, 2014 at 8:17 PM
Hi Shadimari,

Our Windows Desktop client is written on top of WinHTTP and we rely on WinHTTP connection pooling logic. WinHTTP will automatically try to reuse a connection from a previous request if possible; otherwise it will create a new TCP connection. However, connections aren't pooled across http_client instances.
On other platforms (like Linux/Mac), we do not pool connections, this is a known issue.

Thanks
Kavya
May 13, 2014 at 8:29 PM
Thanks Kavya. If this is the case, then i read on several occasions that WinHTTP can reuse connections across sessions, now you are telling me that connections are not pooled across http_client instances which i assume wraps WinHTTP sessions, that would make me curious to validate your assumption.

Shadi
Coordinator
May 13, 2014 at 8:52 PM
Hi,

As per the WinHTTP documentation, it supports "Keep-alive pooling of anonymous connections across sessions." So you are right, for non-authenticated connections, connection pooling will work across http_client instances.

Thanks for clarifying!

Thanks
Kavya
May 13, 2014 at 9:18 PM
Thanks for support Kavya.