August 3, 2017
Posted by on
A Universally Unique Identifier (UUID) is a 128-bit number used to uniquely identify things, whatever those things might be, in computer systems. The way they are represented in text varies, but they typically look something like
with 32 hexadecimal digits being broken into 5 groups by hyphens. The usefulness of UUIDs comes from the sheer improbability of the same UUID being generated 2 different times.
To give an idea of the improbability: the number of Version 4 UUIDs you would have to generate to have at least a 50% probability of a collision would be around 2.7 quintillion. If a computer generated 1 billion UUIDs every second, it would take 85 years just to compute that many, and even then the amount of physical storage required would be around 45 exabytes, much larger than the largest databases currently in existence.
This is to say that for now, UUIDs are a very good way of uniquely identifying things with almost impossible collisions.