uniqueidentifier - how to generate unique and [pseudo] sequential GUIDs across multiple servers? -
we looking solutions generating ids per title of question.
for clarification:
- we using several different sql servers , application servers, of generating id
- we not want use central id-generating service/machine
- we not want use datetimes bitwise-converted guids because many machines there possibility of collision.
one possible solution assign each machine start position, skip, , offset, answer: https://stackoverflow.com/a/7916720/175127
this our solution, i'm hoping among might have more elegant solution better addresses of following issues:
one machine might end assigning lot more ids , skip far ahead of others. might resync machines have new start position every day keep them on pace each other, result in large amount of empty, unused ids. wish minimize this.
we wish see if it's possible decrease external dependency of each machine. @ start each have find out how many machines there are, start point is, , have decide on unique offsets. think having form of central control administer these things may unavoidable.
the best think of far have central machine distribute ranges of ids @ time. each other machine grabs range-blocks needed. if central machine goes down, use start-skip-offset system fallback.
got cool ideas so?
Comments
Post a Comment