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

相关推荐
会员源码网2 小时前
交易所 K 线模块无法启动?核心源码排查位置与实战解决方案
网络·elasticsearch
Elastic 中国社区官方博客2 小时前
Jina Rerankers 为 Elastic 推理服务(EIS)带来了快速、多语言的重排序能力
大数据·人工智能·elasticsearch·搜索引擎·ai·全文检索·jina
Fanxt_Ja2 小时前
多线程之ES同步数据
java·大数据·elasticsearch·搜索引擎
历程里程碑3 小时前
Linux19 实现shell基本功能
linux·运维·服务器·算法·elasticsearch·搜索引擎·哈希算法
yqd66618 小时前
elasticsearch
大数据·elasticsearch·搜索引擎
Elastic 中国社区官方博客20 小时前
金融服务公司如何大规模构建上下文智能
大数据·人工智能·elasticsearch·搜索引擎·ai·金融·全文检索
好好沉淀1 天前
Elasticsearch 中批量更新文档(Update By Query)的标准写法
大数据·elasticsearch
小程故事多_801 天前
Elasticsearch ES 分词与关键词匹配技术方案解析
大数据·人工智能·elasticsearch·搜索引擎·aigc
念丶小宇1 天前
Git常用指令
大数据·git·elasticsearch
铭毅天下1 天前
Python 同时适配 Elasticsearch 与 Easysearch 实战复盘
大数据·elasticsearch·搜索引擎·全文检索