系统拓扑设计(冷热分离)
- master节点
discovery.zen.minimum_master_nodes:N/2+1(防止脑裂)
node.data:false
- hot节点
node.attr.box_type:hot
node.data:true
- cool节点
node.attr.box_type:cool
node.data:true
- 设置数据放到hot节点
PUT _template/test
{
"index_patterns": "test-*",
"settings": {
"index.number_of_replicas": "0",
"index.routing.allocation.require.box_type": "hot"
}
}
- 利用定时器定时将hot节点迁移到cool节点
PUT /test-2018.07.05/_settings
{
"settings": {
"index.routing.allocation.require.box_type": "cold"
}
}