一、题目
在集群中,数据首先分布在data_hot节点,rollover 设置max_age:3d, max_docs:5,max_size:50gb, 优先级为100。
max_age:15s, forcemarge 段合并,数据迁移到data_warm节点, 副本数为0,优先级为50
max_age:30s, 数据从data_warm迁移到data_cold节点
max_age:60s, 数据删除
运用ilm,创建index template名字为task_ilm_template,匹配模式task_ilm-*,并指定ilm 策略,创建索引task_ilm_00001注意分布情况
二、思考
索引生命周期管理ILM是对索引数据管理的一种自动化方式,主要是通过policy+索引模版结合使用。
通过创建ILM,在policy中可以指定多个阶段,生命周期阶段包括:
-
Hot: The index is actively being updated and queried.
-
Warm: The index is no longer being updated but is still being queried.
-
Cold: The index is no longer being updated and is queried infrequently. The information still needs to be searchable, but it’s okay if those queries are slower.
-
Frozen: The index is no longer being updated and is queried rarely. The information still needs to be searchable, but it’s okay if those queries are extremely slow.
-
Delete: The index is no longer needed and can safely be removed.
每个阶段可以制定不同的动作action,action主要有以下:
-
Rollover: Creates a new write index when the current