Hacker News new | ask | show | jobs
Show HN: MyUUIDshop, Generate UUIDs and never worry about duplicates (myuuid.shop)
5 points by scrygl 40 days ago
In response to some recent discussion here and on X about a company having an in house uuid microservice and team dedicated to it. At first that was made fun of, but further discussion revealed in fact sometimes uuids can collide due to improper entropy seeding most likely. In order to ensure that UUIDs are unique, we store each generation in a database, then check new generations against it to ensure they are not previously generated. As well, there is an API through which you can check if a UUID is present in the database. Paid options available for heavy use. Enjoy!
3 comments

I wonder what the benefit of UUIDs over a counter is? A counter would not require a db and still never collide.
Hi author, could you please share more details about the UUID collision, how it occurred in micro service etc..
Here is one of the X posts I was referencing: https://x.com/initjean/status/2054281688801321457?s=20

Basically in theory you could generate 1M UUIDs per second and never have a collision for the life of the universe. But in practice due to bad entropy some collisions have been seen in practice. I made the service in part as a joke off of this discussion, but also in case anyone may actually want to use it, it will dutifully provide the advertised function.

And please also share why not just use e.g. 256-bit UUIDs instead of v4 128-bit if collisions really are a problem with 128-bit (which i find hard to belive).
I think for the same reasons that 128bit ones can collide, any amount of bits could. I don't have a perfect understanding of the math involved so I could be wrong.
this is a joke right?
Yea basically. :P