Micro-service health examination method and storage medium
A health check and micro-service technology, applied in the field of micro-service, can solve time-consuming problems, achieve the effect of reducing the amount of scanning, improving the efficiency and convenience of checking, and the effect of simple implementation
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0073] Please refer to figure 2 , the present embodiment provides a microservice health check method, which is used to efficiently and simply monitor whether the microservice times out in real time. The method can include:
[0074] S1: After the microservice starts, send its own intranet IP and port number to the registration center.
[0075] Each microservice has its own unique intranet IP and port number. Every time the microservice is started, it will send its own intranet IP + port to the registration center, and the registration center will record it in the registration list. The key of the registration list is the intranet IP + colon + port number of the microservice. This key is the unique identification mark of a microservice.
[0076] S2: The registration center adds a new record in the heartbeat list (the old table in this article), the key value of the record is the received intranet IP and port number, and the value value is the latest heartbeat packet received...
Embodiment 2
[0097] This embodiment provides a specific application scenario based on the method of Embodiment 1:
[0098] Assume that there are three microservices, A, B, and C, all of which register information with the registration center. Their ips are all 192.168.0.1, and their port numbers are 8001, 8002, and 8003, respectively. Then the unique identifiers of these three microservices are "192.168.0.1:8001", "192.168.0.1:8002" and "192.168.0.1:8003".
[0099] When they register in the registration center, they will first add the registration list records, and the keys corresponding to the three records correspond to the unique identification marks of the above three microservices.
[0100] After that, add the records of the heartbeat list (old table). The data structure of the old table is: key is the unique identification mark of the microservice, and value is an object. The list of fields in the object is as follows: new_key (represents the key information in the new table) , this...
Embodiment 3
[0104] This embodiment corresponds to Embodiment 1 and Embodiment 1, and provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, it can implement the above-mentioned embodiment 1 or embodiment 2. The steps included in a method for microservice health check. The specific steps will not be repeated here, please refer to the descriptions of Embodiment 1 and Embodiment 2 for details.
[0105] In summary, the method and storage medium for microservice health check provided by the present invention can greatly reduce the number of traversals in each round, greatly improve the check efficiency while ensuring the check accuracy; furthermore, it can also obviously Save resources and improve service performance; finally, it also has the advantages of easy implementation and less memory usage.
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