Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Scalability concepts: distributed ID generation (avikdas.com)
3 points by akdas on March 23, 2020 | hide | past | favorite | 2 comments


See CUIDs for a widely used and workable solution.


I hadn't heard about CUIDs, but based on the Github repo [1], I see they fall into two of the categories I presented:

- A large range. It looks like CUIDs support a short version, but the README calls out the short version should only be used for disambiguation, and are "absolutely not recommended for database unique IDs".

- Encode the partition in the ID. In this case, the partition is either based on the browser or the process ID of the server.

Cool stuff, thanks for pointing it out!

[1] https://github.com/ericelliott/cuid




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: