Distributed Systems

Generate A Unique Id

  1. auto increment -> works on a single node
  2. id server -> single point of failure
  3. UUID -> not sortable
  4. Custom sortable id -> timestamp + data center id + machine id + sequence number