willemt / raft

C implementation of the Raft Consensus protocol, BSD licensed
Other
1.13k stars 271 forks source link

Empty AppendEntries requests are sent during non-idle periods #88

Open freeekanayaka opened 6 years ago

freeekanayaka commented 6 years ago

The current implementation unconditionally sends empty an AppendEntries request every time the heartbeat interval (request_timeout) expires.

However sending empty/heartbeat AppendEntries is only required if no "actual" non-AppendEntries request was sent recently (where here "recently" essentially means within request_timeout milliseconds).