Registration method and device of micro-service instance, computer equipment and storage medium

A technology of microservices and computer programs, applied in the field of microservices, can solve problems such as the inability to ensure the accuracy of microservice instance data written to Zookeeper, and achieve the effect of improving accuracy and ensuring accuracy

CN110224855AActive Publication Date: 2019-09-10PING AN TECH (SHENZHEN) CO LTD
7 Cites 14 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Publication Date
2019-09-10

Smart Images

  • Figure 1
    Figure 1
  • Figure 2
    Figure 2
  • Figure 3
    Figure 3
Patent Text Reader

Abstract

The invention discloses a registration method and device of a micro-service instance, computer equipment and a storage medium. The registration method for the micro-service instance comprises the steps of enabling a registration center to obtain an appointed service code started when registration of a first micro-service instance is started; decrypting the specified service code, and calling a first reference micro-service instance corresponding to the decrypted specified service code according to the decrypted specified service code, with the first reference micro-service instance being a micro-service instance registered in the registration center through the specified service code; judging whether the instance information of the first micro-service instance is consistent with the instance information of the first reference micro-service instance or not; and if yes, registering the first micro-service instance through the decrypted specified service code. A reference micro-service instance is introduced to provide a verification standard for a micro-service instance registered under a specified service code, and the verification standard is compared with context and uri in reference micro-service instance information for verification, so that the accuracy and effectiveness of verification are ensured on the premise of the minimum data calculation amount.
Need to check novelty before this filing date? Find Prior Art

Description

technical field

[0001] The present application relates to the field of microservices, in particular to a method, device, computer equipment and storage medium for registering microservice instances. Background technique

[0002] ZooKeeper is an open source distributed coordination service and an open source implementation of Google Chubby. Distributed applications can implement data publishing / subscribing, load balancing, naming services, distributed coordination / notifications, cluster management, Master election, configuration maintenance, name services, distributed synchronization, distributed locks, and distributed queues based on ZooKeeper. Features. At present, service instances can be registered in Zookeeper through the service code, and there is no verification process, resulting in the wrong service instance being registered under the existing correct service code, causing the consumer to use the wrong service instance, reducing calls to the consumer Data quality o...

Examples

Embodiment Construction

[0041] In order to make the purpose, technical solution and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present application, and are not intended to limit the present application.

[0042] refer to figure 1 , a method for registering a microservice instance in an embodiment of the present application, including:

[0043] S1: The registration center obtains the specified service code enabled when the first microservice instance starts registration, wherein the specified service code is encrypted by a preset encryption algorithm.

[0044]In this embodiment, when the consuming third party invokes the microservice instance of the server, it needs to know the instance information of the invoked microservice instance to make an effective invocation, but th...