IBM Cloud Docs
Adding Elasticsearch nodes

Adding Elasticsearch nodes

It is possible to scale your IBM Cloud® Databases for Elasticsearch deployment horizontally by adding more Elasticsearch nodes (also referred to as members). If your deployment starts to strain or slow down, adding nodes increases capacity and reliability. When a node is added, Elasticsearch automatically balances the workload across all the nodes in your deployment.

It is not possible to decrease the amount of Elasticsearch nodes. As an alternative, you can use Backups and restore to a new instance with fewer nodes.

Nodes that you add to your deployment are added with the amount of disk, memory, and CPU as the other nodes currently in your deployment. A visual representation of your data members and their resource allocation is available on the Resources tab of your deployment's Manage page. However, horizontal scaling is only available by using the API.

The Scale Resources Pane in Resources
The Scale Resources Pane

A default IBM Cloud® Databases for Elasticsearch deployment runs with three data members in a cluster, and resources are allocated to all three members equally. For example, the minimum storage of an Elasticsearch deployment is 15360 MB, which equates to an initial size of 5120 MB per member. The minimum RAM for an Elasticsearch deployment is 3072 MB, which equates to an initial allocation of 1028 MB per member. Adding a node adds another member with a size of 5120 MB of disk and 1028 MB of RAM, bringing your total resource usage for your deployment to 20480 MB of disk and 4096 MB of RAM.

Billing is based on the total amount of resources that are allocated to the service.

Adding nodes through the API

The Foundation endpoint that is shown on the Overview panel of your service provides the base URL to access this deployment through the API.

To view the current and scalable resources on a deployment, use the /deployments/{id}/groups.

curl -X GET -H "Authorization: Bearer $APIKEY" `https://api.{region}.databases.cloud.ibm.com/v4/ibm/deployments/{id}/groups'

To add nodes, use the /deployments/{id}/groups/{group_id} API endpoint, sending a PATCH request with the number of nodes you want in your deployment. The example request increases the number of nodes from the default of 3 to 5.

curl -X PATCH 'https://api.{region}.databases.cloud.ibm.com/v4/ibm/deployments/{id}/groups/member' \
-H 'Authorization: Bearer <>' \
-H 'Content-Type: application/json' \
-d '{"members": {"allocation_count": 5}}' \

When you use the CRN, remember to URL encode the CRN value as it might include the forward-slash (/) %2F character.

When properly encoded, a CRN that uses a forward-slash (/) character substitutes with a %2F character string. For example, see the following CRN.

crn:v1:bluemix:public:databases-for-redis:us-south:a/274074dce64e9c423ffc238516c755e1:29caf0e7-120f-4da8-9551-3abf57ebcfc7::

becomes

crn:v1:bluemix:public:databases-for-redis:us-south:a%2F274074dce64e9c423ffc238516c755e1:29caf0e7-120f-4da8-9551-3abf57ebcfc7::