Re: Different number of replicas for different shards

2019-06-30 Thread Erick Erickson
Right. That’s the whole point of hashing the in the first place. I’ve never seen much imbalance in how documents are distributed using compositeId, maybe a percent or two. Do be aware that you can’t really extrapolate from, say, 100 docs over 10 shards. With such low numbers you can get some ano

Re: Different number of replicas for different shards

2019-06-30 Thread Nawab Zada Asad Iqbal
@Erick Actually, i thought further and realized what you were saying. I am hoping to rely on the murmur3 hash of the routing key to find the destination shard. On Sun, Jun 30, 2019 at 3:32 AM Nawab Zada Asad Iqbal wrote: > Hi Erick, > > I plan to use the composite-id routing. And I can use th

Re: Different number of replicas for different shards

2019-06-30 Thread Nawab Zada Asad Iqbal
Hi Erick, I plan to use the composite-id routing. And I can use the same routing part of the key to determine the shard number in ADDREPLICA command (using the route parameter). I think this solution will work for me. Thanks Nawab On Sat, Jun 29, 2019 at 8:55 AM Erick Erickson wrote: > What

Re: Different number of replicas for different shards

2019-06-29 Thread Erick Erickson
What’s your basis for thinking that some shard will get more queries? Unless you’re using implicit routing, you really have no control over either where docs end up or thus where queries go. If you do somehow know some shards get more queries, one strategy is to simply have more _replicas_ for

Re: Different number of replicas for different shards

2019-06-29 Thread Shawn Heisey
On 6/29/2019 12:23 AM, Nawab Zada Asad Iqbal wrote: is it possible to specify different number of replicas for different shards? i.e if I expect some shard to get more queries , i can add more replicas to that shard alone, instead of adding replicas for all the shards. On initial collection cre