Deploying a Cross-AZ Cluster
To prevent data loss and minimize the cluster downtime in case of service interruption, CSS supports cross-AZ cluster deployment. When creating a cluster, you can select two or three AZs in the same region. The system will automatically allocate nodes to these AZs.
Allocating Nodes
If you select two or three AZs when creating a cluster, CSS automatically enables the cross-AZ HA function and properly allocates nodes to different AZs. Table 1 describes how the nodes are allocated.
- When creating a cluster, ensure that the number of selected nodes is no less than the number of AZs. Otherwise, cross-AZ deployment is not supported.
- If you enable master nodes when deploying a cross-AZ cluster, the master nodes will also be distributed to different AZs.
- The node quantity difference between any two AZs is no more than one.
Setting Replicas
To maximize HA performance, properly determine the number of replicas.
- In two-AZ deployment, if one AZ becomes unavailable, the other AZ continues to provide services. In this case, at least one replica is required. Elasticsearch has one replica by default. You can retain the default value if you do not require higher read performance.
- In three-AZ deployment, if one AZ becomes unavailable, the other AZs continue to provide services. In this case, at least one replica is required. Elasticsearch has one replica by default. If you need more replicas to improve the cluster's ability to handle queries, modify [/topic/body/section/ul/li/p/idp:point/strong {""}) settings (strong] to change the number of replicas.
You can run the following command to modify the number of index replicas:
curl -XPUT http://ip:9200/{index_name}/_settings -d '{"number_of_replicas":2}'
Alternatively, run the following command to specify the number of replicas in the template:
curl -XPUT http://ip:9200/ _template/templatename -d '{ "template": "*", "settings": {"number_of_replicas": 2}}'
- ip: private network address
- index_name: index name
- number_of_replicas: number of replicas after modification. The value in the preceding command indicates that two replicas are required.
Possible Service Interruptions
The following table describes the possible service interruptions when an AZ of a two- or three-AZ cluster is faulty.
AZs |
Master Nodes |
Service Interruption Analysis |
---|---|---|
2 |
0 |
|
2 |
3 |
There is a 50% possibility for service interruption. When two dedicated master nodes are allocated to one AZ and another master node is allocated to the other AZ:
|
3 |
0 |
If you configure four nodes in three AZs, each AZ will have at least one node. If the AZ with two nodes is faulty, the services will be interrupted. You are not advised to configure four nodes when selecting three AZs. Generally, service interruption will not occur. |
3 |
3 |
Service interruption does not occur. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot