CN112860342A - Method, device, equipment, system and storage medium for microservice configuration - Google Patents

Method, device, equipment, system and storage medium for microservice configuration Download PDF

Info

Publication number
CN112860342A
CN112860342A CN202110185215.5A CN202110185215A CN112860342A CN 112860342 A CN112860342 A CN 112860342A CN 202110185215 A CN202110185215 A CN 202110185215A CN 112860342 A CN112860342 A CN 112860342A
Authority
CN
China
Prior art keywords
service
data
cluster
service data
configuration data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110185215.5A
Other languages
Chinese (zh)
Other versions
CN112860342B (en
Inventor
刘超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202110185215.5A priority Critical patent/CN112860342B/en
Publication of CN112860342A publication Critical patent/CN112860342A/en
Priority to EP21925429.9A priority patent/EP4113290A4/en
Priority to KR1020227034296A priority patent/KR20220140869A/en
Priority to JP2022559897A priority patent/JP7450750B2/en
Priority to PCT/CN2021/123921 priority patent/WO2022170782A1/en
Application granted granted Critical
Publication of CN112860342B publication Critical patent/CN112860342B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Stored Programmes (AREA)

Abstract

The disclosure relates to a method, a device, equipment, a system and a storage medium for micro-service configuration, relating to the technical field of computers, in particular to the fields of cloud computing, internet of things and the like. The specific implementation scheme is as follows: receiving configuration data from a master cluster; under the condition that the service data in the main cluster are determined to be changed, sending a service data acquisition request to the main cluster, and receiving the service data from the main cluster; and executing the service management task according to the configuration data and the service data. According to the scheme of the disclosure, the service cluster can acquire the service data in an active acquisition mode. The method has the advantages that the load of the main cluster can be reduced, and particularly, the stability of the main cluster can be greatly improved under the condition that the number of service clusters is large.

Description

Method, device, equipment, system and storage medium for microservice configuration
Technical Field
The present disclosure relates to the field of computer technology, and in particular, to the fields of cloud computing, internet of things, and the like.
Background
With the rapid development of cloud native technology and the large-scale practice of micro-services, Service Mesh technology (Service Mesh) is receiving more and more attention and is favored.
In contrast to monolithic applications, the microservice architecture splits monolithic applications into multiple microservice components with a clear-of-responsibility goal. When there are many micro service components, the problem of untimely configuration or wrong configuration of the micro service may occur. Thereby affecting the stability of the microservice architecture operation.
Disclosure of Invention
The present disclosure provides a method, apparatus, device, system, and storage medium for microservice configuration.
According to an aspect of the present disclosure, a method for micro service configuration is provided, which is applied to a service cluster, and the method may include the following steps:
receiving configuration data from a master cluster; under the condition that the service data in the main cluster are determined to be changed, sending a service data acquisition request to the main cluster, and receiving the service data from the main cluster;
and executing the service management task according to the configuration data and the service data.
According to another aspect of the present disclosure, there is provided a method of microservice configuration, applied to a primary cluster, the method may include the steps of:
under the condition that the configuration data is changed, sending the changed configuration data to each service cluster;
and under the condition of receiving a service data acquisition request of at least one service cluster, sending service data corresponding to the service data acquisition request to the corresponding service cluster.
According to a third aspect of the present disclosure, there is provided an apparatus of microservice configuration, the apparatus may include:
a control plane component for receiving configuration data from the master cluster;
the data plane component is used for sending a service data acquisition request to the main cluster and receiving service data from the main cluster under the condition that the service data in the main cluster is changed;
and the data plane component is also used for executing service administration tasks according to the configuration data and the service data.
According to a fourth aspect of the present disclosure, there is provided an apparatus of microservice configuration, the apparatus may include:
the configuration center component is used for sending the changed configuration data to each service cluster under the condition that the configuration data is changed;
and the registration center component is used for sending the service data corresponding to the service data acquisition request to the corresponding service cluster under the condition of receiving the service data acquisition request of at least one service cluster.
According to a fifth aspect of the present disclosure, there is provided a microservice system, which may include:
at least one service cluster, each service cluster being configured to execute the method for micro-service configuration applied to the service cluster;
and the main cluster is used for executing the method applied to the micro-service configuration of the main cluster.
According to another aspect of the present disclosure, there is provided an electronic device including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a method according to any one of the embodiments of the present disclosure.
According to another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing a computer to perform a method in any of the embodiments of the present disclosure.
According to another aspect of the present disclosure, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the method in any of the embodiments of the present disclosure.
According to the scheme of the disclosure, the service cluster can acquire the service data in an active acquisition mode. The method has the advantages that the load of the main cluster can be reduced, and particularly, the stability of the main cluster can be greatly improved under the condition that the number of service clusters is large.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is a flow chart of a method applied to micro-service configuration of a service cluster according to the present disclosure;
FIG. 2 is a flow chart of sending a service data acquisition request according to the present disclosure;
FIG. 3 is a flow chart for determining whether a change has occurred to service data according to the present disclosure;
FIG. 4 is a flow chart of performing a service governance task according to the present disclosure;
FIG. 5 is a flow chart of a method applied to micro-service configuration of a master cluster according to the present disclosure;
FIG. 6 is a flow chart for sending service data according to the present disclosure;
FIG. 7 is a flow chart for sending configuration data according to the present disclosure;
FIG. 8 is a schematic diagram of an apparatus corresponding to a microservice configuration of a service cluster in accordance with the present disclosure;
FIG. 9 is a schematic diagram of an apparatus corresponding to a microservice configuration of a master cluster in accordance with the present disclosure;
FIG. 10 is a schematic diagram of a microservice system according to the present disclosure;
FIG. 11 is a block diagram of an electronic device used to implement methods of microservice configuration of embodiments of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
As shown in fig. 1, the present disclosure provides a method for micro service configuration, which is applied to a service cluster, and the method may include the following steps:
s101: receiving configuration data from a master cluster; under the condition that the service data in the main cluster are determined to be changed, sending a service data acquisition request to the main cluster, and receiving the service data from the main cluster;
s102: and executing the service management task according to the configuration data and the service data.
In the micro service architecture related to the present disclosure, a main cluster and at least one service cluster may be included. The service cluster can acquire data from the main cluster in an active acquisition mode and a passive acquisition mode, and then execute a service management task by using the acquired data.
At least a control plane component and a data plane component having upstream and downstream communication logic can be included in the service cluster.
The control plane component is used for pushing service data and configuration data to the data plane component. The control surface component may include a Pilot component.
The data plane components may include Sidecar (Sidecar) components and microservice programs, with which the Sidecar components may be deployed. That is, one microserver is deployed for one sidecar component.
The sidecar assembly is used for taking over all traffic entering and exiting the micro-service program so as to execute service administration business. For example, service governance traffic may include service routing, service throttling, service fusing, fault injection, traffic replay, and the like.
The configuration data may be obtained using a long connection. That is, when the configuration data is changed, the service cluster receives the changed configuration data actively issued by the main cluster.
On the other hand, the service cluster may adopt an active polling manner to determine whether a service data change occurs in the master cluster. Service data changes may include user modifications, deletions, and/or upgrade updates to the service data, etc.
The specific manner of determining the change may include detecting the change action of the user in real time, comparing and detecting the service data at regular time, and acquiring the service data change actively notified by the user.
The service cluster may actively send a service data acquisition request to the master cluster when it is determined that the service data in the master cluster has changed. The master cluster may determine, in a case where the service data acquisition request is received, service data corresponding to the service data acquisition request according to content of the service data acquisition request. And sending the service data corresponding to the service data acquisition request to the service cluster.
And the service cluster can execute the service management task according to the configuration data and the service data under the condition of receiving the service data sent by the main cluster.
Compared with the situation that the configuration data and the service data are all actively issued by the main cluster, by the scheme of the application, the service cluster can acquire the service data in an active acquisition mode. The method has the advantages that the load of the main cluster can be reduced, and particularly, the stability of the main cluster can be greatly improved under the condition that the number of service clusters is large.
As shown in fig. 2, in an embodiment, the sending a service data acquisition request to the master cluster when a change in service data in the master cluster is detected in step S102 may specifically include the following steps:
s201: determining required service data;
s202: under the condition that the service data in the main cluster are determined to be changed, the changed service data are compared with the required service data to obtain a comparison result;
s203: and sending a service data acquisition request to the main cluster under the condition that the comparison result meets a preset condition.
The required service data may be determined according to configuration information preset by the user, or may be determined according to instructions given by the user in advance. For example, the service data required by each micro service program may be determined according to the number of the micro service programs and the corresponding functions of each micro service program. The service data required by each micro-service program can be used as the service data required by the service cluster.
In case of multiple service clusters, each service cluster may determine the required service data separately.
The service cluster may periodically send service data change inquiry information to the master cluster to determine whether a change occurs in the service data in the master cluster. For example, the service cluster may determine that a change occurs in the service data in the primary cluster upon receiving a reply of "the service data has changed" or "the XX type of service data has changed" of the primary cluster. Or, the service data list acquisition request may be sent to the master cluster, and when there is a difference between contents in the service data lists received twice, it may be determined that the service data in the master cluster has changed.
And under the condition that the service data in the main cluster is determined to be changed, comparing the changed service data with the required service data to obtain a comparison result. And sending a service data acquisition request to the main cluster under the condition that the comparison result meets a preset condition.
The above confirmation process of whether the service data in the main cluster is changed or not may be performed by a sidecar component in the service cluster.
For example, the service cluster of the a zone includes three sidecar assemblies, i.e., a1, a2, and A3. The first sidecar assembly a1 is co-deployed with APP1, the second sidecar assembly a2 is co-deployed with APP2, and the third sidecar assembly A3 is co-deployed with APP 3. The first sidecar assembly a1 may determine that class a1 data is the service data required by APP1, the second sidecar assembly a2 may determine that class a2 data is the service data required by APP2, and the third sidecar assembly A3 may determine that class A3 data is the service data required by APP 3. If all three sidecar components determine that only the a2 service data is changed, only the second sidecar component a2 may send a service data acquisition request to the master cluster to request acquisition of the a2 service data.
For another example, when all of the three types a1, a2, and A3 of service data are changed, the first edge vehicle module a1 sends a service data acquisition request to the master cluster to request acquisition of the type a1 of service data. The second sidecar component A2 sends a service data acquisition request to the master cluster requesting acquisition of class A2 service data. The third trilateral component A3 sends a service data acquisition request to the master cluster requesting acquisition of class A3 service data.
Through the scheme, under the condition that the service data is changed, the service cluster can perform the service data acquisition request through the required service data. Compared with the prior art that all the updating data is acquired when the service data is updated, the scheme can reduce the data transmission amount. Especially for a multi-cluster scene, the stability of the micro-service system can be improved.
As shown in fig. 3, in an embodiment, the determining of the manner in which the change occurs in the service data in the primary cluster in step S202 may further include the following steps:
s301: periodically polling service data in the master cluster;
s302: and determining that the service data in the main cluster is changed under the condition that the difference of the two polling results exceeds the corresponding threshold value.
Each sidecar component in the service cluster can periodically send polling information to the main cluster to obtain a polling result fed back by the main cluster. And under the condition that the difference of the two successive polling results exceeds the corresponding threshold value, the service data in the main cluster can be determined to be changed.
Illustratively, the corresponding threshold may be a degree of difference exceeding 10%. Alternatively, weights of different parameters in the service data may be set, and in the case where a change occurs in a parameter of a high weight, it may be determined that a change occurs in the service data in the master cluster.
By the scheme, the change condition of the service data can be determined flexibly and quickly.
As shown in fig. 4, in one embodiment, the step of performing the service governance task according to the configuration data and the service data involved in step S102 may include the following sub-steps:
s401: determining a service instance of each micro-service program by using the service data;
s402: determining parameters in the service instance using the configuration data;
s403: and executing the service administration task of each micro-service program according to the service instance of each micro-service program and the parameters in the service instance.
The service data may be used to characterize service instances of microservers in the business cluster. A service instance may be a specific function performed by a microserver. Taking the micro-service architecture as a shopping scene as an example, according to the received service data, the service examples of the micro-service program can be determined to comprise commodity information inquiry, shopping cart, bill settlement, logistics inquiry and the like.
In a business cluster, a plurality of micro service programs can be included, and each micro service program can correspond to a service instance.
The configuration data may correspond to parameters in the service instance, for example, it may be clear that the bill settlement microserver may retrieve data from the shopping cart microserver, but not from the logistics microserver. Also for example, the configuration data may be a communication connection attempt time threshold for a shopping cart microserver and a billing microserver, and the like.
For example, the sidecar component deployed together with the logistics micro-service program can control the logistics micro-service program to call the information of the settled goods in the bill settlement micro-service program, so that the logistics state of the settled goods can be inquired in the logistics micro-service program. For another example, the sidecar component may control retry of the communication attempt or stop the communication connection attempt when the communication connection attempt time of the shopping cart microserver and the billing microserver exceeds the communication connection attempt time threshold.
The above description is only exemplary of the objects included in the service data and the configuration data, and the content is not limited thereto.
The sidecar component can realize the service administration task of the micro service program deployed together with the sidecar component according to the service data and the configuration data.
In one embodiment, the service clusters are multiple and are respectively arranged in different regions; the service governance tasks executed by the service clusters of each region are the same.
Through the service clusters in different regions, the near access principle of the user can be met, and therefore the use experience of the user is improved. Still taking the shopping scenario as an example, for example, the user living in beijing may preferentially counterfeit-proof the service cluster set in beijing, so that the user living in beijing may obtain a higher access response.
In addition, service clusters in different regions can form different places and multiple services, and even if a certain service cluster fails, the whole stable operation of the micro-service architecture can still be guaranteed.
Because the method for actively acquiring the service data by the service cluster is adopted, the method can meet the requirement of large-scale service instances even for a scene with multiple clusters,
as shown in fig. 5, the present disclosure relates to a method of microservice configuration, applied to a master cluster, which may include the steps of:
s501: under the condition that the configuration data is changed, sending the changed configuration data to each service cluster;
s502: and under the condition of receiving a service data acquisition request of at least one service cluster, sending service data corresponding to the service data acquisition request to the corresponding service cluster.
The main function of the main cluster is to receive the service data and configuration data of the user and send them to each service cluster.
For configuration data, the master cluster may determine whether the configuration data is changed by using the configuration center component in an active polling detection manner or a passive receiving notification manner. The change may include editing, deleting, or updating, etc.
And under the condition that the configuration data is changed, actively transmitting the configuration data to each service cluster. Through the scheme, the configuration data can be shared among all the service clusters, and interconnection and intercommunication and common service management of all the service clusters can be realized. The configuration data may include Custom Resource type (CRD) data.
Additionally, the master cluster may receive a request for a service cluster using the registry component. Under the condition that a service data acquisition request of any service cluster is received, the service data corresponding to the service data acquisition request can be determined through the analysis of the service data acquisition request of the service cluster. And generating service data corresponding to the service data acquisition request to the corresponding service cluster.
Through the scheme, the main cluster can determine the corresponding service data according to the request only when receiving the request of the service cluster. Compared with the mode of active issuing of the main cluster, the scheme of the application can avoid redundancy of service data issuing to the maximum extent. The load of the main cluster can be reduced, and particularly, the stability of the main cluster can be greatly improved under the condition that the number of the service clusters is large.
As shown in fig. 6, in an embodiment, in the case that a service data acquisition request of at least one service cluster is received, the sending of service data corresponding to the service data acquisition request to the corresponding service cluster in S502 includes:
s601: performing adaptation processing on the received service data acquisition request of at least one service cluster to obtain an adaptation processing result;
s602: determining service data corresponding to the service data acquisition request according to the adaptation processing result;
s503: and sending the service data corresponding to the service data acquisition request to the corresponding service cluster.
The master cluster may receive user-edited business data using the registry component. Common registry components for micro-services that obtain service data include a variety of, for example, zk (zookeeper), Eureka, Consul, Nacos, and the like.
Since these registry components are developed and implemented by different vendors, there is currently no corresponding data model standard, which results in a need to implement different docking schemes for different registry components. To mask data model variability across multiple Registry components, the present disclosure introduces a Registry Proxy element (Registry Proxy) component. In the registry proxy unit component, data models of different registry components may be stored in advance. Based on this, the main cluster may adapt the service data acquisition request by using the registry proxy unit component when receiving the service data acquisition request sent by any service cluster.
According to the adaptation processing result, the docking with different registry components can be realized, so that the service data corresponding to the service data acquisition request is determined in the corresponding registry component.
In a case where the service data corresponding to the service data acquisition request is determined, the service data corresponding to the service data acquisition request may be sent to the corresponding service cluster.
By the scheme, the difference of different registries can be overcome by using the registry proxy unit.
As shown in fig. 7, in an embodiment, when the configuration data is changed in S501, sending the changed configuration data to each service cluster may specifically include the following steps:
s701: comparing the received configuration data with the stored configuration data to obtain a comparison result;
s702: updating the stored configuration data into the received configuration data when the comparison result is that the received configuration data is different from the stored configuration data;
s703: and taking the received configuration data as changed configuration data, and sending the changed configuration data to each service cluster.
The configuration center component can retrieve the stored configuration data each time the configuration center component receives the configuration data, and compare the received configuration data with the stored configuration data to obtain a comparison result.
In the case that the comparison result is that the two are different, it can be determined that the user has changed the configuration data. Therefore, the stored configuration data can be updated to the received configuration data, and the received configuration data is taken as changed configuration data and is sent to each service cluster.
Whether or not the comparison result is changed may be based on whether or not a difference occurs, may be based on the degree of difference, may be based on whether or not a difference occurs in important data or high-weight data, or the like.
By the scheme, the configuration data can be issued as soon as the configuration data is changed. And searching the distribution times of the configuration data to a certain extent.
As shown in fig. 8, the present application provides a device for micro service configuration, where the device may specifically include, for a service cluster:
a control plane component 801 for receiving configuration data from the master cluster;
the data plane component 802 is configured to send a service data acquisition request to the master cluster and receive service data from the master cluster when service data in the master cluster is changed;
and the data plane component is also used for executing service administration tasks according to the configuration data and the service data.
In one embodiment, the data plane component 802 includes a sidecar component, which may further include:
a service data determination unit for determining required service data;
the service data comparison unit is used for comparing the changed service data with the required service data to obtain a comparison result under the condition that the service data in the main cluster is determined to be changed;
and the service data acquisition request sending unit is used for sending a service data acquisition request to the main cluster under the condition that the comparison result meets the preset condition.
In an embodiment, the service data comparing unit may be specifically configured to:
periodically polling service data in the master cluster;
and determining that the service data in the main cluster is changed under the condition that the difference of the two polling results exceeds the corresponding threshold value.
In one embodiment, the data plane component 802 includes a sidecar component, which may further include:
a service instance determining unit for determining a service instance of each micro-service program by using the service data;
a parameter determination unit for determining parameters in the service instance using the configuration data;
and the service administration task execution unit is used for executing the service administration task of each micro service program according to the service instance of each micro service program and the parameters in the service instance.
In one embodiment, the service clusters are multiple and are respectively arranged in different regions; the service governance tasks executed by the service clusters of each region are the same.
As shown in fig. 9, the present application provides a device for micro service configuration, where the device may specifically include, for a master cluster:
a configuration center component 901, configured to send changed configuration data to each service cluster when the configuration data is changed;
the registry component 902 is configured to, when receiving a service data acquisition request of at least one service cluster, send service data corresponding to the service data acquisition request to the corresponding service cluster.
In one embodiment, the registry component 902 can further include:
a registry agent unit; performing adaptation processing on the received service data acquisition request of at least one service cluster to obtain an adaptation processing result;
a service data determining unit, configured to determine service data corresponding to the service data acquisition request according to the adaptation processing result;
and the service data sending unit is used for sending the service data corresponding to the service data acquisition request to the corresponding service cluster.
In one embodiment, the configuration center component 901 may further include:
the configuration data comparison unit is used for comparing the received configuration data with the stored configuration data to obtain a comparison result;
the configuration data updating unit is used for updating the stored configuration data into the received configuration data under the condition that the comparison result is that the received configuration data is different from the stored configuration data;
and the configuration data sending unit is used for sending the changed configuration data to each service cluster by taking the received configuration data as the changed configuration data.
As shown in fig. 10, the present disclosure provides a microservice system, which may include:
at least one service cluster, each service cluster being configured to execute the method for micro-service configuration applied to the service cluster;
and the main cluster is used for executing the method applied to the micro-service configuration of the main cluster.
There may be a plurality of service clusters, corresponding to service cluster 1 to service cluster N in fig. 10, where N is a positive integer.
Each service cluster may further include a control plane component and at least one data plane component. The control plane component may be communicatively connected to the configuration center of the master cluster, and configured to obtain configuration data sent by the master cluster and send the configuration data to the data plane component. The transmission mode may be based on a web hook (Webhook) mechanism.
The data plane component may include a co-deployed microservice program (APP in fig. 10) and Sidecar component (Sidecar in fig. 10). The sidecar assembly is used for sending a service data acquisition request to the main cluster when detecting that the service data in the main cluster changes. And receives service data transmitted by the master cluster. And executing the service administration task for the micro service program according to the received configuration data and the service data.
The registry component in the main cluster is used for receiving and storing the service data configured by the user terminal. And on the other hand, according to the received service data acquisition request sent by the data plane component of the service cluster, determining service data corresponding to the service data acquisition request. And sending the service data corresponding to the service data acquisition request to a data plane component in the service cluster.
The configuration data may include Custom Resource type (CRD) data.
Since the registry of the micro service for acquiring the service data includes various kinds, for example, zk (zookeeper), Eureka, Consul, etc. in fig. 10.
Since these registries are developed and implemented by different vendors, there is currently no corresponding data model standard, which results in the need to implement different docking schemes for different registries. To mask the data model variability of multiple registries, the present disclosure introduces Registry Proxy units (Registry Proxy). The registry agent unit is stored with data models of different registries in advance. Based on this, the main cluster may adapt the service data acquisition request by using the registration center agent unit when receiving the service data acquisition request sent by the data plane component of any service cluster.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
FIG. 11 shows a schematic block diagram of an electronic device 1100 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 11, the electronic device 1100 includes a computing unit 1110 that may perform various appropriate actions and processes in accordance with a computer program stored in a Read Only Memory (ROM)1120 or a computer program loaded from a storage unit 1180 into a Random Access Memory (RAM) 1130. In the RAM 1130, various programs and data required for the operation of the device 1100 may also be stored. The computing unit 1110, ROM 1120, and RAM 1130 are connected to each other by a bus 1140. An input/output (I/O) interface 1150 is also connected to bus 1140.
Various components in electronic device 1100 are connected to I/O interface 1150, including: an input unit 1160 such as a keyboard, a mouse, or the like; an output unit 1170 such as various types of displays, speakers, and the like; a storage unit 1180 such as a magnetic disk, optical disk, or the like; and a communication unit 1190 such as a network card, modem, wireless communication transceiver, or the like. The communication unit 1190 allows the electronic device 1100 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunications networks.
The computing unit 1110 may be a variety of general-purpose and/or special-purpose processing components having processing and computing capabilities. Some examples of the computing unit 1110 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The computing unit 1110 performs the various methods and processes described above, such as the method of microservice configuration. For example, in some embodiments, the method of microservice configuration may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 1180. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 1100 via the ROM 1120 and/or the communication unit 1190. When loaded into RAM 1130 and executed by computing unit 1110, may perform one or more steps of the method of microservice configuration described above. Alternatively, in other embodiments, the computing unit 1110 may be configured by any other suitable means (e.g., by means of firmware) to perform the method of microservice configuration.
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel or sequentially or in different orders, and are not limited herein as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.

Claims (20)

1. A method for configuring micro service is applied to a service cluster and comprises the following steps:
receiving configuration data from a master cluster; under the condition that the service data in the main cluster are determined to be changed, sending a service data acquisition request to the main cluster, and receiving the service data from the main cluster;
and executing a service administration task according to the configuration data and the service data.
2. The method of claim 1, wherein the sending a service data acquisition request to the master cluster in the event that a change in service data in the master cluster is determined comprises:
determining required service data;
under the condition that the service data in the main cluster are determined to be changed, the changed service data are compared with the required service data to obtain a comparison result;
and sending a service data acquisition request to the main cluster under the condition that the comparison result meets a preset condition.
3. The method of claim 2, wherein the determining a manner in which changes occur to service data in the primary cluster comprises:
periodically polling service data in the master cluster;
and determining that the service data in the main cluster is changed under the condition that the difference of the two polling results exceeds the corresponding threshold value.
4. The method of claim 1, wherein said performing a service governance task according to said configuration data and said service data comprises:
determining a service instance of each micro-service program by using the service data;
determining parameters in the service instance using the configuration data;
and executing the service administration task of each micro service program according to the service instance of each micro service program and the parameters in the service instance.
5. The method according to any one of claims 1 to 4, wherein the service clusters are multiple and are respectively arranged in different regions; the service governance tasks executed by the service clusters of each region are the same.
6. A method for micro-service configuration, applied to a main cluster, comprises the following steps:
under the condition that the configuration data is changed, sending the changed configuration data to each service cluster;
and under the condition of receiving a service data acquisition request of at least one service cluster, sending service data corresponding to the service data acquisition request to the corresponding service cluster.
7. The method of claim 6, wherein the sending service data corresponding to the service data acquisition request to the corresponding service cluster in case of receiving the service data acquisition request of at least one of the service clusters comprises:
performing adaptation processing on the received service data acquisition request of at least one service cluster to obtain an adaptation processing result;
determining service data corresponding to the service data acquisition request according to the adaptation processing result;
and sending the service data corresponding to the service data acquisition request to a corresponding service cluster.
8. The method of claim 6, wherein the sending the changed configuration data to each service cluster in case of a change in the configuration data comprises:
comparing the received configuration data with the stored configuration data to obtain a comparison result;
updating the stored configuration data to the received configuration data when the comparison result is that the received configuration data is different from the stored configuration data;
and taking the received configuration data as changed configuration data, and sending the changed configuration data to each service cluster.
9. An apparatus of microservice configuration, comprising:
a control plane component for receiving configuration data from the master cluster;
the data plane component is used for sending a service data acquisition request to the main cluster and receiving service data from the main cluster under the condition that the service data in the main cluster is changed;
and the data plane component is also used for executing a service administration task according to the configuration data and the service data.
10. The apparatus of claim 9, wherein the data surface component comprises a sidecar component, the sidecar component further comprising:
a service data determination unit for determining required service data;
the service data comparison unit is used for comparing the changed service data with the required service data to obtain a comparison result under the condition that the service data in the main cluster is determined to be changed;
and the service data acquisition request sending unit is used for sending a service data acquisition request to the main cluster under the condition that the comparison result meets a preset condition.
11. The apparatus according to claim 10, wherein the service data comparing unit is specifically configured to:
periodically polling service data in the master cluster;
and determining that the service data in the main cluster is changed under the condition that the difference of the two polling results exceeds the corresponding threshold value.
12. The apparatus of claim 9, wherein the data surface component comprises a sidecar component, the sidecar component further comprising:
a service instance determining unit for determining a service instance of each micro-service program by using the service data;
a parameter determining unit, configured to determine a parameter in the service instance using the configuration data;
and the service administration task execution unit is used for executing the service administration task of each micro service program according to the service instance of each micro service program and the parameters in the service instance.
13. The apparatus of claim 9, wherein the microservice configured apparatus is a cluster of business,
the service clusters are multiple and are respectively arranged in different regions; the service governance tasks executed by the service clusters of each region are the same.
14. An apparatus of microservice configuration, comprising:
the configuration center component is used for sending the changed configuration data to each service cluster under the condition that the configuration data is changed;
and the registration center component is used for sending the service data corresponding to the service data acquisition request to the corresponding service cluster under the condition of receiving the service data acquisition request of at least one service cluster.
15. The apparatus of claim 14, wherein the registry component comprises:
a registry agent unit; performing adaptation processing on the received service data acquisition request of at least one service cluster to obtain an adaptation processing result;
a service data determining unit, configured to determine, according to the adaptation processing result, service data corresponding to the service data acquisition request;
and the service data sending unit is used for sending the service data corresponding to the service data acquisition request to the corresponding service cluster.
16. The apparatus of claim 14, wherein the configuration center component comprises:
the configuration data comparison unit is used for comparing the received configuration data with the stored configuration data to obtain a comparison result;
a configuration data updating unit, configured to update the stored configuration data to the received configuration data if the comparison result indicates that the received configuration data is different from the stored configuration data;
and the configuration data sending unit is used for sending the changed configuration data to each service cluster by taking the received configuration data as changed configuration data.
17. A microservice system, comprising:
at least one service cluster, each of the service clusters being configured to perform the method of any one of claims 1 to 5;
a master cluster for performing the method of any one of claims 6 to 8.
18. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 8.
19. A non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the method of any one of claims 1 to 8.
20. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 8.
CN202110185215.5A 2021-02-10 2021-02-10 Method, device, equipment, system and storage medium for micro-service configuration Active CN112860342B (en)

Priority Applications (5)

Application Number Priority Date Filing Date Title
CN202110185215.5A CN112860342B (en) 2021-02-10 2021-02-10 Method, device, equipment, system and storage medium for micro-service configuration
EP21925429.9A EP4113290A4 (en) 2021-02-10 2021-10-14 Micro-service configuration method and apparatus, electronic device, system, and storage medium
KR1020227034296A KR20220140869A (en) 2021-02-10 2021-10-14 Methods, devices, electronic devices, systems and storage media for configuring microservices
JP2022559897A JP7450750B2 (en) 2021-02-10 2021-10-14 Methods, apparatus, electronic devices, systems and storage media for configuring microservices
PCT/CN2021/123921 WO2022170782A1 (en) 2021-02-10 2021-10-14 Micro-service configuration method and apparatus, electronic device, system, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110185215.5A CN112860342B (en) 2021-02-10 2021-02-10 Method, device, equipment, system and storage medium for micro-service configuration

Publications (2)

Publication Number Publication Date
CN112860342A true CN112860342A (en) 2021-05-28
CN112860342B CN112860342B (en) 2024-03-12

Family

ID=75988018

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110185215.5A Active CN112860342B (en) 2021-02-10 2021-02-10 Method, device, equipment, system and storage medium for micro-service configuration

Country Status (5)

Country Link
EP (1) EP4113290A4 (en)
JP (1) JP7450750B2 (en)
KR (1) KR20220140869A (en)
CN (1) CN112860342B (en)
WO (1) WO2022170782A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113709707A (en) * 2021-10-29 2021-11-26 中兴通讯股份有限公司 Method and device for sidecar deployment in service grid, electronic equipment and storage medium
CN114553959A (en) * 2022-02-21 2022-05-27 南京航空航天大学 Situation awareness-based cloud native service grid configuration on-demand issuing method and application
WO2022170782A1 (en) * 2021-02-10 2022-08-18 北京百度网讯科技有限公司 Micro-service configuration method and apparatus, electronic device, system, and storage medium
WO2023044936A1 (en) * 2021-09-27 2023-03-30 西门子股份公司 Knowledge distribution system, method and apparatus, and computer-readable medium

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115129740B (en) * 2022-09-01 2022-11-04 山东大学 Method and system for updating distributed micro-service database in cloud native environment
CN116032739A (en) * 2022-11-29 2023-04-28 北银金融科技有限责任公司 Multifunctional distributed side car system based on banking core
CN115766481B (en) * 2022-12-05 2024-06-11 广州玖晔网络科技有限公司 Micro-service treatment method and system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108134696A (en) * 2017-12-15 2018-06-08 云宏信息科技股份有限公司 A kind of micro services configuration update method and device
CN108540529A (en) * 2018-03-07 2018-09-14 江苏电力信息技术有限公司 Do not restart dynamic parameter method for refreshing under a kind of framework based on micro services
CN110673881A (en) * 2019-09-06 2020-01-10 深圳平安通信科技有限公司 Configuration management method and device for micro-service cluster and computer equipment
CN110971449A (en) * 2019-10-25 2020-04-07 武汉烽火众智数字技术有限责任公司 Service management and control system based on micro-service architecture
US20200133689A1 (en) * 2018-10-31 2020-04-30 SnapRoute, Inc. Disaggregated Cloud-Native Network Architecture
CN111930758A (en) * 2020-07-14 2020-11-13 广西东信互联科技有限公司 Micro-service configuration data real-time updating method based on Paxos algorithm

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7558857B2 (en) 2005-06-30 2009-07-07 Microsoft Corporation Solution deployment in a server farm
US11579941B2 (en) * 2019-05-05 2023-02-14 Mastercard International Incorporated Control cluster for multi-cluster container environments
CN112860342B (en) * 2021-02-10 2024-03-12 北京百度网讯科技有限公司 Method, device, equipment, system and storage medium for micro-service configuration

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108134696A (en) * 2017-12-15 2018-06-08 云宏信息科技股份有限公司 A kind of micro services configuration update method and device
CN108540529A (en) * 2018-03-07 2018-09-14 江苏电力信息技术有限公司 Do not restart dynamic parameter method for refreshing under a kind of framework based on micro services
US20200133689A1 (en) * 2018-10-31 2020-04-30 SnapRoute, Inc. Disaggregated Cloud-Native Network Architecture
CN110673881A (en) * 2019-09-06 2020-01-10 深圳平安通信科技有限公司 Configuration management method and device for micro-service cluster and computer equipment
CN110971449A (en) * 2019-10-25 2020-04-07 武汉烽火众智数字技术有限责任公司 Service management and control system based on micro-service architecture
CN111930758A (en) * 2020-07-14 2020-11-13 广西东信互联科技有限公司 Micro-service configuration data real-time updating method based on Paxos algorithm

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022170782A1 (en) * 2021-02-10 2022-08-18 北京百度网讯科技有限公司 Micro-service configuration method and apparatus, electronic device, system, and storage medium
WO2023044936A1 (en) * 2021-09-27 2023-03-30 西门子股份公司 Knowledge distribution system, method and apparatus, and computer-readable medium
CN113709707A (en) * 2021-10-29 2021-11-26 中兴通讯股份有限公司 Method and device for sidecar deployment in service grid, electronic equipment and storage medium
CN113709707B (en) * 2021-10-29 2022-03-15 中兴通讯股份有限公司 Method and device for sidecar deployment in service grid, electronic equipment and storage medium
CN114553959A (en) * 2022-02-21 2022-05-27 南京航空航天大学 Situation awareness-based cloud native service grid configuration on-demand issuing method and application

Also Published As

Publication number Publication date
JP2023520057A (en) 2023-05-15
JP7450750B2 (en) 2024-03-15
KR20220140869A (en) 2022-10-18
CN112860342B (en) 2024-03-12
WO2022170782A1 (en) 2022-08-18
EP4113290A4 (en) 2024-01-10
EP4113290A1 (en) 2023-01-04

Similar Documents

Publication Publication Date Title
CN112860342B (en) Method, device, equipment, system and storage medium for micro-service configuration
US20150178657A1 (en) Systems and methods for incident queue assignment and prioritization
JP6217644B2 (en) Rule distribution server, event processing system, method and program
CN110751458A (en) Business approval method, device and system
CN114978936A (en) Method, system and storage medium for upgrading shared service platform
CN114448802B (en) Gateway configuration method, device, electronic equipment and storage medium
EP4036751A1 (en) Method and apparatus for performing modification task, electronic device and readable storage medium
CN111510480A (en) Request sending method and device and first server
CN114827280A (en) Request processing method, device, equipment and medium
CN112965847B (en) Fault processing method, device, equipment and storage medium of micro-service architecture
CN113360689B (en) Image retrieval system, method, related device and computer program product
CN112925623B (en) Task processing method, device, electronic equipment and medium
CN113656239A (en) Monitoring method and device for middleware and computer program product
CN114218313A (en) Data management method, device, electronic equipment, storage medium and product
CN114143196A (en) Instance configuration update method, device, apparatus, storage medium, and program product
US20240231840A1 (en) Method And Apparatus For Microservice Configuration, Electronic Device, System, And Storage Medium
CN112818060B (en) Data synchronization method, device, electronic equipment and readable storage medium
CN112596922B (en) Communication management method, device, equipment and medium
CN113900785A (en) Distributed transaction processing method and device and electronic equipment
CN114328557A (en) Data processing method and device, electronic equipment and storage medium
CN115913954A (en) Cluster management information interaction method, device, equipment and storage medium
CN115080364A (en) Application state determination method and device, electronic equipment and storage medium
CN116112336A (en) Alarm data processing method and device
CN113986493A (en) Service use request processing method, related device and computer program product
CN115529346A (en) Service changing method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant