c# - Can I rely on a GUID strategy to create unique folders on a SAN shared by multiple cloned Windows servers? -
[note reaching duplicate button: july 2017. there near duplicates question past, part of reason raising question illuminate whether answer has changed on time technology has changed. also, question more how create reliably unique folders @ speed on san multiple cloned web servers. cannot find duplicate of question happy pointed @ recent example.]
question - there pragmatic potential multiple cloned ms 2008+ servers produce same guid value?
context:
i investigating creation of unique folders multiple servers on shared san. imagine web farm many web servers using same file storage. [please refrain 'why that' responses.]
this c# / dot net based solution running on ms windows server 2008+.
the natural tool reach guid gives minimal overhead assuming no physical check folder of given guid on disk (because introduce time-costly network , disk reading overhead).
however, guid viable if guid unique cross-servers.
research:
in question 2008, poster asked uniqueness of uuid / guid.
in this question 2009 performance of ms guid's discussed.
i know of old 'random' functions in computers seeded , therefore not random. read guid generated partly device mac address , therefore have firm chance of uniqueness. read use of mac address retired, leads me go considering old 'rnd()' seeding issue or equivalent , ponder impact of uniqueness in practical terms across multiple servers.
and proponents of stats related uuid's, couple of responses found during research mention birthday paradox. wonder practical impact has across multiple servers.
potentially useful question on path.getrandomfilename v's guid.newguid.
dot net pearls has interesting article on performance of algorithm behind path.getrandomfilename.
during research found lot of cases of people talking probability of guid clash being vanishingly small. since keep buying lottery tickets guess convinced vanishingly small chances can occur.
as reminder, need have approach multiple windows servers creating unique folders on shared san. questions use of guid alone, , conclude, whilst accepting slim chance, clash occur.
my approach here assign each server unique server id in config, , have id pre-pended folder name. use dot net
path.getrandomfilename()
function generate second component of folder names. this, believe, give me 100% unique folder names, though instance-rollout script bit more involved. see this link info on getrandomfilename().
Comments
Post a Comment