Failing over nodes

Failing over nodes

Nodes are failed over via hard failover via the POST /controller/failOver HTTP method and URI.

HTTP method and URI

Failing over a node indicates that the node is no longer available in a cluster and replicated data on another node should be made available to clients. This endpoint along with the otpNode parameter (internal node name) fails over a specific node.

POST /controller/failOver


HTTP request syntax:

POST /controller/failOver HTTP/1.1
Authorization: Basic

Curl request syntax:

curl -v -X POST 
        -u admin:password http://localhost:port/controller/failOver -d otpNode=[node@hostname]


The following examples fails over server node from a cluster with the local host,

curl -v -X POST 
        -u admin:password -d otpNode=ns_2@

Response codes

Response codes Description
200 OK
400 Bad Request JSON: The RAM Quota value is too small.
401 Unauthorized

The following example is a successful response:

HTTP/1.1 200 OK

The following example is an unsuccessful response, for example, if the node does not exist in the cluster.

HTTP/1.1 400