forked from docs/doc-exports
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>
46 lines
4.9 KiB
HTML
46 lines
4.9 KiB
HTML
<a name="css_01_0230"></a><a name="css_01_0230"></a>
|
|
|
|
<h1 class="topictitle1">Bulk Route Optimization</h1>
|
|
<div id="body8662426"><p id="css_01_0230__en-us_topic_0000001549463585_p196979514299">According to the default routing rule of Elasticsearch, data in a bulk request is routed to different shards. When massive data is written and a large number of index shards exist, excessive internal requests forwarding may trigger bulk rejection. In a large-scale cluster, the long tail effect causes a high bulk request latency.</p>
|
|
<p id="css_01_0230__en-us_topic_0000001549463585_p99041110285">You can specify the <span class="parmname" id="css_01_0230__en-us_topic_0000001549463585_parmname626247103516"><b>index.bulk_routing</b></span> configuration item to enable bulk route optimization. This function reduces the requests that need to be internally forwarded. For clusters containing a large number of shards, this function can improve write performance and reduce bulk rejection.</p>
|
|
<div class="section" id="css_01_0230__en-us_topic_0000001549463585_section381314245297"><h4 class="sectiontitle">Procedure</h4><ol id="css_01_0230__en-us_topic_0000001549463585_ol1549211439294"><li id="css_01_0230__en-us_topic_0000001549463585_li12377205073817">Choose <strong id="css_01_0230__en-us_topic_0000001549463585_b10501194610220">Clusters</strong> in the navigation pane. On the <strong id="css_01_0230__en-us_topic_0000001549463585_b950124692214">Clusters</strong> page, locate the target cluster, and click <strong id="css_01_0230__en-us_topic_0000001549463585_b1750144692217">Access Kibana</strong> in the <strong id="css_01_0230__en-us_topic_0000001549463585_b11502174622215">Operation</strong> column.</li><li id="css_01_0230__en-us_topic_0000001549463585_li1668815383811">In the navigation tree on the left, choose <strong id="css_01_0230__en-us_topic_0000001549463585_b45124811227">Dev Tools</strong>.</li><li id="css_01_0230__en-us_topic_0000001549463585_li14923433297">On the <span class="uicontrol" id="css_01_0230__en-us_topic_0000001549463585_uicontrol21586148233"><b>Dev Tools</b></span> page, run the following command:<pre class="screen" id="css_01_0230__en-us_topic_0000001549463585_screen444475117597">PUT my_index
|
|
{
|
|
"settings": {
|
|
"index.bulk_routing": "local_pack"
|
|
}
|
|
}</pre>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="css_01_0230__en-us_topic_0000001549463585_table936510480321" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Values of <strong id="css_01_0230__en-us_topic_0000001549463585_b114751539182110">index.bulk_routing</strong></caption><thead align="left"><tr id="css_01_0230__en-us_topic_0000001549463585_row1240594823216"><th align="left" class="cellrowborder" valign="top" width="15.770000000000001%" id="mcps1.3.3.2.3.3.2.3.1.1"><p id="css_01_0230__en-us_topic_0000001549463585_p3405144813325">Value</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="84.23%" id="mcps1.3.3.2.3.3.2.3.1.2"><p id="css_01_0230__en-us_topic_0000001549463585_p3405164823210">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="css_01_0230__en-us_topic_0000001549463585_row740554833215"><td class="cellrowborder" valign="top" width="15.770000000000001%" headers="mcps1.3.3.2.3.3.2.3.1.1 "><p id="css_01_0230__en-us_topic_0000001549463585_p17405164853217">default</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="84.23%" headers="mcps1.3.3.2.3.3.2.3.1.2 "><p id="css_01_0230__en-us_topic_0000001549463585_p840516482328">The default routing mechanism of Elasticsearch is used. Records in a bulk request are split and routed independently.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="css_01_0230__en-us_topic_0000001549463585_row154055484327"><td class="cellrowborder" valign="top" width="15.770000000000001%" headers="mcps1.3.3.2.3.3.2.3.1.1 "><p id="css_01_0230__en-us_topic_0000001549463585_p1940574863215">pack</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="84.23%" headers="mcps1.3.3.2.3.3.2.3.1.2 "><p id="css_01_0230__en-us_topic_0000001549463585_p19405104863210">Data of a single bulk request is randomly routed to the same shard.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="css_01_0230__en-us_topic_0000001549463585_row040544873218"><td class="cellrowborder" valign="top" width="15.770000000000001%" headers="mcps1.3.3.2.3.3.2.3.1.1 "><p id="css_01_0230__en-us_topic_0000001549463585_p540594816322">local_pack</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="84.23%" headers="mcps1.3.3.2.3.3.2.3.1.2 "><p id="css_01_0230__en-us_topic_0000001549463585_p5405114833211">The data of a single bulk request is routed to the local shard of the data node that receives the bulk request. If the node does not contain the corresponding index shard, the data is randomly routed to another node that contains the index shard.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ol>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="css_01_0229.html">Instructions</a></div>
|
|
</div>
|
|
</div>
|
|
|