How are MongoDB’s ObjectIds generated?

They are not random and can be easily predicted :

A BSON ObjectID is a 12-byte value
consisting of a 4-byte timestamp
(seconds since epoch), a 3-byte
machine id, a 2-byte process id, and a
3-byte counter

http://www.mongodb.org/display/DOCS/Object+IDs

Leave a Comment