Define Failover Settings

Define Failover Settings

When enabled, the auto-failover feature will automatically failover a node identified as unresponsive or unavailable.

Full Administrators and Cluster Administrators can enable auto-failover feature.

Automatic failover is disabled by default. When you enable the auto-failover, it is enabled for all services except for the Index Service. The timeout settings determine how long a node is unresponsive to the rest of the cluster before the auto-failover process triggers a failover.

Using the UI

To enable the automatic failover using the Web Console:

  1. From the Couchbase Web Console > Settings > select the Auto-Failover tab.
  2. Select the Enable auto-failover check box to enable the setting.
  3. To set the delay in seconds before auto-failover is started, enter the number of seconds in the Timeout box and click Save. The default timeout is 120 seconds. In almost all cases, it is recommended to leave the timeout at the default.

Using the CLI

The automatic failover settings can be changed using the setting-autofailover command in couchbase-cli.

Below is an example of changing the automatic failover settings using the CLI:

$ couchbase-cli setting-autofailover -c 192.168.1.5 --username Administrator \
 --password password --enable-auto-failover 1 --auto-failover-timeout 30

Using the REST API

The automatic failover settings can be changed using the REST API /settings/autoFailover endpoint.

Below is an example of changing the automatic failover settings using the REST API:

curl -i -u Administrator:password \ 
  http://10.5.2.54:8091/settings/autoFailover \
  -d 'enabled=true&timeout=600'