摘要
随着时代的发展,互联网业务量的提升,越来越多的公司使用了微服务,在此趋势下,分布式主键变得越来越重要。目前,分布式主键的实现方式较多,有基于数据库自增的、基于UUID的、基于Redis自增的、基于数据库号段的。同时,越来越多的公司开始普及使用雪花算法,但是在使用过程中,存在着很多不足:其一,无论什么样的分布式主键都有着各自的缺陷,不能满足日益复杂的使用场景;其二,在业务开发过程中,为了满足各种各样的主键需求,需要实现不同的分布式主键。这加大了开发难度,也容易在分布式主键上产生很多问题,需要一个统一的分布式主键生成系统,支持多种类型的分布式主键,优化现有的分布式主键存在的问题。
With the development of The Times and the increase of business volume, more and more companies have used micro services. In this trend, distributed primary keys are becoming more and more important. At present, there are many ways to implement distributed primary keys, including those based on database increment, UUID, Redis increment, and database number segment. At the same time, more and more companies are beginning to popularize the snowflake algorithm. However, in the process of use, there are many deficiencies. First, various distributed primary key implementations have their own shortcomings and cannot meet increasingly complex usage scenarios. Second, in the process of business development, in order to meet the various primary key requirements, you need to realize different distributed primary keys. This makes development more difficult and creates many problems with distributed primary keys. In order to solve these problems, it is necessary to implement a unified distributed primary key generation system. In this system, it is necessary to support multiple types of distributed primary keys and optimize the problems existing in the existing distributed primary keys. Greatly emancipate the productivity of business developers, improve the efficiency of company development.
作者
秦攀科
李有卿
Qin Panke;Li Youqing(School of Computing,Henan Polytechnic University,Jiaozuo 454000,China)
出处
《无线互联科技》
2022年第15期51-55,共5页
Wireless Internet Technology