Skip to content

lynixwuff/wereflake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wereflake

Wereflake is a high-performance server designed to generate unique Snowflake IDs efficiently and reliably using the /snowflake endpoint. Snowflake IDs are 64-bit integers that provide globally unique identifiers with chronological ordering, making them ideal for distributed systems and scalable architectures.

Snowflake ID Structure

The 64-bit Snowflake ID is composed of the following fields:

+---------------+---------------+---------------+---------------+
| 1 bit         | 41 bits       | 10 bits       | 12 bits       |
+---------------+---------------+---------------+---------------+
| Unused        | Timestamp     | Machine ID    | Sequence      |
+---------------+---------------+---------------+---------------+
Field Bits Description
Unused 1 Reserved bit, always set to 0; ensures the ID is positive.
Timestamp 41 Milliseconds since a custom epoch; ensures chronological ordering.
Machine ID 10 Unique identifier for the machine or node generating the ID.
Sequence 12 Incrementing counter within the same millisecond to prevent collisions.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages