If you have only a single master DBMS server, then 64-bit integers should be sufficient when using this strategy. Otherwise, if you are using multi-master in a distributed environment, you could achieve lock/communication-free identifier generation by instead using a 128 bit integer and for example include the server identifier inside those 128 bits, similarly to snowflake, before encrypting it and exposing it to the user.
Side note, since the identifiers are sequential there is anther benefit in that, like snowflake, when you order by (created_date, user_id), it wouldn't incur any performance cost over just ordering by user_id.
If anyone knows anyone who uses this or why it would be a bad idea I would love to know.
Adding more things such as time stamp just adds entropy without being useful. The indexes should start at 0 and count up. The computer index is something that should be handed out once every time a computer is brought in.
-- https://datatracker.ietf.org/doc/html/draft-peabody-dispatch...
Part of the reason is, presumably, that over a distributed system it's hard to coordinate choosing a deterministic globally unique identifier without a performance cost.
Does any one have any thoughts on implementing a globally unique identifier in a compressible/deterministic way?
My initial guess is choose some low-collision probability random part, and then glue on timestamp?