logoalt Hacker News

michelppyesterday at 7:18 PM1 replyview on HN

Because then you leak the timestamp. The idea is, present what looks like v4 random uuids externally, but they are stored internally with v7 which greatly improves locality and index usability. The conversion back and forth happens with a secret key.


Replies

themafiayesterday at 8:34 PM

What problem does leaking the timestamp cause?

UUIDv8 gives you timestamp + counter + random.

The advantage is that lexical order and chronological order are the same and you still retain enough random bits that guessing the next generated timestamp is not easy.

show 1 reply