[SERVER-5593] Make heartbeat interval configurable to suit low-bandwidth links Created: 13/Apr/12  Updated: 06/Dec/22  Resolved: 14/Jun/18

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: 2.1.0
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Andrew Miller Assignee: Backlog - Replication Team
Resolution: Done Votes: 14
Labels: elections
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Assigned Teams:
Replication
Participants:

 Description   

The time between heartbeat pings is hardcoded (https://github.com/mongodb/mongo/blob/master/src/mongo/db/repl/heartbeat.cpp#L373) to be 2000 milliseconds. This amounts to quite a lot of traffic for a backup node on an expensive link (it works out at about 3 GB / month / node if there are only two nodes and communication is over a gvpe network).

It would be useful if it was possible to configure the heartbeat ping time to alternative values.



 Comments   
Comment by Spencer Brody (Inactive) [ 14/Jun/18 ]

Heartbeat interval is now configurable, and also not the main way liveness is maintained in pv1

Comment by Andrew Doumaux [ 11/Dec/15 ]

I agree that heartbeats (and associated timeouts) should be configurable. A network partition lasting over 12 seconds with the primary member will cause a fail-over and possible rollback transactions.

Comment by Eliot Horowitz (Inactive) [ 13/Apr/12 ]

Generally more configurations options aren't a good thing.

Generated at Thu Feb 08 03:09:21 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.