3 ms·
Partition the keyspace among the systems up front... if that's a problem you've got. Makes sense though. Maybe the pain is worth the GUID solution if you're doi
by famousactress 15y ago
Partition the keyspace among the systems up front... if that's a problem you've got. Makes sense though. Maybe the pain is worth the GUID solution if you're doing id generation across a highly distributed set of machines.. like end-user boxes or something. But in a SAAS deployment where you might have a handful of DB masters, letting them all assign out a portion of a 64 bit keyspace is plenty fine.
- jpitz 15y agoWhat about in a peer-to-peer/multi master scenario where nodes can be added or removed at whim?
- famousactress 15y ago@jpitz - In those scenarios the keys can be pre-partitioned. Server A gets 0-N keys, Server B gets N-2N keys... If you have a situation where the peers pop up or come down dynamically, then you can build some sort of keymaster that does a sexier job allocating these blocks of keys to the nodes. If stuff is crazy dynamic, then I start to see value in the GUID.. but I frankly don't think most of us have problems that deserve them.
- jpitz 15y agoWith all due respect… a keymaster is just another component that can fail in a distributed system. GUIDs just work. I don't think I have an exceptional use case, and my nodes are dynamic in that very sense. Meta: I don't get why you are being downmodded, especially as I am being upvoted. Can someone help me understand why? Even though I disagree with you, famousactress, I do find your comments contributing to the discussion.
- famousactress 15y agoI think the downvoting is pretty natural. It's kind of flamebait to jump on a thread mostly about GUIDs and call them weird. Plus I was super busy yesterday and didn't really take the time to do a decent job communicating why I'm not reinventing the wheel, and why I think GUIDs present a poor tradeoff for most projects. So yeah, in general.. maybe a touch harsh, but I'd argue my comments weren't super high value.