A lightweight microservice configuration method

A configuration method and micro-service technology, applied in version control, electrical components, transmission systems, etc., can solve problems such as complex deployment, time-consuming and labor-consuming, low learning costs, etc., and achieve the effect of convenient service deployment

Active Publication Date: 2022-04-05
BEIJING VRV SOFTWARE CO LTD
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

In order to meet the needs of modern industries, there is an obvious trend that the current services are getting bigger and bigger, and occupying more and more server resources, so distributed services appear to relieve server pressure, but each service needs to be Configuring separately is time-consuming and labor-intensive, and it is also contrary to one of the purposes of microservices to "reduce configuration". Therefore, a distributed configuration center has emerged to solve the problem of unified configuration of distributed services.
[0003] Currently, some solutions for centralized configuration of distributed services are gradually maturing, but because they are troublesome from the development stage, such as complex deployment, a large number of redundant functions, low learning costs, and even some solutions themselves are Its configuration center consists of multiple services. For example, Apollo, which is currently popular in the market, is an open source configuration management center developed by Ctrip’s framework department. However, its solution itself takes up a lot of manpower and server resources, and is not available Due to its complex business system requirements, some distributed configuration centers on the Internet have to rely on designated third-party middleware (databases, etc.) to run normally, which will greatly limit the scope of their use and cannot be applied to all scenarios

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
  • A lightweight microservice configuration method
  • A lightweight microservice configuration method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0027] Embodiment 1 of the present invention provides a structural schematic diagram of a lightweight microservice configuration center, as shown in figure 1 As shown, there are three microservices of microservice A, microservice B, and microservice C, and a configuration center, in which there are public configuration and three microservices of microservice A, microservice B, and microservice C The corresponding microservice A configuration, microservice B configuration and microservice C configuration are three private configurations; the three microservices have two interfaces, the first interface is the service registration interface, which is used to send the registration request of the microservice to the The configuration center; the second interface is a configuration update interface, which is used to send the updated configuration item value to the microservice through the second interface when the value of the configuration item in the configuration center is updated...

Embodiment 2

[0029] Embodiment 2 of the present invention provides a flow chart of a lightweight microservice configuration method, as shown in figure 2 As shown, the method includes the following steps:

[0030] Step S101, build a server and start the configuration center service with one click;

[0031] The conventional configuration center itself needs to configure addresses such as databases and service management centers. To run this configuration center service, you only need the most basic commands to run ordinary jar (packages typed out of the configuration center project) files to start this configuration The center does not need to configure any additional configuration, the most common is the java -jar file name (a command to run the project).

[0032] Step S102, configuring the configuration center address and the microservice ID in the microservice, where the microservice ID is the unique identity of the microservice;

[0033] Step S103, the microservice sends a registratio...

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 present invention discloses a lightweight microservice configuration method, the method comprising: setting up a server and starting a configuration center service with one key; configuring the address of the configuration center and the ID of the microservice in the microservice; The service ID is the unique identity of the microservice; the microservice sends a registration request containing the microservice ID to the configuration center through the first interface, and the configuration center, after receiving the registration request, according to The microservice ID returns corresponding configuration items to the microservice through the second interface; the microservice receives and caches the configuration items. Through the method of the present invention, the core function of the distributed configuration center can be provided at the same time under the condition of simple development, one-key deployment, no dependence on third-party middleware, and minimal occupation of system resources.

Description

technical field [0001] The invention relates to the technical field of distributed applications, in particular to a lightweight microservice configuration method. Background technique [0002] With the vigorous development of computer networks, computers have penetrated into people's lives. In order to meet the needs of modern industries, there is an obvious trend that the current services are getting bigger and bigger, and occupying more and more server resources, so distributed services appear to relieve server pressure, but each service needs to be Configuring separately is time-consuming and labor-intensive, and it is also contrary to one of the purposes of microservices to "reduce configuration". Therefore, a distributed configuration center has emerged to solve the problem of unified configuration of distributed services. [0003] Currently, some solutions for centralized configuration of distributed services are gradually maturing, but because they are troublesome fr...

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 Patents(China)
IPC IPC(8): H04L41/50H04L67/10G06F8/71
CPCH04L41/50H04L67/10G06F8/71
Inventor 林皓吴凯赵永强袁剑余伟陈曦冯艳
Owner BEIJING VRV SOFTWARE CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products