I had two questions:
-
I have a custom shard key on a field “appID” in my “app” collection. This field has a unique index created.
If I dont use the _id which is default unique indexed - what is the possible impact.? . In worse case if 2 chunks are created and are in different shards the possibility of _id being common will force them to be in the same shard instead?. So does everyone override _id with their custom identifier ? . -
How does high availability work with shards - Does the replication oplog with majority writes copy over chunks to each other secondary replication set ? => There is no documentation that talks of how replication works along with sharding - because ideally we would want to have both - high availability and high perf for reads when collection size is big and we are using sharding.
Thanks for any pointers.
Shivani