Scale Cluster
Gigapipe can scale your cluster both horizontally (adding more nodes) and vertically (increase machine power). Scaling the cluster means scaling horizontally by adding more nodes.
Scale cluster nodes
Provide the API with a cluster slug, number of shards and replicas to get additional nodes added to your cluster.
- Curl
- Python
curl -X 'POST' \
'https://api.gigapipe.com/v1/clusters/<your_cluster_slug>/scale/nodes' \
-H 'accept: application/json' \
-H 'Authorization: Bearer <your_access_token>' \
-H 'Content-Type: application/json' \
-d '{
"new_shards": 1,
"new_replicas": 1
}'
# Payload response ::Dictionary
{
"message": "Cluster scaling in progress."
}
response = gigapipe_client.clusters.scale_nodes("your_cluster_slug", payload={
"new_shards": 1,
"new_replicas": 1
})
# Payload response ::Dictionary
{
"message": "Cluster scaling in progress."
}
Scale nodes payload
Attributes
shards ::Integer
The number of shards you want to add to your cluster
replicas ::Integer
The number of replicas you want to add to your cluster
Scale nodes response
Attributes
message ::String
A basic response message