I've noticed that all MongoDB ids that have been generated in my webapp so far start with the number 5. For example, 54fb5359b903f0340d000006 and 54fca4664679861c17000002. Why is that the case?
Mongo uses a specific algorithm to generate the IDs based on several underlying factors.
http://docs.mongodb.org/manual/reference/object-id/
For example, it looks like the first few bytes are a timestamp, something which will have the same first digit for quite some time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With