Uniqueness of resource Ids across multiple object types (orgs, users, projects...)
Do organization ids and user ids overlap? or are they all globally unique uint64 values? or I guess broader, are all resource ids unique in a zitadel installation regardless of the object they represent?
4 Replies
@FFO while we're trading answers, can I get this one answered? it's going to let me decide if I need to store
org/orgid
and user/userid
in my database outside of zitadel to reference the id, or if the global uniqueness is ensured, I'll just have the id and not need to differentiate with a prefix in the primary keyAll ids in zitadel are globally unique uint64 (aka sonyflakes) by default.
However people can use their own ids (which still must be globally unique) 😄
That’s good to know, was worried I’d get overlap of users and orgs!
Hehe, no that should not happen.
Sonyflake has a high resistance for collisions https://github.com/sony/sonyflake
GitHub
GitHub - sony/sonyflake: A distributed unique ID generator inspired...
A distributed unique ID generator inspired by Twitter's Snowflake - sony/sonyflake