Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
dtech
on July 21, 2023
|
parent
|
context
|
favorite
| on:
Nanosecond timestamp collisions are common
I feel like v7 is almost a strictly better v4. Assuming you can generate a v7 (you have a time source), what are the disadvantages?
andersa
on July 21, 2023
|
next
[–]
Anyone who can see the uuidv7 can determine at what time it was generated. You might not want that for things exposed to users.
wolf550e
on July 21, 2023
|
prev
|
next
[–]
You can hand out uuidv4 to clients without revealing anything.
madsbuch
on July 21, 2023
|
prev
[–]
Entropy. You loose bits to a known source, which reduce entropy of the UUID.
dtech
on July 21, 2023
|
parent
|
next
[–]
I do feel 74 bits per second is enough though. That would require 2^(74/2) = 137 billion UUIDs generated in a single second for a 50% chance of a single collision.
dralley
on July 21, 2023
|
parent
|
prev
[–]
128 bits is a lot of entropy to go around, though.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: