MongoDB does not support unique indexes across shards, except when
the unique index contains the full shard key as a prefix of the
index. In these situations MongoDB will enforce uniqueness across
the full key, not a single field.
The maximum BSON document size is 16MB or 16777216 bytes.
All conversions should use base-2 scale, e.g. 1024 kilobytes = 1
If maxCollectionSize is less than or nearly equal to the target
collection, increase the chunk size to ensure sucessful initial sharding.
If there is doubt as to whether the result of the calculation is too
‘close’ to the target collection size, it is likely better to increase the
After successful initial sharding, you can reduce the chunk size as needed.
If you later reduce the chunk size, it may take time for all chunks to
split to the new size. See
Modify Chunk Size in a Sharded Cluster for instructions on
modifying chunk size.
This table illustrates the approximate maximum collection sizes
using the formulas described above: