Details
-
New Feature
-
Resolution: Duplicate
-
Trivial - P5
-
None
-
None
-
None
-
None
-
any
Description
The default Object Id is increasing approx sequentially.
It would be nice to have an option in the config for a "pseudo-random" default setting for mongo.
Example, in GridFS, typically programmers will reverse the object id to make it sort of random so that sharding doesn't create as many hotspots – especially if the environment is pre-ranged.
Out of the box, it would be nice to be able to use the object id in a sharded environment where the programmer doesn't have to worry about the shard key. Having an optional config setting to make the object id pseudo random would be nice. Just reverse the time portion of the object id or reverse the object id entirely.
The correct thing to do is for the programmer to define the value of the object id, but this doesn't always happen.