Switched to NanoID from UUID.
We are now using nanoid for generating our identifiers.
Benefits over UUID
(taken from here)
Nano ID is quite comparable to UUID v4 (random-based). It has a similar number of random bits in the ID (126 in Nano ID and 122 in UUID), so it has a similar collision probability:
For there to be a one in a billion chance of duplication, 103 trillion version 4 IDs must be generated.
There are three main differences between Nano ID and UUID v4:
- Nano ID uses a bigger alphabet, so a similar number of random bits are packed in just 21 symbols instead of 36.
- Nano ID code is 4.5 times less than uuid/v4 package: 108 bytes instead of 483.
- Because of memory allocation tricks, Nano ID is 60% faster than UUID.