UUIDs (Universal Unique Identifiers) are 128-bit numbers that are practically guaranteed to be unique. The random ones are generated from your computer's random number generator.
With 122 bits of randomness (the 'x's in the version 4 format), the chance of collision is so small it's basically zero. You can generate millions per second for billions of years and never get a duplicate!
I use UUIDs for everything that needs a unique ID. No database coordination needed!