[
https://issues.apache.org/jira/browse/IGNITE-16438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17486006#comment-17486006
]
Pavel Tupitsyn commented on IGNITE-16438:
-----------------------------------------
We should consider using our own keep-alive logic (add a new message type to
the protocol, or allow empty messages). Disadvantages of built-in TCP keepalive
feature:
* _RFC 1122, section 4.2.3.6 indicates that acknowledgments for TCP keepalives
without data may not be transmitted reliably by routers; this may cause valid
connections to be dropped. Furthermore, TCP/IP stacks are not required to
support keepalives at all (and many embedded stacks do not), so this solution
may not translate to other platforms._ - see [Detection of Half-Open (Dropped)
Connections|https://blog.stephencleary.com/2009/05/detection-of-half-open-dropped.html]
* Before .NET Core 3.1 (we use netstandard2.0) there is no built-in way to set
customize keepalive settings (SocketOptionName.TcpKeepAliveInterval,
TcpKeepAliveTime, TcpKeepAliveRetryCount are not available). Default timeout is
2 hours, which is too long. There are hacky ways to set custom values on older
frameworks, but they may be unreliable on different platforms.
* Same as above applies to other thin clients (Python, NodeJs) - enabling TCP
keepalive is hard to do right and in a cross-platform manner.
On the other hand, adding a special message to our protocol is straightforward
and will also ensure that the server is alive and responds to messages.
> .NET: Thin client: enable TCP keepalive
> ---------------------------------------
>
> Key: IGNITE-16438
> URL: https://issues.apache.org/jira/browse/IGNITE-16438
> Project: Ignite
> Issue Type: Improvement
> Components: platforms
> Reporter: Pavel Tupitsyn
> Assignee: Pavel Tupitsyn
> Priority: Major
> Labels: .NET
> Fix For: 2.13
>
>
> Enable TCP keepalive to improve connection stability and detect disconnects
> early.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)