Member-only story
What Is a UUID and How Are They Generated?
A look at Universally Unique Identifiers
A Universally Unique Identifier (UUID) is a 128-bit number that identifies information in a computer system. It is also known as a Globally Unique Identifier (GUID). The standard representation of a UUID is typically made of hexadecimal digits:
e5d520d8-d06e-4bc2-9bb9-a28e47014884
In total, you see 32 characters with four hyphens in between. To live up to their name, UUID’s are expected to be unique. This is not generally true — their uniqueness depends on the methods or algorithms used to generate them. However, while it’s possible, the probability that a UUID is duplicated is close enough to zero to be negligible.
There are various ways to calculate a UUID. I will explain what the differences are and provide some insight into the implementations.
Version One
A version one UUID is a universally unique identifier that’s generated using the MAC address of the computer and the time of generation.
Does this mean that a version one UUID is unique? Well, they pretty much are. There’s a limit of 163 billion per second on a computer (or node) to ensure uniqueness, but that’s not something you would often run into as a developer.