This article explains how Guids are generated.
My question is that is there any way to find out which machine in my web farm generated this Guid and when?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Neil Fenwick is correct. However we can use the structure to our advantage.
Version 4 (.Net)
Version 4 UUIDs use a scheme relying only on random numbers. This algorithm sets the version number as well as two reserved bits. All other bits are set using a random or pseudorandom data source. Version 4 UUIDs have the form xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx where x is any hexadecimal digit and y is one of 8, 9, A, or B. e.g. f47ac10b-58cc-4372-a567-0e02b2c3d479.
Use the Version Field
We are free to change the first nibble of byte 8; so if you have less than 17 machines you can identify them by altering the GUIDs created on each one.
Use the Version Field and ‘y’
I am not sure if changing Y will alter the uniqueness of the GUID, so your mileage may vary. If you have less than 17 machines stick with the first solution.
Use the Version and ‘y’ (Redux)
You can still retain the value in ‘y’ by limiting the amount of machines to 63 (using the last 2 bits to represent the 4 possible values of ‘y’):
Use Version 1 GUIDs
You could also use version 1 GUIDs, as it’s still possible to generate them: