Service registration and service discovery method for micro-service
A technology of service discovery and service registration, applied in the management field of external registry of microservices, which can solve the problems of registry downtime, external registry downtime, and difficulty in managing nodes at the same time.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0105] Embodiment 1: It is now assumed that node C is the bootstrap node; for the convenience of description, it is assumed that the order of starting the five nodes is A, C, B, D, E. That is, when node A starts to send a PING message to C, C has not yet started and there is no response, A will retry after a timeout; while when BCDE sends a PING, C has started and will respond immediately, so BDE will start sending query service messages first. Such as figure 1 Shown is the flow chart of a query node query service. Assuming that the three nodes of BDE send query service messages in sequence, the following is a detailed description of the query service process:
[0106] Node B needs to consume service 1000, send B(1000) query service message to node C, and the forwarding flag is true. After node C receives B(1000)'s query service message, it queries its own service list HashMap and finds that it does not contain a value with a key of 1000, that is, it does not find the target...
Embodiment 2
[0109] Embodiment 2: Node D provides service 1101 and needs to consume services 1010 and 1000 at the same time. Assume that they send query service messages D(1101), D(1010), and D(1000) to node C in sequence, and the forwarding flag is true:
[0110] (1) After node C receives the query service message from D (1101), C's service list HashMap does not contain the value of key 1101, and the target service information is not found, so there is no need to send a registration message; it does not contain the value of key 1100 (after the last digit of 1101 is negated), that is, C is not a consumer of service 1101, and does not need to reply to a registration message, nor can it be added to the service list.
[0111] The service ID of D(1101) is 1101, the node ID of C node is 1111, their XOR distance is 1101 ⊕1111=0010, the range is [2^1,2^2), that is, the service route with the attribution sequence number 1 Table, take out the value of key 1 from the service routing table HashMap, ...
Embodiment 3
[0123] Embodiment 3: E-nodes need to consume services 1100 and 1000. Assume that they send query service messages E(1100), E(1010) to node C in sequence, and the forwarding flag is true. according to figure 1 After the query process and the above two points are processed, the service list and service routing table of the BCDE node are as follows: Figure 7 As shown in , the service lists and service routing tables of other A nodes not shown are empty.
[0124] Among them, it needs to be explained that when E(1000) joins the service routing table with the serial number of node C being 2, the routing table has two service ID information that are full: D(1010) and D(1000). Because the node IDs of D(1010) and D(1000) are the same as the XOR distance of node C, they are both 1001⊕1111=0110, so one can be randomly selected as the "maximum" here, and D(1000) is selected in this example ; The XOR distance between E node and C node is 1100⊕1111=0011, obviously 0110 is larger than 00...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com