It takes up to 10 minutes to join new master

When the leader master node fail, it takes about a minute to elect a new leader. But the follower master node takes minutes to switch to the new leader. It's this expected? or any configuration can optimize this?

After the new leader and follower joined, when i added back the third master node, it can join the cluster in seconds.

Elasticsearch: 7.0.1
Master node number: 3

I found this discussion. Looks like setting of masterTerminationFix: true can fix the issue. is this setting set in elasticsearch.yml? is it dynamic setting?

the cluster coordination code has been completely replaced in Elasticsearch 7, so it is hard to compare or setup with older versions. Can you share logfiles of your nodes showing that timeouts occur?

This was a confirmed issue that affects Elasticsearch versions before 7.2 (including version 6).

A workaround was added to the official helm-charts in Slow re-election when elected master pod is deleted · Issue #63 · elastic/helm-charts · GitHub but was then disabled by default in the 7.2.0 release because it was fixed upstream in Elasticsearch.

As you are already running version 7 the easiest fix would be to upgrade to the latest release (7.3.0 at time of writing).

Good to the issue. Will schedule update of my cluster. Thanks a lot

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.