We Have a 3 node mongodb setup with a primary,secondary and an arbiter. If a Primary node goes down the election process to choose a new primary is taking around 30 seconds. During this period all the Create and Update operations fail. So is there anyway to reduce this failover time so that the client application can resume normal operations in less time.
What is the ideal way to handle Create and Update failures during the failover time? Should it be queued and retried? if the number of operations are high the queue size will not be enough. So please suggest a solution for this problem.If the failover time can be reduced it would solve this problem.
We tried reducing the heartbeat interval in the replica configuration. It did not help either