notexOPENOverview
Notex/Systems/UUID
07.05LESSON 05 OF 9 · 1 MIN READ

UUID

Always free to read
SECTION VIDEOUUID

Video coming soon. Start with the reading below.

COMING SOON

A UUID is another easy way to obtain unique IDs. UUID is a 128-bit number used to identify information in computer systems. UUID has a very low probability of getting collusion. Quoted from Wikipedia, “after generating 1 billion UUIDs every second for approximately 100 years would the probability of creating a single duplicate reach 50%” [1].

Here is an example of UUID: 09c93e62-50b4-468d-bf8a-c07e1040bfb2. UUIDs can be generated independently without coordination between servers. Figure 7-3 presents the UUIDs design.

Design a unique ID generator in distributed systems — original diagram 93

In this design, each web server contains an ID generator, and a web server is responsible for generating IDs independently.

Pros:

  • Generating UUID is simple. No coordination between servers is needed so there will not be any synchronization issues.
  • The system is easy to scale because each web server is responsible for generating IDs they consume. ID generator can easily scale with web servers. Cons:
  • IDs are 128 bits long, but our requirement is 64 bits.
  • IDs do not go up with time.
  • IDs could be non-numeric.
Progress is saved on this device.
KEEP EXPLORING

One note leads to another.

Back to the library →
⌕
Search across the entire library ⌘ K