Unique ids - crccheck/crccheck.github.io GitHub Wiki

Questions to ask:

  1. Can I generate this ID in the database?
  2. What's predictable/unpredictable about this method?
  3. Efficiency?
  4. url safety (safe for whatever transport)?

autoinc

1 2 3 4 5 ...

uuid

v4 for randomness Look into the new v6 v7 v8 https://blog.scaledcode.com/blog/analyzing-new-unique-id/

Snowflake

https://blog.twitter.com/engineering/en_us/a/2010/announcing-snowflake

TypeID

https://github.com/jetpack-io/typeid user_2x4y6z8a0b1c2d3e4f5g6h7j8k

TypeIDs are a modern, type-safe extension of UUIDv7. Inspired by a similar use of prefixes in Stripe's APIs.

Sqids

https://sqids.org/

Sqids (pronounced "squids") is an open-source library that lets you generate YouTube-looking IDs from numbers. These IDs are short, can be generated from a custom alphabet and are guaranteed to be collision-free

NanoID

Very similar to Sqids. constant length?