From cce34f8b4c5c1d7284ca48a024c4d83e65c67596 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20L=C3=A9caille?= Date: Tue, 26 Mar 2019 16:17:33 +0100 Subject: [PATCH] DOC: peers: Peers protocol documentation update. Add information about new peers protocol heartbeat feature. --- doc/peers.txt | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/doc/peers.txt b/doc/peers.txt index 4187a4eb6..58df236bb 100644 --- a/doc/peers.txt +++ b/doc/peers.txt @@ -227,9 +227,10 @@ *** Control message class *** At this time of writing, control messages are fixed-length messages used - only to control the synchonrizations between local and/or remote processes. + only to control the synchronizations between local and/or remote processes + and to emit heartbeat messages. - There exist four types of such control messages: + There exists five types of such control messages: +------------+--------------------------------------------------------+ | type byte | signification | @@ -248,7 +249,17 @@ | 3 | synchronization confirmed: acknowledge a finished or | | | partial synchronization message. | +------------+--------------------------------------------------------+ + | 4 | Heartbeat message. | + +------------+--------------------------------------------------------+ + About hearbeat messages: a peer sends heartbeat messages to peers it is + connected to after periods of 3s of inactivity (i.e. when there is no + stick-table to synchronize for 3s). After a successful peer protocol + handshake between two peers, if one of them does not send any other peer + protocol messages (i.e. no heartbeat and no stick-table update messages) + during a 5s period, it is considered as no more alive by its remote peer + which closes the session and then tries to reconnect to the peer which + has just disappeared. *** Error message class ***