Files
doc-exports/docs/css/umn/css_01_0211.html
zhengxiu 93d856d5c5 css umn 25.6.0 version
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: zhengxiu <zhengxiu@huawei.com>
Co-committed-by: zhengxiu <zhengxiu@huawei.com>
2025-11-25 11:34:43 +00:00

93 lines
8.0 KiB
HTML

<a name="EN-US_TOPIC_0000001992205869"></a><a name="EN-US_TOPIC_0000001992205869"></a>
<h1 class="topictitle1">Decoupling Index Storage and Compute in an OpenSearch Cluster Through Index Lifecycle Management</h1>
<div id="body0000001992205869"><div class="section" id="EN-US_TOPIC_0000001992205869__en-us_topic_0000001945223382_en-us_topic_0000001934020326_section766512014019"><h4 class="sectiontitle">Overview</h4><p id="EN-US_TOPIC_0000001992205869__en-us_topic_0000001945223382_en-us_topic_0000001934020326_p547911812417">CSS supports decoupled storage and compute. That is, indexes can be frozen in OBS to reduce the storage cost of cold data. This document describes how to use index lifecycle management to automatically freeze indexes at a specific time to decouple storage and compute.</p>
<p id="EN-US_TOPIC_0000001992205869__en-us_topic_0000001945223382_en-us_topic_0000001934020326_p383294312412">In this section, a lifecycle policy is configured to automatically freeze an index three days after it is created and dump data to OBS. The index will be deleted seven days after it is created.</p>
<div class="fignone" id="EN-US_TOPIC_0000001992205869__fig53155365182"><span class="figcap"><b>Figure 1 </b>Storage-compute decoupling</span><br><span><img id="EN-US_TOPIC_0000001992205869__image7316936171810" src="figure/en-us_image_0000002061403354.png"></span></div>
</div>
<div class="section" id="EN-US_TOPIC_0000001992205869__en-us_topic_0000001945223382_en-us_topic_0000001934020326_section1453615515018"><h4 class="sectiontitle">Prerequisites</h4><ul id="EN-US_TOPIC_0000001992205869__en-us_topic_0000001945223382_en-us_topic_0000001934020326_en-us_topic_0000001536523745_ul5400173012717"><li id="EN-US_TOPIC_0000001992205869__en-us_topic_0000001945223382_en-us_topic_0000001934020326_en-us_topic_0000001536523745_li13400123014718">There are available CSS clusters.</li><li id="EN-US_TOPIC_0000001992205869__en-us_topic_0000001945223382_en-us_topic_0000001934020326_en-us_topic_0000001536523745_li440012302071">OpenSearch 1.3.6 or 2.19.0 is used.</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0000001992205869__en-us_topic_0000001945223382_en-us_topic_0000001934020326_section1068981011015"><h4 class="sectiontitle">Decoupling Index Storage and Compute Through Index Lifecycle Management</h4><ol id="EN-US_TOPIC_0000001992205869__en-us_topic_0000001945223382_en-us_topic_0000001934020326_ol579517241688"><li id="EN-US_TOPIC_0000001992205869__en-us_topic_0000001938218544_li3529193555517">Log in to the OpenSearch Dashboards.<ol type="a" id="EN-US_TOPIC_0000001992205869__en-us_topic_0000001938218544_ol1949254165519"><li id="EN-US_TOPIC_0000001992205869__en-us_topic_0000002338102386_li111185453113"><span id="EN-US_TOPIC_0000001992205869__en-us_topic_0000002338102386_ph134648105316">Log in to the CSS management console.</span></li><li id="EN-US_TOPIC_0000001992205869__en-us_topic_0000002338102386_li1711804571114">In the navigation pane on the left, choose <span class="uicontrol" id="EN-US_TOPIC_0000001992205869__en-us_topic_0000002338102386_uicontrol1511834581115"><b>Clusters &gt; OpenSearch</b></span>.</li><li id="EN-US_TOPIC_0000001992205869__en-us_topic_0000002338102386_li201181045151113">In the cluster list, find the target cluster, and click <strong id="EN-US_TOPIC_0000001992205869__en-us_topic_0000002338102386_b8963520674129">Dashboards</strong> in the <strong id="EN-US_TOPIC_0000001992205869__en-us_topic_0000002338102386_b1363282744129">Operation</strong> column to log in to OpenSearch Dashboards.</li><li id="EN-US_TOPIC_0000001992205869__en-us_topic_0000002338102386_li811824512111">In the left navigation pane, choose <strong id="EN-US_TOPIC_0000001992205869__en-us_topic_0000002338102386_b45261424710">Dev Tools</strong>.<p id="EN-US_TOPIC_0000001992205869__en-us_topic_0000002338102386_p539424154519">The left part of the console is the command input box, and the triangle icon in its upper-right corner is the execution button. The right part shows the execution result.</p>
</li></ol>
</li><li id="EN-US_TOPIC_0000001992205869__en-us_topic_0000001945223382_en-us_topic_0000001934020326_li10320113081711">Create a lifecycle policy named <strong id="EN-US_TOPIC_0000001992205869__b158000585044710">hot_warm_policy</strong>.<p id="EN-US_TOPIC_0000001992205869__en-us_topic_0000001945223382_en-us_topic_0000001934020326_p192937719172">Policy description: Three days after an index is created, the API for freezing indexes is automatically called to dump data to OBS. Seven days after index creation, the index is deleted.</p>
<pre class="screen" id="EN-US_TOPIC_0000001992205869__screen1965991463314">PUT _plugins/_ism/policies/hot_warm_policy
{
"policy": {
"description": "hot warm delete workflow",
"error_notification": null,
"default_state": "hot",
"states": [
{
"name": "hot",
"actions": [],
"transitions": [
{
"state_name": "warm",
"conditions": {
"min_index_age": "3d"
}
}
]
},
{
"name": "warm",
"actions": [
{
"freeze_low_cost": {}
}
],
"transitions": [
{
"state_name": "delete",
"conditions": {
"min_index_age": "7d"
}
}
]
},
{
"name": "delete",
"actions": [
{
"delete": {}
}
],
"transitions": []
}
],
"ism_template": {
"index_patterns": [
"data*"
],
"priority": 100
}
}
}</pre>
</li><li id="EN-US_TOPIC_0000001992205869__en-us_topic_0000001945223382_en-us_topic_0000001934020326_li1812715651911">Create an index named data-2022-06-06. The index is automatically associated with the lifecycle policy <strong id="EN-US_TOPIC_0000001992205869__b029615553183">hot_warm_policy</strong>, which freezes the index three days after it is created and deletes it seven days after creation.<pre class="screen" id="EN-US_TOPIC_0000001992205869__en-us_topic_0000001945223382_en-us_topic_0000001934020326_screen0172542193514">POST data-2022-06-06/_bulk
{"index":{}}
{"name":"name1"}
{"index":{}}
{"name":"name2"}
{"index":{}}
{"name":"name3"}
{"index":{}}
{"name":"name4"}
{"index":{}}
{"name":"name5"}
{"index":{}}
{"name":"name6"}</pre>
</li><li id="EN-US_TOPIC_0000001992205869__en-us_topic_0000001945223382_en-us_topic_0000001934020326_li1097520318466">Query data and check whether storage and compute is automatically decoupled.<ul id="EN-US_TOPIC_0000001992205869__en-us_topic_0000001945223382_en-us_topic_0000001934020326_ul8362175954713"><li id="EN-US_TOPIC_0000001992205869__en-us_topic_0000001945223382_en-us_topic_0000001934020326_li1036255920479">Three days after the index is created, check the frozen index.<pre class="screen" id="EN-US_TOPIC_0000001992205869__en-us_topic_0000001945223382_en-us_topic_0000001934020326_screen19429203814233">GET _cat/freeze_indices?s=i&amp;v</pre>
<p id="EN-US_TOPIC_0000001992205869__en-us_topic_0000001945223382_en-us_topic_0000001934020326_p19852165814220">The index generated three days ago is expected to be frozen.</p>
<pre class="screen" id="EN-US_TOPIC_0000001992205869__en-us_topic_0000001945223382_en-us_topic_0000001934020326_screen114951851172411">health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
green open <strong id="EN-US_TOPIC_0000001992205869__en-us_topic_0000001945223382_en-us_topic_0000001934020326_b19520181484710">data-2022-06-06</strong> x8ab5NX6T3Ox_xoGUanogQ 1 1 6 0 7.6kb 3.8kb</pre>
</li><li id="EN-US_TOPIC_0000001992205869__en-us_topic_0000001945223382_en-us_topic_0000001934020326_li1436295964717">Seven days after the index is created, check the frozen index. The index is expected to be deleted.</li></ul>
</li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="css_01_0320.html">Managing Index Policies for OpenSearch Clusters</a></div>
</div>
</div>