Enabling and Disabling Auto-Failover
Auto-failover is enabled and disabled the POST /settings/autoFailover
HTTP method and URI.
HTTP method and URI
This is a global setting that applies to all clusters. Authentication is required to change this value.
POST /settings/autoFailover
Parameters include:
-
enabled
: Value is true or false. Indicates whether Couchbase Server performs auto-failover for the cluster or not. -
timeout
: Positive integer between 30 and 3600. The number of seconds a node must be down before Couchbase Server performs auto-failover on the node. Required ifenabled=true
; optional whenenabled=false
.
Syntax
Curl request syntax:
curl -u [admin]:[password] http://[localhost]:8091/settings/autoFailover -d [parameter]
Example
Curl request example:
curl -i -u Administrator:password \ http://10.5.2.54:8091/settings/autoFailover \ -d 'enabled=true&timeout=600'
Raw HTTP request example:
POST /settings/autoFailover HTTP/1.1 Host: 10.5.2.54:8091 Content-Type: application/x-www-form-urlencoded Authorization: Basic YWRtaW46YWRtaW4= Content-Length: 14 enabled=true&timeout=600
Response codes
HTTP/1.1 200 OK Server: Couchbase Server Pragma: no-cache Date: Sat, 18 Oct 2014 00:26:28 GMT Content-Length: 0 Cache-Control: no-cache
The possible errors include:
400 Bad Request, The value of "enabled" must be true or false. 400 Bad Request, The value of "timeout" must be a positive integer bigger or equal to 30. 401 Unauthorized This endpoint isn't available yet.