logoalt Hacker News

N_Lenslast Wednesday at 1:09 AM1 replyview on HN

That depends on if the specific implementation of the generator instance is thread safe. Highly implausible to use the same generator instance between different threads/processes/hosts because there's no benefit at all and only additional downsides.


Replies

sedatklast Wednesday at 2:14 AM

To implement a thread-safe sequential increment, you need locking. When you use locking, then it becomes a “non-universal” ID generator with arbitrary performance impact.

Either it’s collision-prone or locking. Both are problematic in their own way.

It’s footguns all over while UUIDv7 simply exists.

show 1 reply