Distributed efficient ordered ID production black technology (sequence): it can produce up to 4.18 million ordered IDs per second, that is, TPS=400w/s.
Efficient GUID generation algorithm (sequence), based on Snowflake, implements 64-bit auto-incrementing ID algorithm. New features
Supports customizing the range of allowed time callbacks
Solve the situation where the starting value across milliseconds starts from 0 each time (to avoid the problem that the end must be an even number, which is inconvenient for remainder use)
Solve the performance problem of obtaining timestamps in high concurrency scenarios
The background of the Twitter-Snowflake algorithm is quite simple. In order to satisfy Twitter's request for tens of thousands of messages per second, each message must be assigned a unique ID. These IDs also need to be in some rough order (to facilitate client sorting), and in IDs generated by different machines in a distributed system must be different.