Motivation

Millions of events can happen per second in a large distributed system. Commenting on a post on Facebook, sharing a Tweet, and posting a picture on Instagram are just a few examples of such events. We need a mechanism to distinguish these events from each other. One such mechanism is the assignment of globally unique IDs to each of these events.

Unique IDs are important for identifying events and objects within a distributed system. However, designing a unique ID generator within a distributed system is challenging.

Let’s look at the requirements for a distributed unique ID generation system and then the solutions to this design problem.

Requirements for unique identifiers

Level up your interview prep. Join Educative to access 80+ hands-on prep courses.