ID | IEP-83 |
Author | |
Sponsor | |
Created | |
Status | |
GreyDRAFT
Motivation
...
Because of that, some protocols implement keepalive logic on a higher level (SMB, TLS). More details: https://blog.stephencleary.com/2009/05/detection-of-half-open-dropped.html
Proposal
- Add OP_HEARTBEAT to the protocol with an empty payload. Clients can send heartbeats at a configurable interval and receive responses to ensure that the connection is active.
- Add OP_GET_IDLE_TIMEOUT to the protocol that returns server-side idle timeout (see ClientConnectorConfiguration.idleTimeout) as int64 milliseconds. When server.heartbeatInterval is less than client.idleTimeout, log a warning on the client.
- Add ClientConfiguration.heartbeatInterval property. Defaults to 0 (heartbeats disabled).
As a result:
- Client can identify a broken connection by sending OP_HEARTBEAT to the server.
- Server can identify a broken connection with the existing idleTimeout functionality.
This applies to Ignite 2.x and 3.x.
...
- New ProtocolBitmaskFeature will be added to maintain protocol compatibility.TODO: Should we set heartbeat interval automatically according to ClientConnectorConfiguration#idleTimeout?
- When client-side heartbeats are enabled (not by default), server will no longer disconnect an otherwise idle client. This should be carefully documented and cross-linked.
Discussion Links
Reference Links
...