Distributed unique ID generating program notes Comparative Analysis

This paper compares several distributed ID generation scheme, there are currently three manufacturers of temporary schemes to be included, they are: Baidu's UidGenerator, Leaf US group, the drops (Clementine) of TinyId.

Distributed generation ID, according to conclude the analysis of the current embodiment, there are two modes:

(1) Class snowflake pattern: ID 64 bit, to address the uniqueness of distribution worker Id can significantly improve the performance of this model. But usually have to face time call-back problem, this seems no solution, usually only to deal with "bypass" approach. Baidu's UidGenerator there is a realization known as single 600w qps, performance burst table.

(2) segment mode: dependency database rows, ID is not continuous over time, can not guarantee absolute continuous ID and the time relationship between the various services. Didi tinyid called up to 1000w qps in client mode, very tough. However, this model should be easy to guess the sales?

 

Currently notes as follows:

 

Finally there is a long-troubled question: Why ID is required ascending it?

Did less business, absolutely can not understand the concept of what is to be incremented ID, and distributed globally ID simply can not increase, unless the expense of QPS. Some studies students can actively comment ah! ! !

the above

Guess you like

Origin www.cnblogs.com/christmad/p/12076622.html