I have implemented sharding for two collections based on a column which is not indexed. Now after checking sh.status(), I can see all the data is saving in primary shard only. Data is not distributing among the other shard servers. What to do?
As written in mongodb docs "To shard a collection, you need to select a shard key. A shard key is either an indexed field or an indexed compound field that exists in every document in the collection. MongoDB divides the shard key values into chunks and distributes the chunks evenly across the shards. To divide the shard key values into chunks, MongoDB uses either range based partitioning or hash based partitioning" you can't solve your problem without indexing it. so create an indexed field first then check status of sh.status() . Reference: https://docs.mongodb.com/manual/reference/method/sh.status/ & https://docs.mongodb.com/manual/core/sharding-introduction/
Minimum on what data size Sharding is recommended in MongoDB? Suppose my database size is 1 GB is sharding necessary? if I do not create shard will that work for me, for this data size.
Does anyone know how I remove orphaned documents in a cluster (sharding) in mongodb version 3.0.10, My actual data are 20 million orphans and documents the value amounts to 21 million data
some same cases data is not important, and replicate them from primary to secondary will waste servers performance. Is there any ways to config?