Retrieving Auto-Failover Settings
- reference
Use the /settings/autoFailover
endpoint to get the current auto-failover settings.
Description
The GET /settings/autoFailover
HTTP method and URI retrieve auto-failover settings for the cluster.
Auto-failover settings are global, applying to all nodes in the cluster.
Curl Syntax
curl -X GET http://<ip-address-or-hostname>:8091/settings/autoFailover \
-u <username>:<password>
Required Permissions
You must have one of the following roles to be able to read the auto-failover settings:
Responses
- 200 OK
-
The call was successful. Also returns an object containing the current state of the auto-failover settings. See Example for an example of the response.
- 401 Unauthorized
-
The user credentials supplied with the call do not have the correct permissions to read the auto-failover settings.
- 404 Not Found
-
The URL was incorrect.
Example
The following example returns the auto-failover settings for the cluster.
It pipes the output through the jq
command to improve readability.
curl -X GET http://localhost:8091/settings/autoFailover \
-u Administrator:password | jq '.'
If successful, execution returns the auto-failover settings for the cluster. For example:
{
"enabled": true,
"timeout": 120,
"count": 0,
"failoverOnDataDiskIssues": {
"enabled": false,
"timePeriod": 120
},
"maxCount": 1,
"canAbortRebalance": true,
"failoverPreserveDurabilityMajority": false,
"failoverOnDataDiskNonResponsiveness": {
"enabled": false,
"timePeriod": 120
},
"allowFailoverEphemeralNoReplicas": false
}
The keys in the object returned in the example are:
-
enabled
Whether automatic failover is on (a value oftrue
) or off (false
). -
timeout
The number of seconds Couchbase Server waits after a node has become unavailable before it performs an automatic failover. This value can be between 5 and 3600. The default value is 120. -
count
. The number of nodes that Couchbase Server has auto-failed over. Couchbase Server resets this value to zero either when the cluster rebalances to remove or rejoin the failed nodes, or when an administrator manually resets the count (see Resetting Auto-Failover). The parameter’s default value is 0. If number of failed-over nodes reaches the maximum count set bymaxCount
, Couchbase Server refuses to auto-failover more nodes until you reset the count or resolve the auto-failovers with a recovery and rebalance. -
failoverOnDataDiskIssues
. This object contains two keys:-
enabled
indicates whether auto-failover can occur when a disk has been unresponsive, and which can betrue
orfalse
(the default). -
timePeriod
, which indicates the administrator-specified time-period, in seconds, after which auto-failover is triggered, when a disk is unresponsive. The value is an integer between 5 and 3600.
-
-
maxCount
. The maximum number of nodes that can be auto-failed over at the same time. When the count of auto-failed over nodes reaches this value, Couchbase Server does not trigger additional auto-failovers. You must either resolve the auto-failovers through rebalancing the cluster to remove or recover the failed-over nodes or reset the count of failed over nodes. The default value is 1. -
canAbortRebalance
Whether or not Couchbase Server can auto-failover a node while a rebalance is taking place. This feature is only available in Couchbase Server Enterprise Edition. The value can be eithertrue
(the default) orfalse
. -
failoverPreserveDurabilityMajority
Indicates whether Couchbase Server refuses to auto-failover a node if doing so could result in the loss of durably written data. -
failoverOnDataDiskNonResponsiveness
This object contains two keys that control auto-failover when a data disk is non-responsive:-
enabled
indicates whether Couchbase Server initiates an auto-failover on a node when its data disk has failed to complete an operation in the period set bytimePeriod
. This value can betrue
, which enables the auto-failover, or the defaultfalse
which does not trigger a failover due to disk unresponsiveness. -
timePeriod
Indicates amount of time a data disk on a node has to be unresponsive before Couchbase Server can trigger an auto-failover. This value defaults to 120.
For more information about these values, see Failover on Data Disk Non-Responsiveness.
-
-
allowFailoverEphemeralNoReplicas
Indicates whether Couchbase Server can auto-failover a node that contains vBuckets for an unreplicated ephemeral bucket. This value can betrue
, which allows auto-failover of such nodes, or the defaultfalse
which prevents auto-failover of such nodes.For more information about this value, see Auto-failover for Ephemeral Buckets with No Replicas.
See Also
-
For information about setting auto-failover parameters with the REST API, see Enabling and Disabling Auto-Failover.
-
The Couchbase Server command line tool setting-autofailover lets you manage auto-failover.
-
For information about managing auto-failover with Couchbase Server Web Console, see Node Availability.
-
For information about auto-failover see Automatic Failover.