What is UUID v8?
Version 8 UUIDs provide a format for experimental or vendor-specific use cases. It allows you to embed your own data into the UUID (up to 122 bits) while maintaining compatibility with the 128-bit UUID format and version/variant bits.
Key Features
- Flexible: No strict requirements on how the bits are generated, provided they fit the format.
- Compliant: Valid according to RFC 9562 parsers (unlike completely random strings).
- Specialized: Intended for cases where standard versions (v4, v7) don't meet specific requirements.
When to use UUID v8?
Use Version 8 only when you have very specific requirements that cannot be met by standard versions. For example, if you need to embed specific shard IDs or custom timestamps in a non-standard way. For general use, stick to v4 or v7.