Back to Blog
Region uuid generator6/21/2023 The Post-UUIDv1/v4 era: A Cambrian explosion of identifiers This is a workable solution, but as you might expect, it's not that easy. Since Postgres would catch a collision on a PRIMARY KEY or UNIQUE INDEX column, we're done right? If we want to generate UUIDs all we need to do is choose UUID v1 or V4, and we won't leak any schema structure information to the outside world, right? MAC addresses uniquely (usually) identify network cards - which is a security risk - and those bits can be made random. a 60 bit date-time (at nanosecond precision)īut where's the randomness? Well v1s assume that you won't generate a ton of values in the same nanosecond (and there are some extra bits reserved for differentiating even when you do), but another source is the MAC address.Version 1 UUIDs have three two components: There are a lot of versions of UUID, but let's discuss the ones we're more likely to use/see day to day. More importantly, UUIDs introduce methodology to the madness - different versions of UUID are derived different ways - combined with other sources of randomness or known values. They're very random (almost always generated with secure random sources), and while they're even worse for remembering, they're near impossible to practically guess - the search space is just too large! (Secure) Random UUIDsĪlong comes UUIDs - you're probably used to seeing them now, values like this UUIDv4: People can still technically check them all (the guessing space is 1 to MAX_RANDOM_USER_ID!).
0 Comments
Read More
Leave a Reply. |