replicaset Member failover time for mongodb v2.4.2

22 views
Skip to first unread message

Omer Abdullah Bin Mahfooz

unread,
Dec 8, 2016, 10:31:40 PM12/8/16
to mongodb-user

Hi,

We have implemented a replica set which uses 2 nodes (say nodeA and nodeB) for data and another node for arbiter. Mongo version used is 2.4.2 on Centos 6 x64

The system takes around 30 seconds or more to failover and elect a Primary in case any one member which was Primary goes down. We have scenarios where the network can fluctuate and recover on its own.

Is there a way to increase or decrease this failover detection time ? Any configuration parameters ?

Thanks

Omer

Stephen Steneker

unread,
Dec 9, 2016, 12:02:47 AM12/9/16
to mongodb-user
On Friday, 9 December 2016 14:31:40 UTC+11, Omer Abdullah Bin Mahfooz wrote:

We have implemented a replica set which uses 2 nodes (say nodeA and nodeB) for data and another node for arbiter. Mongo version used is 2.4.2 on Centos 6 x64

The system takes around 30 seconds or more to failover and elect a Primary in case any one member which was Primary goes down. We have scenarios where the network can fluctuate and recover on its own.


Hi Omer,

MongoDB 2.4 reached end of life in March, 2016 (and 2.6 in October, 2016). I would strongly recommend planning to upgrade to a newer (and supported) version of MongoDB, but at a minimum you should be using the last 2.4 release (2.4.14), which includes many bug fixes and stability improvements since 2.4.2.

The failover detection time in MongoDB 2.4 is not configurable and your suggested timing is expected (see: How long does replica set failover take? in the MongoDB 2.4 manual).

MongoDB 3.2 introduced a newer replication protocol which provides faster failover as well as an electionTimeoutMillis tuneable which determines the timeout in milliseconds for detecting when the primary is unreachable. For more information, see Replication Election Enhancements in the MongoDB 3.2 release notes.

Regards,
Stephen
Reply all
Reply to author
Forward
0 new messages