Add a 128 byte k-ordered id generator #610

Closed
wants to merge 1 commit into
from

Projects

None yet

1 participant

@pyr
Contributor
pyr commented Jul 30, 2012

Now that sentinel is coming along I'd like to reintroduce this PR
it operates in the same cluster ordering space (though it is
orders of magnitude simpler). For simple setups avoid the
installation of snowflake or similar tools has a lot of merit.

This was the original PR text:

This is similar to what snowflake and the recent boundary
solution do, but it makes sense to use redis for that type
of use cases for people wanting a simple way to get
incremental ids in distributed systems without an additional
daemon requirement.

Unique IDs are composed as follows:

epoch seconds: 4 bytes
epoch mseconds: 4 bytes
host name: 6 bytes
sequence id: 2 bytes
host name is truncated to 6 chars, so the appropriate config
directive id-generation-name should be set on each machines
wanting to yield ids if truncating hostname do 6 chars does
not suffice.

@pyr pyr Now that sentinel is coming along I'd like to reintroduce this PR
it operates in the same cluster ordering space (though it is
orders of magnitude simpler). For simple setups avoid the
installation of snowflake or similar tools has a lot of merit.
9418991
@pyr
Contributor
pyr commented Jul 9, 2014

no reply, closing this

@pyr pyr closed this Jul 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment