0

I have several machines that generate data (it's 8 collections in total), and there are several hierarchies in my model. That means, on level 0, machines (PC's) generate data in lets say minute time frames, then each data entry gets passed simultaneously to the hierarchy that is one above (level 1). There, the data gets kind of collected.

My question now is, is it really the case that the ObjectID asserts that all the id's created from different machines that do not know each other is different from each other ObjectID's? Because as I have read, the ObjectID is made up of:

a 4-byte value representing the seconds since the Unix epoch,
a 3-byte machine identifier,
a 2-byte process id, and
a 3-byte counter, starting with a random value.

Well could it be that in some cases, the time down to seconds can be the same when the objects are created at exactly the same second, then it might be that the process id might be the same by coincidence and the random value could also be the same? I just don't know about the machine identifier if its always the same... what's the case?

MMMM
  • 3,320
  • 8
  • 43
  • 80
  • To quote part of the answer but to get to the point *"...If you happen to insert over 16,777,216 (2^24) documents in a single second, on the same machine..."*. I'm interested for a stat on Twitter's input load. But I'm somehow guessing their load is not actually that high. – Neil Lunn Jun 14 '18 at 13:01
  • 1
    "is it really the case that the ObjectID asserts that all the id's created from different machines that do not know each other is different from each other ObjectID's?" : well, this is exactly why the machine identifier is there, isn't it? – ramnes Jun 14 '18 at 13:01

0 Answers0