RFC4122 what does phrase uniqueness across space and time
mean and please explain.

- 1
- 1

- 635
- 1
- 5
- 11
-
It means "you shouldn't get the same GUID again, regardless of where or when you generate it". – FoggyDay Apr 10 '20 at 18:18
-
@FoggyDay, thank you :). In a way it means probability of duplication is almost zero. – Madhukar Moogala Apr 10 '20 at 18:25
2 Answers
"across space and time" describes how unlikely it is for two UUIDs to be the same.
128 bits of entropy is quite large and a collision would be like flipping a coin 128 heads in a row twice or rolling a 6 on a 6 sided die 50 times twice. To determine the bits of entropy here, you take the log_2 of the number of options:
128 UUID bits / log_2(2) => 128 / 1 => 128 coin flips
128 UUID bits / log_2(6) => 128 / 2.6 ~=> 50 dice rolls
This duplication is called a UUID collision, and it is possible; however, the chance is extremely small and not worth worrying about.

- 11,962
- 4
- 34
- 48

- 2,962
- 1
- 17
- 27
It basically means that for all realistic purposes, that ID is statistically guaranteed to be unique
While it is not technically impossible for the UUID to be duplicated again, the formula for calculating the probability of that looks like this. n
is equal to the number of digits in the UUID and r
is the number of UUIDs you want. Try plugging this into a calculator.
Well, the calculator broke if you tried that as the computation is massive. And the value of that for just 32 character UUIDS would be very close to 1 for any number less than 10^16 number of numbers. That is 10 quadrillion.
You are not going to run out of UUIDs if you are Facebook. You are not going to run out of IDs if you are the US government. Both store a massive amount of data (space) and have been generating data for a long time (time).

- 4,558
- 1
- 18
- 35