doc-exports/docs/css/umn/css_01_0188.html
Wuwan, Qi 050b395397 CSS UMN 23.2.1 20230926
Reviewed-by: Kacur, Michal <michal.kacur@t-systems.com>
Co-authored-by: Wuwan, Qi <wuwanqi1@noreply.gitea.eco.tsi-dev.otc-service.com>
Co-committed-by: Wuwan, Qi <wuwanqi1@noreply.gitea.eco.tsi-dev.otc-service.com>
2024-01-10 14:23:15 +00:00

157 lines
16 KiB
HTML

<a name="css_01_0188"></a><a name="css_01_0188"></a>
<h1 class="topictitle1">Deploying a Cross-AZ Cluster</h1>
<div id="body0000001478394613"><p id="css_01_0188__en-us_topic_0000001478394613_p119371820163018">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.</p>
<div class="section" id="css_01_0188__en-us_topic_0000001478394613_section1527152615427"><h4 class="sectiontitle">Allocating Nodes</h4><p id="css_01_0188__en-us_topic_0000001478394613_p922195414218">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. <a href="#css_01_0188__en-us_topic_0000001478394613_table13143175454216">Table 1</a> describes how the nodes are allocated.</p>
<div class="note" id="css_01_0188__en-us_topic_0000001478394613_note1225174271317"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="css_01_0188__en-us_topic_0000001478394613_ul85869454137"><li id="css_01_0188__en-us_topic_0000001478394613_li175461852171311">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.</li><li id="css_01_0188__en-us_topic_0000001478394613_li15351191815319">If you enable master nodes when deploying a cross-AZ cluster, the master nodes will also be distributed to different AZs.</li><li id="css_01_0188__en-us_topic_0000001478394613_li1162119220141">The node quantity difference between any two AZs is no more than one.</li></ul>
</div></div>
<div class="tablenoborder"><a name="css_01_0188__en-us_topic_0000001478394613_table13143175454216"></a><a name="en-us_topic_0000001478394613_table13143175454216"></a><table cellpadding="4" cellspacing="0" summary="" id="css_01_0188__en-us_topic_0000001478394613_table13143175454216" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Number of nodes and AZ distribution</caption><tbody><tr id="css_01_0188__en-us_topic_0000001478394613_row7221175417423"><td class="cellrowborder" rowspan="2" valign="top"><p id="css_01_0188__en-us_topic_0000001478394613_p162211543426">Nodes</p>
</td>
<td class="cellrowborder" valign="top"><p id="css_01_0188__en-us_topic_0000001478394613_p42211754184217">Single AZ</p>
</td>
<td class="cellrowborder" colspan="2" valign="top"><p id="css_01_0188__en-us_topic_0000001478394613_p15221954114214">Two AZs</p>
</td>
<td class="cellrowborder" colspan="3" valign="top"><p id="css_01_0188__en-us_topic_0000001478394613_p1422115412421">Three AZs</p>
</td>
</tr>
<tr id="css_01_0188__en-us_topic_0000001478394613_row19221195416424"><td class="cellrowborder" valign="top"><p id="css_01_0188__en-us_topic_0000001478394613_p6222454144214">AZ1</p>
</td>
<td class="cellrowborder" valign="top"><p id="css_01_0188__en-us_topic_0000001478394613_p52228544422">AZ1</p>
</td>
<td class="cellrowborder" valign="top"><p id="css_01_0188__en-us_topic_0000001478394613_p10222105434217">AZ2</p>
</td>
<td class="cellrowborder" valign="top"><p id="css_01_0188__en-us_topic_0000001478394613_p192221854164219">AZ1</p>
</td>
<td class="cellrowborder" valign="top"><p id="css_01_0188__en-us_topic_0000001478394613_p172221654134215">AZ2</p>
</td>
<td class="cellrowborder" valign="top"><p id="css_01_0188__en-us_topic_0000001478394613_p1222265410428">AZ3</p>
</td>
</tr>
<tr id="css_01_0188__en-us_topic_0000001478394613_row1722235414214"><td class="cellrowborder" valign="top"><p id="css_01_0188__en-us_topic_0000001478394613_p5222165484215">1</p>
</td>
<td class="cellrowborder" valign="top"><p id="css_01_0188__en-us_topic_0000001478394613_p1222255419428">1</p>
</td>
<td class="cellrowborder" colspan="2" valign="top"><p id="css_01_0188__en-us_topic_0000001478394613_p122235416424">Not supported</p>
</td>
<td class="cellrowborder" colspan="3" valign="top"><p id="css_01_0188__en-us_topic_0000001478394613_p1722212549423">Not supported</p>
</td>
</tr>
<tr id="css_01_0188__en-us_topic_0000001478394613_row10222554154219"><td class="cellrowborder" valign="top"><p id="css_01_0188__en-us_topic_0000001478394613_p14222954144212">2</p>
</td>
<td class="cellrowborder" valign="top"><p id="css_01_0188__en-us_topic_0000001478394613_p1222754154211">2</p>
</td>
<td class="cellrowborder" valign="top"><p id="css_01_0188__en-us_topic_0000001478394613_p122224543426">1</p>
</td>
<td class="cellrowborder" valign="top"><p id="css_01_0188__en-us_topic_0000001478394613_p4222165404213">1</p>
</td>
<td class="cellrowborder" colspan="3" valign="top"><p id="css_01_0188__en-us_topic_0000001478394613_p1622215420426">Not supported</p>
</td>
</tr>
<tr id="css_01_0188__en-us_topic_0000001478394613_row182224548423"><td class="cellrowborder" valign="top" width="14.285714285714285%"><p id="css_01_0188__en-us_topic_0000001478394613_p10222135484211">3</p>
</td>
<td class="cellrowborder" valign="top" width="14.285714285714285%"><p id="css_01_0188__en-us_topic_0000001478394613_p52221754134213">3</p>
</td>
<td class="cellrowborder" valign="top" width="14.285714285714285%"><p id="css_01_0188__en-us_topic_0000001478394613_p16222185474216">2</p>
</td>
<td class="cellrowborder" valign="top" width="14.285714285714285%"><p id="css_01_0188__en-us_topic_0000001478394613_p102221454104211">1</p>
</td>
<td class="cellrowborder" valign="top" width="14.285714285714285%"><p id="css_01_0188__en-us_topic_0000001478394613_p222216542422">1</p>
</td>
<td class="cellrowborder" valign="top" width="14.285714285714285%"><p id="css_01_0188__en-us_topic_0000001478394613_p11222954184219">1</p>
</td>
<td class="cellrowborder" valign="top" width="14.285714285714285%"><p id="css_01_0188__en-us_topic_0000001478394613_p1223115419429">1</p>
</td>
</tr>
<tr id="css_01_0188__en-us_topic_0000001478394613_row322319542429"><td class="cellrowborder" valign="top" width="14.285714285714285%"><p id="css_01_0188__en-us_topic_0000001478394613_p622385414427">4</p>
</td>
<td class="cellrowborder" valign="top" width="14.285714285714285%"><p id="css_01_0188__en-us_topic_0000001478394613_p1322315424218">4</p>
</td>
<td class="cellrowborder" valign="top" width="14.285714285714285%"><p id="css_01_0188__en-us_topic_0000001478394613_p1223195418425">2</p>
</td>
<td class="cellrowborder" valign="top" width="14.285714285714285%"><p id="css_01_0188__en-us_topic_0000001478394613_p122325417428">2</p>
</td>
<td class="cellrowborder" valign="top" width="14.285714285714285%"><p id="css_01_0188__en-us_topic_0000001478394613_p1422345464210">2</p>
</td>
<td class="cellrowborder" valign="top" width="14.285714285714285%"><p id="css_01_0188__en-us_topic_0000001478394613_p1422345444212">1</p>
</td>
<td class="cellrowborder" valign="top" width="14.285714285714285%"><p id="css_01_0188__en-us_topic_0000001478394613_p322335418425">1</p>
</td>
</tr>
<tr id="css_01_0188__en-us_topic_0000001478394613_row52231854194219"><td class="cellrowborder" valign="top" width="14.285714285714285%"><p id="css_01_0188__en-us_topic_0000001478394613_p1722315410427">...</p>
</td>
<td class="cellrowborder" valign="top" width="14.285714285714285%"><p id="css_01_0188__en-us_topic_0000001478394613_p182231854164214">...</p>
</td>
<td class="cellrowborder" valign="top" width="14.285714285714285%"><p id="css_01_0188__en-us_topic_0000001478394613_p19223254204214">...</p>
</td>
<td class="cellrowborder" valign="top" width="14.285714285714285%"><p id="css_01_0188__en-us_topic_0000001478394613_p2022385434216">...</p>
</td>
<td class="cellrowborder" valign="top" width="14.285714285714285%"><p id="css_01_0188__en-us_topic_0000001478394613_p52231554194219">...</p>
</td>
<td class="cellrowborder" valign="top" width="14.285714285714285%"><p id="css_01_0188__en-us_topic_0000001478394613_p1422345413420">...</p>
</td>
<td class="cellrowborder" valign="top" width="14.285714285714285%"><p id="css_01_0188__en-us_topic_0000001478394613_p172231454104217">...</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="css_01_0188__en-us_topic_0000001478394613_section728941718437"><h4 class="sectiontitle">Setting Replicas</h4><p id="css_01_0188__en-us_topic_0000001478394613_p79144264619">Setting replicas enables clusters effectively use the HA capability of AZs.</p>
<ul id="css_01_0188__en-us_topic_0000001478394613_ul1246944134611"><li id="css_01_0188__en-us_topic_0000001478394613_li5246644134611">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.</li><li id="css_01_0188__en-us_topic_0000001478394613_li55104547186">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 <strong id="css_01_0188__b1353310111726">settings</strong> to change the number of replicas.<p id="css_01_0188__en-us_topic_0000001478394613_p1929958164617">You can run the following command to modify the number of index replicas:</p>
<p id="css_01_0188__en-us_topic_0000001478394613_p953913552468"><b><span class="cmdname" id="css_01_0188__en-us_topic_0000001478394613_cmdname1553865511464">curl -XPUT http://ip:9200/{index_name}/_settings -d '{"number_of_replicas":2}'</span></b></p>
<p id="css_01_0188__en-us_topic_0000001478394613_p25401755154620">Alternatively, run the following command to specify the number of replicas in the template:</p>
<p id="css_01_0188__en-us_topic_0000001478394613_p1654015554616"><b><span class="cmdname" id="css_01_0188__en-us_topic_0000001478394613_cmdname154019558467">curl -XPUT http://ip:9200/ _template/templatename -d '{ "template": "*", "settings": {"number_of_replicas": 2}}'</span></b></p>
</li></ul>
<div class="note" id="css_01_0188__en-us_topic_0000001478394613_note11875185864712"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="css_01_0188__en-us_topic_0000001478394613_ul13490145104816"><li id="css_01_0188__en-us_topic_0000001478394613_li144901594818"><strong id="css_01_0188__en-us_topic_0000001478394613_b11968950210">ip</strong>: private network address</li><li id="css_01_0188__en-us_topic_0000001478394613_li246017445524"><strong id="css_01_0188__en-us_topic_0000001478394613_b39054551611">index_name</strong>: index name</li><li id="css_01_0188__en-us_topic_0000001478394613_li93708715485"><strong id="css_01_0188__en-us_topic_0000001478394613_b1887326825101722">number_of_replicas</strong>: number of replicas after modification. The value in the preceding command indicates that two replicas are required.</li></ul>
</div></div>
</div>
<div class="section" id="css_01_0188__en-us_topic_0000001478394613_section9926102264410"><h4 class="sectiontitle">Possible Service Interruptions</h4><p id="css_01_0188__en-us_topic_0000001478394613_p564105844412">The following table describes the possible service interruptions when an AZ of a two- or three-AZ cluster is faulty.</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="css_01_0188__en-us_topic_0000001478394613_table119868579442" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Possible service interruptions</caption><thead align="left"><tr id="css_01_0188__en-us_topic_0000001478394613_row176475815448"><th align="left" class="cellrowborder" valign="top" width="10.69%" id="mcps1.3.4.3.2.4.1.1"><p id="css_01_0188__en-us_topic_0000001478394613_p16475844412">AZs</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="13.28%" id="mcps1.3.4.3.2.4.1.2"><p id="css_01_0188__en-us_topic_0000001478394613_p0643582448">Master Nodes</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="76.03%" id="mcps1.3.4.3.2.4.1.3"><p id="css_01_0188__en-us_topic_0000001478394613_p156415580444">Service Interruption Analysis</p>
</th>
</tr>
</thead>
<tbody><tr id="css_01_0188__en-us_topic_0000001478394613_row1164175818449"><td class="cellrowborder" valign="top" width="10.69%" headers="mcps1.3.4.3.2.4.1.1 "><p id="css_01_0188__en-us_topic_0000001478394613_p1264105814412">2</p>
</td>
<td class="cellrowborder" valign="top" width="13.28%" headers="mcps1.3.4.3.2.4.1.2 "><p id="css_01_0188__en-us_topic_0000001478394613_p76425824415">0</p>
</td>
<td class="cellrowborder" valign="top" width="76.03%" headers="mcps1.3.4.3.2.4.1.3 "><ul id="css_01_0188__en-us_topic_0000001478394613_ul1555935888"><li id="css_01_0188__en-us_topic_0000001478394613_li9339109583">When the number of nodes is an even number:<ul id="css_01_0188__en-us_topic_0000001478394613_ul1891331612817"><li id="css_01_0188__en-us_topic_0000001478394613_li129139161183">If half of data nodes are faulty, replace one node in the faulty AZ before you select the master node.</li></ul>
</li><li id="css_01_0188__en-us_topic_0000001478394613_li4802130131213">When the number of nodes is an odd number:<ul id="css_01_0188__en-us_topic_0000001478394613_ul63406516123"><li id="css_01_0188__en-us_topic_0000001478394613_li1634095151217">If the faulty AZ contains one more node than the normal AZ, you need to replace one node in the faulty AZ before you select the master node. For details about how to replace nodes, contact technical support.</li><li id="css_01_0188__en-us_topic_0000001478394613_li15652170201319">If the faulty AZ contains one less node than the normal AZ, services will not be interrupted and you can select the master node.</li></ul>
</li></ul>
</td>
</tr>
<tr id="css_01_0188__en-us_topic_0000001478394613_row1664558104415"><td class="cellrowborder" valign="top" width="10.69%" headers="mcps1.3.4.3.2.4.1.1 "><p id="css_01_0188__en-us_topic_0000001478394613_p86412583446">2</p>
</td>
<td class="cellrowborder" valign="top" width="13.28%" headers="mcps1.3.4.3.2.4.1.2 "><p id="css_01_0188__en-us_topic_0000001478394613_p2641758174411">3</p>
</td>
<td class="cellrowborder" valign="top" width="76.03%" headers="mcps1.3.4.3.2.4.1.3 "><p id="css_01_0188__en-us_topic_0000001478394613_p176412584448">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:</p>
<ul id="css_01_0188__en-us_topic_0000001478394613_ul38549401428"><li id="css_01_0188__en-us_topic_0000001478394613_li168541540134212">If service interruption happens in the AZ with one master node, you can select a master node from the AZ that has two dedicated master nodes.</li><li id="css_01_0188__en-us_topic_0000001478394613_li8829160194310">If service interruption happens in the AZ with two dedicated master nodes, you have no choice in the remaining AZ, because it has only one dedicated master node. In this case, services will be interrupted and you need to contact technical support.</li></ul>
</td>
</tr>
<tr id="css_01_0188__en-us_topic_0000001478394613_row1765158194417"><td class="cellrowborder" valign="top" width="10.69%" headers="mcps1.3.4.3.2.4.1.1 "><p id="css_01_0188__en-us_topic_0000001478394613_p196535854410">3</p>
</td>
<td class="cellrowborder" valign="top" width="13.28%" headers="mcps1.3.4.3.2.4.1.2 "><p id="css_01_0188__en-us_topic_0000001478394613_p136515581449">0</p>
</td>
<td class="cellrowborder" valign="top" width="76.03%" headers="mcps1.3.4.3.2.4.1.3 "><p id="css_01_0188__en-us_topic_0000001478394613_p465145820443">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.</p>
<p id="css_01_0188__en-us_topic_0000001478394613_p16280111536">Generally, service interruption will not occur.</p>
</td>
</tr>
<tr id="css_01_0188__en-us_topic_0000001478394613_row465558154413"><td class="cellrowborder" valign="top" width="10.69%" headers="mcps1.3.4.3.2.4.1.1 "><p id="css_01_0188__en-us_topic_0000001478394613_p46525824413">3</p>
</td>
<td class="cellrowborder" valign="top" width="13.28%" headers="mcps1.3.4.3.2.4.1.2 "><p id="css_01_0188__en-us_topic_0000001478394613_p1465105813441">3</p>
</td>
<td class="cellrowborder" valign="top" width="76.03%" headers="mcps1.3.4.3.2.4.1.3 "><p id="css_01_0188__en-us_topic_0000001478394613_p176575894411">Service interruption does not occur.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>