Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You lose security/privacy benefits. People in this thread pretend that there is one id type that is obviously better.

- UUID (all types) scale, sequential ids don't scale

- UUID (fully random) is completely secure and private. You cannot infer anything from it. As soon as you add anything to it ( like timestamp or counter), outsiders can infer things like how fast you are generating new objects

- UUID (fully random) cannot be abused by developers, which might skip creating timestamp columns and read it from the id instead

- UUIDs are slower, but as you see y's not for no benefits



Not that much slower than bigint as long as you replace the top one or two bytes in the UUID with a rotating per-minute counter.

You keep 106 bits of entropy (from v4's 122 bits) while largely eliminating page faults. Walkability is eliminated while not leaking too much temporal info.

https://www.2ndquadrant.com/en/blog/sequential-uuid-generato...





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

Search: