31-Shard Allocation Awareness(机架感知)

同一机器上,部署多个es节点,防止副本和主分片分配到同一机器上

例如:es节点a、b、c部署在01机器上,节点d、e、f部署在02机器上

es2.4版本配置

a、b、c节点yaml配置:node.rack: aaa

d、e、f节点yaml配置:node.rack: bbb

调用api设置机架感知生效,"cluster.routing.allocation.awareness.attributes": "rack"

集群会重分配部分分片。当部分多于node节点数时,无法分配。

复制代码
curl --location 'http://es:9200/_cluster/settings' \
--data ''

curl --location --request PUT 'http://es:9200/_cluster/settings' \
--header 'Content-Type: application/json' \
--data '{
    "persistent": {
        "cluster.routing.allocation.awareness.attributes": "rack"
    }
}'

参考文档:Shard Allocation Awareness | Elasticsearch Guide [2.4] | Elastic

相关推荐
Fireworkitte4 小时前
安装 Elasticsearch IK 分词器
大数据·elasticsearch
huisheng_qaq13 小时前
【ElasticSearch实用篇-01】需求分析和数据制造
大数据·elasticsearch·制造
G皮T1 天前
【Elasticsearch】自定义评分检索
大数据·elasticsearch·搜索引擎·查询·检索·自定义评分·_score
feilieren1 天前
Docker 安装 Elasticsearch 9
运维·elasticsearch·docker·es
Java烘焙师2 天前
架构师必备:业务扩展模式选型
mysql·elasticsearch·架构·hbase·多维度查询
G皮T2 天前
【Elasticsearch】深度分页及其替代方案
大数据·elasticsearch·搜索引擎·scroll·检索·深度分页·search_after
G皮T2 天前
【Elasticsearch】检索排序 & 分页
大数据·elasticsearch·搜索引擎·排序·分页·检索·深度分页
飞询2 天前
Docker 安装 Elasticsearch 9
elasticsearch·docker
G皮T2 天前
【Elasticsearch】检索高亮
大数据·elasticsearch·搜索引擎·全文检索·kibana·检索·高亮
大只鹅3 天前
解决 Spring Boot 对 Elasticsearch 字段没有小驼峰映射的问题
spring boot·后端·elasticsearch