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

相关推荐
2601_961875243 小时前
法考资料电子版|pdf|资料已整理
elasticsearch·搜索引擎·pdf·全文检索·solr·lucene·sphinx
MemoriKu5 小时前
Flutter 相册 APP 收尾优化实战:未分析任务横幅持久隐藏与标签回归测试补强
大数据·人工智能·flutter·elasticsearch·机器学习·搜索引擎·重构
JAVA面经实录9175 小时前
Elasticsearch 完整版完整知识体系
java·elasticsearch·搜索引擎·es
Upsy-Daisy6 小时前
Hermes Agent 学习笔记 06:Skills 系统,Agent 如何把经验沉淀为可复用能力?
大数据·elasticsearch·搜索引擎
代码讲故事7 小时前
在没有kibana的ES(elasticsearch)线上生产环境集群中,如何通过命令行修改或增加字段而不需要reindex?
大数据·elasticsearch·搜索引擎·命令行·es·索引·模版
Java 码思客1 天前
【ElasticSearch从入门到架构师】第3章:ES 核心基础概念(架构师必备底层认知)
大数据·elasticsearch·jenkins
徐寿春1 天前
什么是 Elasticsearch 倒排索引
大数据·elasticsearch·搜索引擎
Java 码思客2 天前
【ElasticSearch从入门到架构师】第1章:ElasticSearch 核心认知与行业定位
大数据·elasticsearch·搜索引擎
serve the people2 天前
Elasticsearch(5) i want to monitor the es health from a http api
大数据·http·elasticsearch
Taerge01102 天前
Doris, StarRocks, ClickHouse, Hologres, ES 对比,选型建议
大数据·clickhouse·elasticsearch