Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-6846

Default Object Id can be random for reducing hotspots in sharding

    XMLWordPrintableJSON

Details

    • Icon: New Feature New Feature
    • Resolution: Duplicate
    • Icon: Trivial - P5 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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            mark.nielsen@reputation.com mark nielsen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: