Re: [PATCH] Configurable TCP KeepAlives
"James K. Lowden" <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <[email protected]> |
Jackson, Craig (Gale) wrote: > > Due to the increasing use of things like firewalls, we're finding many > situations where the traditional 2-hour keepalive for TCP is useless. > (Our firewalls have a 60-minute idle timeout that is not easily > configurable.) Your reasoning is: "My firewall emulates broken routers by dropping perfectly good connections. Therefore, FreeTDS should be configurable." Should we be able to set DNS timeouts, too? Ethernet link options? Please allow me to explain my thinking more fully. I don't frequently turn down patches. The behavior controlled by these parameters has nothing to do with the Tabular Data Stream. TDS has a connection timeout, a login timeout, and a query timeout. Those all control how long a client is prepared to wait for a response from the server, over whatever kind of link is in use. There is nothing in them specific to TCP/IP. FreeTDS configuration parameters affect the Tabular Data Stream only, not the application, and not the underlying communication layer. Non-TDS behavior is best controlled by non-TDS tools. Database programmers and administrators are in general unschooled in TCP/IP theory. They are ill-equipped to compensate for broken network configurations. When perfectly good network connections fail without any attributable cause in the client or server, they had best consult the network folks who (one hopes) do have the skills and tools to diagnose and explain them. The organization can then decide whether to restore the transmission control protocol (cf. RFC 1122) or, as yours apparently has, to place the burden of coping with unreliable networks on the application programmer. Again, I have no problem exposing the underlying endpoint for manipulation by ioctl(2). But, because the keepalive parameters are invisible to TDS per se, they should not be configured by the library. Regards, --jkl