This article is a mirror article of machine translation, please click here to jump to the original article.

View: 25989|Reply: 1

[Source] ID number generates snowflake algorithm

[Copy link]
Posted on 9/12/2019 6:02:10 PM | | |
Twitter's distributed snowflake algorithm, SnowFlake, automatically generates 260,000 sortable IDs per second
1. Twitter's SnowFlake generation ID can be generated in an orderly manner according to time
2. The result of the id generated by the SnowFlake algorithm is a 64-bit integer
3. Duplicate IDs will not be generated in the distributed system (datacenterId and machineId are used to distinguish them)
datacenterId (distributed) (service ID 1,2,3.....) Write dead in each service
machineId (for clusters) reads the environment variable MACHINEID of the machine, which is different for each server when deployed







Previous:asp.net core writes a middleware to record the interface time
Next:A complete set of data packages for competency model construction and training
Posted on 9/16/2019 9:55:38 AM |
This awesome 'famous snowflake algorithm...
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com