Q:非洲食人族的酋长吃什么?

同一个Indices 主分片是存在同一个Node 还是分散存在不同的Node

Elasticsearch | 作者 barry | 发布于2018年05月07日 | 阅读数:2188

例如:一个ES Cluster 拥有4个Node     一个 Index  有5个主分片 1个副本分片   根据主分片和副本分片不能在同一个Node中的原则 副本分片会单独存储在一个Node   那么其他的5个主分片是分散存在不同的Node 还是存在同一个Node ?
已邀请:

bill

赞同来自:

1. 每个分片的主本和副本不会单独存储在一个Node。
If you choose this option, set 
cluster.routing.allocation.same_shard.host: true 
in your config. This will prevent a primary and a replica shard from colocating to the same physical machine (since this would remove the benefits of replica high availability).
 
2. 不同分片的主本或副本可以在同一个Node上。
 
3. 每个节点上的shards个数会balance。
 
比如:
 
Node1 :P1, P2,R0
Node2 :P3, P2, R4
Node3 :P0, R3
Node4 :P4, R1
 

要回复问题请先登录注册