On 1/16/2022 1:07 AM, zhta...@163.com wrote:
The following is a part of my cluster status
I configured maxShardsPerNode to 1,but I can still create a collection
with 2 shards and 2 replicas each shard on a node(From the web gui).
<snip>
Now I'm confused about the meaning of maxShardsPerNode.
A setting of maxShardsPerNode=1 means that the collection can only place
one of its shards on each node. In actuality it's shard replicas that
it is referring to. A 3 shard collection with 2 replicas has a total of
6 shard replicas.
With 5 total nodes, you should probably use maxShardsPerNode=2 when you
create the collection.
I did this on a cloud example created with 4 nodes. I wanted to try it
with 5, but the example only allows up to 4. This is the distribution I
ended up with:
https://www.dropbox.com/s/f41599jqlano4r3/collection_test3x2.png?dl=0
Based on this, I think that if you did maxShardsPerNode=2, 3 shards, and
2 replicas on a 5-node cloud, you would end up with 1 shard replica on 4
of the nodes, and 2 shard replicas on the fifth.
Thanks,
Shawn