Orbis UUID Generation, using Consistent Hashing in Erlang UUID - - PowerPoint PPT Presentation

orbis
SMART_READER_LITE
LIVE PREVIEW

Orbis UUID Generation, using Consistent Hashing in Erlang UUID - - PowerPoint PPT Presentation

Orbis UUID Generation, using Consistent Hashing in Erlang UUID [42-bit Timestamp, 12-bit Shard, 10-bit Sequence] Timestamp Use Unix Epoch, in milliseconds, with an offset. Subtract offset at generation time, add on decoding time.


slide-1
SLIDE 1

Orbis

UUID Generation, using Consistent Hashing in Erlang

slide-2
SLIDE 2

UUID

[42-bit Timestamp, 12-bit Shard, 10-bit Sequence]

slide-3
SLIDE 3

Timestamp

  • Use Unix Epoch, in milliseconds, with an offset.
  • Subtract offset at generation time, add on

decoding time.

  • Allows for enough values to outlive the lifetime of

the system itself.

slide-4
SLIDE 4

Sequence

  • Rolling sequence. Like serial in PostgreSQL.

One sequence counter per shard.

slide-5
SLIDE 5

Shard

  • Allows us to distribute our data out nicely to

multiple backend data stores.

  • We shard data early, in a sensible way, which

allows us to easily move data around later.

  • Each shard represents one worker in our ring of

workers.

slide-6
SLIDE 6

Consistent Hashing

2256 2256/2