by cjblomqvist · 2y ago · 0 comments
Those two sucks for us right now (planning to move to UUIDs).
Wouldn't Snowflake IDs also solve that problem? A Snowflake ID will fit within a signed 64-bit int.
https://en.wikipedia.org/wiki/Snowflake_ID
The nice thing about a Snowflake ID is that you can encode it into 11 characters in base 62. If I have a UUID, I'm going to need 22 characters. Maybe that doesn't really matter given that 11 characters isn't something someone will want to be typing anyway and Snowflake IDs do require a bit of extra caution to make sure you don't get collisions (since the number you can make per second is limited to how big your sequence generation is).