ptupitsyn commented on a change in pull request #9817:
URL: https://github.com/apache/ignite/pull/9817#discussion_r805821664



##########
File path: 
modules/platforms/dotnet/Apache.Ignite.Core/Impl/Client/ClientSocket.cs
##########
@@ -170,6 +176,29 @@ internal sealed class ClientSocket : IDisposable
 
             _features = Handshake(clientConfiguration, ServerVersion);
 
+            if (_features.HasFeature(ClientBitmaskFeature.Heartbeat) &&
+                clientConfiguration.HeartbeatInterval > TimeSpan.Zero)
+            {
+                _heartbeatInterval = clientConfiguration.HeartbeatInterval;
+
+                var serverIdleTimeout = TimeSpan.FromMilliseconds(
+                    DoOutInOp(ClientOp.GetIdleTimeout, null, r => 
r.Reader.ReadLong()));
+
+                if (_heartbeatInterval > serverIdleTimeout)

Review comment:
       As a user, I've set `idleTimeout` on server so that idle client 
connections are closed automatically and resources are not consumed. It is up 
to the clients to reconnect when needed.
   
   Now, if we enable heartbeats automatically with one-third of `idleTimeout`, 
those idle connections will never be dropped, and server will consume resources 
keeping them open.
   
   It is just a different use case. Some users want to keep client connections 
open forever, even when not doing anything. Other users may want to drop them.
   
   Too many use cases and edge cases, that's why I suggest to keep it simple 
and let the user decide.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to