Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Distributed service primary key generation method based on Mysql

A business primary key and distributed technology, applied in the field of distributed systems, can solve the problems that the self-incrementing ID of the database cannot meet the demand and the average delay is low, and achieve the effect of small business performance, high availability and high performance

Pending Publication Date: 2022-03-08
UNICLOUD (NANJING) DIGITAL TECH CO LTD
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0008] In addition to the above requirements, the ID generation function should try to ensure QPS, low average delay and other characteristics, and try not to affect the performance and high availability of the main business process. However, the auto-increment ID of the database in the existing distributed system cannot meet the requirements. need

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Distributed service primary key generation method based on Mysql

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0024] In order to make the technical means, creative features, goals and effects achieved by the present invention easy to understand, the present invention will now be further described in detail in conjunction with the accompanying drawings. These drawings are all simplified schematic diagrams, and only illustrate the basic structure of the present invention in a schematic manner, so they only show the relevant components of the present invention.

[0025] According to the technical solution of the present invention, without changing the spirit of the present invention, those skilled in the art can propose multiple structural modes and implementation modes that can be replaced with each other. Therefore, the following specific embodiments and drawings are only exemplary descriptions of the technical solution of the present invention, and should not be regarded as the entirety of the present invention or as a limitation or restriction on the technical solution of the present ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention relates to a Mysql-based distributed service primary key generation method, which comprises the following steps of: firstly selecting the time of an updating period which is greater than the time of a current machine, then selecting a large average value, and finally caching the workId data of the current service to a local file. According to the Mysql-based distributed service primary key generation method, the influence on service performance is relatively small, multiple services and multiple scenes can be supported to acquire unique representation IDs at the same time, related isolation can be carried out based on service identifiers, ID generation rules among the services do not influence one another, and high availability and high performance of micro-service services are supported. The local service is independently generated and can be correspondingly decoupled with the Mysql, and even if the Mysql cluster breaks down, the local service can work independently and is not affected by the Mysql cluster.

Description

technical field [0001] The invention relates to the technical field of distributed systems, in particular to a method for generating a distributed business primary key based on Mysql. Background technique [0002] In traditional relational databases, such as MySQL, the database itself has its own self-incrementing primary key generation mechanism. However, in a distributed environment, the single-table auto-incrementing primary key cannot be used after the data is horizontally split due to sub-database and table division. Therefore, we need a A globally unique id generation strategy is used as a distributed primary key. [0003] In a distributed system, the business composition is basically composed of multiple microservices with different functions. Each microservice has its own business process, and often needs to uniquely identify a large amount of data and messages. As the data grows day by day, the data sub-database After the table is divided, a unique ID is required t...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F16/23G06F16/2455G06F16/27
CPCG06F16/23G06F16/24552G06F16/27
Inventor 杨志鹏
Owner UNICLOUD (NANJING) DIGITAL TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products