Soft load system configuration method, device, computer equipment and storage medium
By receiving configuration requests and generating configuration adjustment information, the configuration management of the registry center and soft load cluster is solved, and the service abnormality caused by inconsistent configuration of the registry center and the soft load cluster is achieved, and stable business operation and system efficiency improvement is achieved.
Patent Information
- Application Number
- CN202210814393.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-12
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2042-07-12
AI Technical Summary
In the soft load associated container technical architecture, inconsistent configuration of the registry center and the soft load cluster may lead to service abnormalities and affect external services.
It provides a soft load system configuration method, which generates adjustment configuration information for the registry center and the soft load cluster by receiving configuration requests, and performs configuration management of the registry center and the soft load cluster to ensure the consistency of configuration.
It realizes configuration management on the registry center and soft load cluster, solves the service abnormality caused by inconsistent configuration, ensures the stable operation of the business and improves the working efficiency of the soft load cluster system.
Smart Images

Figure CN115190015B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer network technology, and in particular to a soft load system configuration method, device, computer equipment and storage medium in the field of intelligent operation and maintenance. Background Art
[0002] With the development of computer network technology, soft load associated container technology has emerged. In this mode, soft load associated container information usually adopts a registration center-based architecture. All container information is stored in the registration center. The information is stored in the "key-value" pair format, where the "key" is the unique identifier of the container. The corresponding "value" can be obtained through the "key". The content of the "value" is the container IP and port. The "value" of a "key" can be multiple container IPs and ports, or it can be empty.
[0003] In traditional technology, when a container starts, its own IP and port will be filled in the "value" of the corresponding "key" in the registration center. When the container's running status changes, the container's IP and port may change. Therefore, when restarting the soft load service, if there are abnormal situations such as the "key" on the registration center does not exist or the obtained "value" format is incorrect, it will cause an error in the startup of the soft load service, affecting external services. Summary of the invention
[0004] Based on this, it is necessary to provide a soft load system configuration method, device, computer equipment, computer-readable storage medium and computer program product to address the above technical problems, which can solve the service anomaly problem caused by inconsistent configuration between the registration center and the soft load cluster under this architecture.
[0005] In the first aspect, the present application provides a method for configuring a soft load system. The method includes: receiving a configuration request initiated for target association information; the target association information is used to characterize the association relationship between the soft load service node to be configured and the container; the configuration request is used to indicate the configuration method of the target association information; according to the container identifier corresponding to the container and the configuration method, generating first adjustment configuration information for the registration center; and, according to the soft load cluster number, service node name, container identifier corresponding to the container and the configuration method in the target association information, generating second adjustment configuration information for the soft load cluster; the soft load cluster is used to receive a data stream containing container information sent by the registration center; according to the first adjustment configuration information, configuring the target association information recorded in the registration center to obtain a configured registration center, and, according to the second adjustment configuration information, configuring the association information configuration file in the soft load cluster to obtain a configured soft load cluster; the association information configuration file is used to record at least one of the target association information in the soft load cluster.
[0006] In one of the embodiments, configuring the target association information recorded in the registration center according to the first adjustment configuration information to obtain a configured registration center includes: if it is determined according to the first adjustment configuration information that new association information does not need to be added, then determining whether the target association information needs to be deleted; if the target association information does not need to be deleted, then deleting the container identifier corresponding to the target association information according to the first adjustment configuration information, and adding the container identifier corresponding to the new association information to obtain a configured registration center; configuring the association information configuration file in the soft load cluster according to the second adjustment configuration information to obtain a configured soft load cluster includes: if it is determined according to the second adjustment configuration information that new association information does not need to be added, then determining whether the target association information needs to be deleted; if the target association information does not need to be deleted, then adjusting the corresponding container identifier in the association information configuration file in the soft load cluster according to the second adjustment configuration information to obtain a configured soft load cluster.
[0007] In one of the embodiments, the method further includes: if the target association information needs to be deleted, deleting the container identifier corresponding to the target association information according to the first adjustment configuration information to obtain a configured registration center; and / or, if the target association information needs to be deleted, deleting the corresponding container identifier in the association information configuration file in the soft load cluster according to the second adjustment configuration information to obtain a configured soft load cluster.
[0008] In one of the embodiments, configuring the target association information recorded in the registration center according to the first adjustment configuration information to obtain a configured registration center further includes: if it is determined according to the first adjustment configuration information that new association information needs to be added, then adding a container identifier corresponding to the target association information according to the first adjustment configuration information to obtain a configured registration center; configuring the association information configuration file in the soft load cluster according to the second adjustment configuration information to obtain a configured soft load cluster includes: if it is determined according to the second adjustment configuration information that new association information needs to be added, then adding the corresponding container identifier in the association information configuration file in the soft load cluster according to the second adjustment configuration information to obtain a configured soft load cluster.
[0009] In one of the embodiments, the target association information set corresponding to the registration center includes at least one of the target association information, and the method further includes: if the registration center has a container identifier corresponding to the container, querying through the registration center whether the format of the container routing information corresponding to the container identifier is normal; if the format corresponding to the container routing information is normal, performing a configuration information check on the association information configuration file in the soft load cluster according to the service node in the soft load cluster and the container identifier corresponding to the container; if the format corresponding to the container routing information is abnormal, deleting each of the container routing information in the target association information set corresponding to the registration center, and then performing a configuration information check on the association information configuration file in the soft load cluster according to the service node in the soft load cluster and the container identifier corresponding to the container; or, if the registration center does not have a container identifier corresponding to the container, adding a container identifier corresponding to the container through the registration center, and then performing a configuration information check on the association information configuration file in the soft load cluster according to the service node in the soft load cluster and the container identifier corresponding to the container.
[0010] In one of the embodiments, the method further includes: if the result of the configuration information check is abnormal, re-executing the step of generating the second adjustment configuration information for the soft load cluster according to the soft load cluster number in the target association information, the business node name, the container identifier corresponding to the container, and the configuration method, and configuring the association information configuration file in the soft load cluster according to the second adjustment configuration information to obtain the configured soft load cluster; and restarting the configured soft load cluster.
[0011] In one of the embodiments, the method further includes: storing the target association information corresponding to the first adjustment configuration information and the configured registration center, and the association information configuration file corresponding to the second adjustment configuration information and the configured soft load cluster to generate stored soft load system configuration information; and visually displaying the stored soft load system configuration information in response to a visualization request for the stored soft load system configuration information.
[0012] In a second aspect, the present application also provides a soft load system configuration device. The device includes: a configuration request receiving module, which is used to receive a configuration request initiated for target association information; the target association information is used to characterize the association relationship between the soft load service node to be configured and the container; the configuration request is used to indicate the configuration method of the target association information; an adjustment configuration information generation module, which is used to generate first adjustment configuration information for the registration center according to the container identifier corresponding to the container and the configuration method; and, according to the soft load cluster number, service node name, container identifier corresponding to the container and the configuration method in the target association information, generate second adjustment configuration information for the soft load cluster; the soft load cluster is used to receive a data stream containing container information sent by the registration center; an adjustment configuration information application module, which is used to configure the target association information recorded in the registration center according to the first adjustment configuration information to obtain a configured registration center, and, according to the second adjustment configuration information, configure the association information configuration file in the soft load cluster to obtain a configured soft load cluster; the association information configuration file is used to record at least one of the target association information in the soft load cluster.
[0013] In one of the embodiments, the configuration information application module is further used to determine whether the target association information needs to be deleted if it is determined according to the first adjustment configuration information that new association information does not need to be added; if the target association information does not need to be deleted, delete the container identifier corresponding to the target association information according to the first adjustment configuration information, and add the container identifier corresponding to the new association information to obtain a configured registration center; if it is determined according to the second adjustment configuration information that new association information does not need to be added, determine whether the target association information needs to be deleted; if the target association information does not need to be deleted, adjust the corresponding container identifier in the association information configuration file in the soft load cluster according to the second adjustment configuration information to obtain a configured soft load cluster.
[0014] In one of the embodiments, the configuration information application module is further used to, if the target association information needs to be deleted, delete the container identifier corresponding to the target association information according to the first adjustment configuration information to obtain a configured registration center; and / or, if the target association information needs to be deleted, delete the corresponding container identifier in the association information configuration file in the soft load cluster according to the second adjustment configuration information to obtain a configured soft load cluster.
[0015] In one of the embodiments, the configuration information application module is further used to, if it is determined according to the first adjustment configuration information that new association information needs to be added, add the container identifier corresponding to the target association information according to the first adjustment configuration information to obtain a configured registration center; if it is determined according to the second adjustment configuration information that new association information needs to be added, add the corresponding container identifier in the association information configuration file in the soft load cluster according to the second adjustment configuration information to obtain a configured soft load cluster.
[0016] In one of the embodiments, the configuration information checking module is further used to, if the registration center has a container identifier corresponding to the container, query through the registration center whether the format of the container routing information corresponding to the container identifier is normal; if the format corresponding to the container routing information is normal, perform a configuration information check on the associated information configuration file in the soft load cluster according to the service node in the soft load cluster and the container identifier corresponding to the container; if the format corresponding to the container routing information is abnormal, after deleting each of the container routing information in the target associated information set corresponding to the registration center, perform a configuration information check on the associated information configuration file in the soft load cluster according to the service node in the soft load cluster and the container identifier corresponding to the container; or, if the registration center does not have a container identifier corresponding to the container, after adding the container identifier corresponding to the container through the registration center, perform a configuration information check on the associated information configuration file in the soft load cluster according to the service node in the soft load cluster and the container identifier corresponding to the container.
[0017] In one of the embodiments, the configuration information checking module is further used to, if the result of the configuration information checking is abnormal, re-execute the steps of generating the second adjustment configuration information for the soft load cluster according to the soft load cluster number in the target association information, the business node name, the container identifier corresponding to the container, and the configuration method, and configuring the association information configuration file in the soft load cluster according to the second adjustment configuration information to obtain the configured soft load cluster; and restart the configured soft load cluster.
[0018] In one of the embodiments, the visualization display module is used to store the target association information corresponding to the first adjustment configuration information and the configured registration center, and the association information configuration file corresponding to the second adjustment configuration information and the configured soft load cluster, to generate stored soft load system configuration information; and in response to a visualization display request for the stored soft load system configuration information, the stored soft load system configuration information is visualized.
[0019] In a third aspect, the present application also provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program: receiving a configuration request initiated for target association information; the target association information is used to characterize the association relationship between the soft load service node to be configured and the container; the configuration request is used to indicate the configuration method of the target association information; according to the container identifier corresponding to the container and the configuration method, generating first adjustment configuration information for the registration center; and, according to the soft load cluster number, the service node name, the container identifier corresponding to the container and the configuration method in the target association information, generating second adjustment configuration information for the soft load cluster; the soft load cluster is used to receive a data stream containing container information sent by the registration center; according to the first adjustment configuration information, configuring the target association information recorded in the registration center to obtain a configured registration center, and, according to the second adjustment configuration information, configuring the association information configuration file in the soft load cluster to obtain a configured soft load cluster; the association information configuration file is used to record at least one of the target association information in the soft load cluster.
[0020] In a fourth aspect, the present application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented: receiving a configuration request initiated for target association information; the target association information is used to characterize the association relationship between the soft load service node to be configured and the container; the configuration request is used to indicate the configuration method of the target association information; according to the container identifier corresponding to the container and the configuration method, generating first adjustment configuration information for the registration center; and, according to the soft load cluster number, service node name, container identifier corresponding to the container and the configuration method in the target association information, generating second adjustment configuration information for the soft load cluster; the soft load cluster is used to receive a data stream containing container information sent by the registration center; according to the first adjustment configuration information, configuring the target association information recorded in the registration center to obtain a configured registration center, and, according to the second adjustment configuration information, configuring the association information configuration file in the soft load cluster to obtain a configured soft load cluster; the association information configuration file is used to record at least one of the target association information in the soft load cluster.
[0021] In a fifth aspect, the present application also provides a computer program product. The computer program product includes a computer program, which implements the following steps when executed by a processor: receiving a configuration request initiated for target association information; the target association information is used to characterize the association relationship between the soft load service node to be configured and the container; the configuration request is used to indicate the configuration method of the target association information; according to the container identifier corresponding to the container and the configuration method, generating first adjustment configuration information for the registration center; and, according to the soft load cluster number, service node name, container identifier corresponding to the container and the configuration method in the target association information, generating second adjustment configuration information for the soft load cluster; the soft load cluster is used to receive a data stream containing container information sent by the registration center; according to the first adjustment configuration information, configure the target association information recorded in the registration center to obtain a configured registration center, and, according to the second adjustment configuration information, configure the association information configuration file in the soft load cluster to obtain a configured soft load cluster; the association information configuration file is used to record at least one of the target association information in the soft load cluster.
[0022] The above-mentioned soft load system configuration method, device, computer equipment, storage medium and computer program product receive a configuration request initiated for target association information; the target association information is used to characterize the association relationship between the soft load business node to be configured and the container; the configuration request is used to indicate the configuration method of the target association information; according to the container identifier and configuration method corresponding to the container, the first adjustment configuration information for the registration center is generated; and, according to the soft load cluster number, business node name, container identifier and configuration method corresponding to the container in the target association information, the second adjustment configuration information for the soft load cluster is generated; the soft load cluster is used to receive the data stream containing container information sent by the registration center; according to the first adjustment configuration information, the target association information recorded in the registration center is configured to obtain a configured registration center, and, according to the second adjustment configuration information, the association information configuration file in the soft load cluster is configured to obtain a configured soft load cluster; the association information configuration file is used to record at least one target association information in the soft load cluster.
[0023] By centrally managing the association relationship information between the business nodes and containers of the soft load cluster, reconfiguring the container identification information of the registration center, and configuring the association information configuration file of the soft load cluster, configuration management on the registration center and the soft load cluster is realized, and automatic configuration and verification of the soft load business node association container information based on the registration center architecture is realized, which solves the service anomaly problem caused by inconsistent configuration between the registration center and the soft load cluster under this architecture, ensures the stable operation of the business, and improves the work efficiency of the soft load cluster system. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 An application environment diagram of a soft load system configuration method in one embodiment;
[0025] Figure 2 A schematic diagram of a flow chart of a soft load system configuration method in one embodiment;
[0026] Figure 3 A schematic diagram of a process of obtaining a configured registration center and a configured soft load cluster in one embodiment;
[0027] Figure 4 A schematic diagram of a flow chart of a method for obtaining a configured registration center and a configured soft load cluster in another embodiment;
[0028] Figure 5 A schematic diagram of a process of obtaining a configured registration center and a configured soft load cluster in another embodiment;
[0029] Figure 6 A schematic diagram of a flow chart of a configuration information checking method in an embodiment;
[0030] Figure 7 A flowchart of a method for processing an abnormal configuration information check result in one embodiment;
[0031] Figure 8 A schematic diagram of a flow chart of a method for visual display in an embodiment;
[0032] Fig. 9 A schematic diagram of information interaction between a registration center of a soft load system and a soft load associated container in one embodiment;
[0033] Fig.10 A schematic diagram of a method for automatically configuring and verifying soft load associated container information of a registration center of a soft load system according to an embodiment;
[0034] Fig.11 A schematic diagram of a process for adding / modifying / deleting target association information in an association information configuration file corresponding to a soft load association container in an embodiment;
[0035] Fig.12 A schematic diagram of a process for checking / repairing configuration information of a soft load associated container in one embodiment;
[0036] Fig.13 It is a structural block diagram of a soft load system configuration device in one embodiment;
[0037] Fig.14 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0039] The soft load system configuration method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown in the figure, the terminal 102 acquires data, the server 104 receives the data of the terminal 102 in response to the instruction of the terminal 102, and calculates the acquired data, and the server 104 transmits the calculation result of the data back to the terminal 102, and the terminal 102 displays it. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The server 104 receives a configuration request initiated for the target association information from the terminal 102; the target association information is used to characterize the association relationship between the soft load service node to be configured and the container; the configuration request is used to indicate the configuration method of the target association information; according to the container identifier and configuration method corresponding to the container, the first adjustment configuration information for the registration center is generated; and, according to the soft load cluster number, the service node name, the container identifier and configuration method corresponding to the container in the target association information, the second adjustment configuration information for the soft load cluster is generated; the soft load cluster is used to receive the data stream containing the container information sent by the registration center; according to the first adjustment configuration information, the target association information recorded in the registration center is configured to obtain the configured registration center, and, according to the second adjustment configuration information, the association information configuration file in the soft load cluster is configured to obtain the configured soft load cluster; the association information configuration file is used to record at least one target association information in the soft load cluster. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices, and the Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car devices, etc. The portable wearable device may be a smart watch, a smart bracelet, a head-mounted device, etc. The server 104 may be implemented as an independent server or a server cluster consisting of multiple servers.
[0040] In one embodiment, Figure 2 As shown, a soft load system configuration method is provided, which is applied to Figure 1 The server in the example is used to illustrate the following steps:
[0041] Step 202: Receive a configuration request initiated for target association information.
[0042] The target association information may be used to characterize the association relationship between the soft load service node to be configured and the container, that is, to characterize the relationship between the container identifier and the container routing information between the soft load service node to be configured and the container.
[0043] Among them, the configuration request can be a command used to instruct the corresponding modification of the configuration method of the target association information. The command contains information for modifying the association relationship between the soft load business node and the container in the target association information. Through the configuration request, the server can automatically configure and verify the association information, thereby solving the service anomaly problem that may be caused by the inconsistency between the registration center and the soft load configuration under this architecture.
[0044] Specifically, the server responds to the instruction of the terminal, receives the configuration request initiated for the target association information from the terminal, and stores the received configuration request in the storage unit. When the server needs to change any association relationship in the target association information, the configuration request is retrieved from the storage unit to the volatile storage resource for the central processor to calculate. The configuration request initiated for the target association information can be received as a single input or as multiple configuration requests input simultaneously.
[0045] For example, the server 104 responds to the instruction of the terminal 102, receives a configuration request initiated for the target association information from the terminal 102, and stores it in a storage unit in the server 104, wherein the server 104 receives 10 configuration requests initiated for the target association information, and multiple data can be input simultaneously.
[0046] Step 204, generating first adjustment configuration information for the registration center according to the container identifier and configuration method corresponding to the container; and generating second adjustment configuration information for the soft load cluster according to the soft load cluster number, business node name, container identifier and configuration method corresponding to the container in the target association information.
[0047] Among them, the container identifier can be an identifier used to establish a connection between a container and other components in a soft load system. Usually, the container identifier and the container routing information are generated simultaneously in a paired form, that is, the container identifier is equivalent to the "key" in the "key-value" pair, and the container routing information is equivalent to the value in the "key-value" pair. The container routing information of a container identifier can be multiple container IPs and ports, or it can be empty.
[0048] Among them, the registration center can be a place for storing and managing container identifiers and container routing information pairs. Generally, when the soft load system needs to call container identifiers and container routing information during operation, it needs to be authenticated, managed and verified through the registration center.
[0049] The first adjustment configuration information may be an instruction for adjusting target association information composed of at least one container identifier and container routing information in a registration center. Adjusting the target association information according to the first adjustment configuration information can update the pairing relationship between the container identifier and the container routing information in the registration center.
[0050] The soft load cluster number may be a code for carrying soft load cluster information, each code corresponds to a soft load cluster, and the inherent information and corresponding configuration of the corresponding soft load cluster may be read based on the code in the soft load cluster.
[0051] Among them, the business node name can be the name corresponding to each node in the soft load cluster. The name corresponding to each business node is different and unique. Through the business node name, the inherent information and configuration status of the business node can be read to further understand the operation status of the business node.
[0052] Among them, the second adjustment configuration information can be an instruction to adjust the target association information composed of at least one soft load cluster number, a business node name, a container identifier corresponding to the container, and a configuration method for the soft load cluster. Adjusting the target association information according to the second adjustment configuration information can update the pairing relationship between the container identifier and the container routing information in the soft load cluster.
[0053] Specifically, according to the container identifier of the container in the incoming target association information and the corresponding information input type (add / modify / delete), a configuration method for adding or deleting the container identifier is generated, and according to the container identifier and configuration method corresponding to the container, a computer instruction for changing the configuration information of the registration center is generated, that is, the first adjustment configuration information for the registration center. Because the registration center, the container and the soft load cluster constitute a system, when the first adjustment configuration information is generated for the registration center, the corresponding second adjustment configuration information is also generated for the soft load cluster. According to the configuration method formed by the soft load cluster number, the business node name, the container identifier of the associated container and the corresponding information input type (add / modify / delete) in the incoming target association information, which is the same as the registration center, a new soft load template file configuration is generated, that is, the second adjustment configuration information for the soft load cluster is generated. Among them, the load cluster is used to receive the data stream containing container information sent by the registration center.
[0054] For example, based on the container identifier A of the container in the incoming target association information and the corresponding deletion information input type, a configuration method for deleting the container identifier A is generated, and based on the container identifier A and configuration method B corresponding to the container, a computer instruction (A+B) for changing the configuration information of the registration center is generated, that is, the first adjustment configuration information (A+B) for the registration center. At the same time, based on the soft load cluster number C, the business node name D, the container identifier A of the associated container and the corresponding deletion information input type in the incoming target association information, which is the same as the configuration method B of the registration center, a new soft load template file configuration (A+B+C+D) is generated, that is, the second adjustment configuration information (A+B+C+D) for the soft load cluster is generated.
[0055] Step 206, according to the first adjustment configuration information, configure the target association information recorded in the registration center to obtain a configured registration center, and according to the second adjustment configuration information, configure the association information configuration file in the soft load cluster to obtain a configured soft load cluster.
[0056] The configured registration center may be a registration center with unadjusted target association information whose target association information is adjusted by the first adjustment configuration information.
[0057] The association information configuration file may be a general term for two files: one is a template file, which is usually used to record the container identifier; and the other is a configuration file, which is usually used to record the pairing relationship between the container identifier and the container routing information.
[0058] The configured soft load cluster may be a soft load cluster having an unconfigured associated information configuration file after the associated information configuration file is adjusted by the second adjustment configuration information.
[0059] Specifically, the command in the first adjustment configuration information generated by the registration center according to the container identifier and configuration method corresponding to the container, which records the unadjusted target association information, adjusts the container identifier, container routing information and the pairing relationship between the two, and obtains the configured registration center. And, the command in the second adjustment configuration information generated by the soft load cluster according to the soft load cluster number, the business node name, the container identifier corresponding to the container and the configuration method, adjusts the container identifier, container routing information and the pairing relationship between the two, and obtains the configured soft load cluster. Among them, the association information configuration file on the soft load cluster is a general term for two files: one is a template file, the main content of which is the container identifier registered by each business node and its associated container in the registration center; the other is a configuration file, which is the actual effective soft load configuration. The soft load cluster obtains the corresponding container routing information from the registration center according to the container identifier in the template file to generate a configuration file, and completes the association between the soft load and the container IP and port information. In order to meet the continuity of external services when the container information is updated, the soft load cluster needs to obtain the latest container routing information from the registration center at a higher frequency (usually once every 10 seconds), and regenerate the configuration file to restart the soft load service.
[0060] For example, according to the first adjustment configuration information (A+B), the unadjusted target association information recorded in the registration center is configured to obtain a configured registration center X, wherein the configured registration center X records the adjusted target association information having the first adjustment configuration information (A+B); and, according to the second adjustment configuration information (A+B+C+D), the association information configuration file in the soft load cluster is configured to obtain a configured soft load cluster Y, wherein the configured registration center Y records the adjusted association information configuration file having the second adjustment configuration information (A+B+C+D).
[0061] In one embodiment, the registration center of the soft load system and the soft load associated container information interaction are as follows: Fig. 9 shown.
[0062] In one embodiment, a method for automatically configuring and verifying soft load associated container information of a registration center of a soft load system is as follows: Fig.10 shown.
[0063] In the above-mentioned soft load system configuration method, a configuration request initiated for target association information is received; the target association information is used to characterize the association relationship between the soft load business node to be configured and the container; the configuration request is used to indicate the configuration method of the target association information; according to the container identifier and configuration method corresponding to the container, the first adjustment configuration information for the registration center is generated; and, according to the soft load cluster number, the business node name, the container identifier and configuration method corresponding to the container in the target association information, the second adjustment configuration information for the soft load cluster is generated; the soft load cluster is used to receive the data stream containing the container information sent by the registration center; according to the first adjustment configuration information, the target association information recorded in the registration center is configured to obtain a configured registration center, and, according to the second adjustment configuration information, the association information configuration file in the soft load cluster is configured to obtain a configured soft load cluster; the association information configuration file is used to record at least one target association information in the soft load cluster.
[0064] By centrally managing the association relationship information between the business nodes and containers of the soft load cluster, reconfiguring the container identification information of the registration center, and configuring the association information configuration file of the soft load cluster, configuration management on the registration center and the soft load cluster is realized, and automatic configuration and verification of the soft load business node association container information based on the registration center architecture is realized, which solves the service anomaly problem caused by inconsistent configuration between the registration center and the soft load cluster under this architecture, ensures the stable operation of the business, and improves the work efficiency of the soft load cluster system.
[0065] In one embodiment, Figure 3 As shown, according to the first adjustment configuration information, the target association information recorded in the registration center is configured to obtain the configured registration center, including:
[0066] Step 302: If it is determined according to the first adjustment configuration information that new association information does not need to be added, it is determined whether the target association information needs to be deleted.
[0067] The new association information may be a set of new container identifiers and container-container routing information pairing relationships relative to the existing container identifiers and container-container routing information pairing relationships in the target association information.
[0068] Specifically, the instructions in the first adjustment configuration information are traversed to search for instructions and content for adding new associated information. If the result after the traversal is that no instructions for adding new associated information are found, and further no content of new associated information is found, then continue to determine whether the first adjustment configuration information contains instructions for deleting the target associated information.
[0069] For example, the instructions corresponding to (A+B) in the first adjustment configuration information (A+B) are traversed to search for instructions and content for adding new associated information. If the search result is that no instructions are found, it is further determined whether the first adjustment configuration information (A+B) has instructions for deleting the target associated information.
[0070] Step 304: if the target association information does not need to be deleted, the container identifier corresponding to the target association information is deleted according to the first adjustment configuration information, and the container identifier corresponding to the new association information is added to obtain the configured registration center.
[0071] Specifically, if after traversing the instructions in the first adjustment configuration information, it is found that the instructions state that the target association information does not need to be deleted, and no content that needs to be deleted is found in the first adjustment configuration information, then according to the delete instruction in the first adjustment configuration information, the container identifier corresponding to the target association information stated in the first adjustment configuration information is deleted, and then, according to the add instruction in the first adjustment configuration information, the container identifier corresponding to the new association information stated in the first adjustment configuration information is added to obtain the configured registration center.
[0072] For example, if the statement of the first adjustment configuration information (A+B) indicates that the target association information does not need to be deleted, the container identifiers 1-10 corresponding to the target association information are deleted according to the instructions in the first adjustment configuration information (A+B), and then the container identifiers 11-20 corresponding to the new association information are added to obtain the configured registration center.
[0073] According to the second adjustment configuration information, the associated information configuration file in the soft load cluster is configured to obtain a configured soft load cluster, including:
[0074] Step 306: If it is determined according to the second adjustment configuration information that new association information does not need to be added, then it is determined whether the target association information needs to be deleted.
[0075] Specifically, the instructions in the second adjustment configuration information are traversed to search for instructions and content for adding new associated information. If the result after the traversal is that no instructions for adding new associated information are found, and further no content of new associated information is found, then continue to determine whether the second adjustment configuration information contains instructions for deleting the target associated information.
[0076] For example, the instructions corresponding to (A+B+C+D) in the second adjustment configuration information (A+B+C+D) are traversed to search for instructions and content for adding new associated information. If the search result is that no instructions are found, it is further determined whether the second adjustment configuration information (A+B+C+D) has instructions for deleting the target associated information.
[0077] Step 308: If the target association information does not need to be deleted, the corresponding container identifier in the association information configuration file in the soft load cluster is adjusted according to the second adjustment configuration information to obtain a configured soft load cluster.
[0078] Specifically, if after traversing the instructions in the second adjustment configuration information, it is found that the instructions state that the target associated information does not need to be deleted, and no content that needs to be deleted is found in the second adjustment configuration information, then according to the deletion instructions in the second adjustment configuration information, adjust the corresponding container identifier in the associated information configuration file stated in the adjustment instructions of the second adjustment configuration information for the soft load cluster, wherein the adjustment actions include but are not limited to adding, modifying and deleting, to obtain a configured soft load cluster, and finally restart the soft load cluster service.
[0079] For example, if the statement in the second adjustment configuration information (A+B+C+D) indicates that the target association information does not need to be deleted, the corresponding container identifiers 1-10 in the association information configuration file stated in the second adjustment configuration information for the soft load cluster are adjusted according to the instructions in the second adjustment configuration information (A+B+C+D) to obtain the configured soft load cluster, and finally restart the soft load cluster service.
[0080] In this embodiment, by determining that no new association information needs to be added for the first adjustment configuration information and the second adjustment configuration information and then further determining that no target association information needs to be deleted, the registration center and soft load cluster that do not need to add new association information and do not need to delete the target association information can be correctly configured.
[0081] In one embodiment, Figure 4 As shown, the method also includes:
[0082] Step 402: If the target association information needs to be deleted, the container identifier corresponding to the target association information is deleted according to the first adjustment configuration information to obtain the configured registration center.
[0083] Specifically, if after traversing the instructions in the first adjustment configuration information, it is found that the instruction states that the target associated information needs to be deleted, and the first adjustment configuration information is searched for content corresponding to the deletion instruction, then according to the deletion instruction in the first adjustment configuration information, the container identifier corresponding to the target associated information is deleted to obtain the configured registration center.
[0084] For example, if the first adjustment configuration information (A+B) states that target association information needs to be deleted, then according to the content to be deleted stated in the first adjustment configuration information (A+B), the container identifiers 1-10 corresponding to the target association information are deleted to obtain the configured registration center.
[0085] Step 404: if the target association information needs to be deleted, the corresponding container identifier in the association information configuration file in the soft load cluster is deleted according to the second adjustment configuration information to obtain a configured soft load cluster.
[0086] Specifically, if after traversing the instructions in the second adjustment configuration information, it is found that the instruction states that the target associated information needs to be deleted, and the second adjustment configuration information is searched for content corresponding to the deletion instruction, then according to the deletion instruction in the second adjustment configuration information, delete the corresponding container identifier in the associated information configuration file in the soft load cluster, obtain the configured soft load cluster, and finally restart the soft load cluster service.
[0087] For example, if the second adjustment configuration information (A+B+C+D) states that the target association information needs to be deleted, then according to the content that needs to be deleted stated in the second adjustment configuration information (A+B+C+D), delete the corresponding container identifiers 1-10 in the association information configuration file in the soft load cluster to obtain the configured soft load cluster, and finally restart the soft load cluster service.
[0088] In this embodiment, by determining that no new association information needs to be added for the first adjustment configuration information and the second adjustment configuration information and then further determining that the target association information needs to be deleted, the registration center and soft load cluster that do not need to add new association information and need to delete the target association information can be correctly configured.
[0089] In one embodiment, Figure 5 As shown, according to the first adjustment configuration information, the target association information recorded in the registration center is configured to obtain the configured registration center, and further includes:
[0090] Step 502: If it is determined that new association information needs to be added according to the first adjustment configuration information, a container identifier corresponding to the target association information is added according to the first adjustment configuration information to obtain a configured registration center.
[0091] Specifically, the instructions in the first adjustment configuration information are traversed to search for instructions and content for adding new associated information. If the result of the traversal is that an instruction for adding new associated information is found, and the content of the new associated information is further found, then according to the adding instruction in the first adjustment configuration information, the container identifier corresponding to the new associated information described in the first adjustment configuration information is added to obtain the configured registration center.
[0092] For example, the instructions corresponding to (A+B) in the first adjustment configuration information (A+B) are traversed to search for instructions and content for adding new associated information. If the search result is any instruction for adding new associated information, the container identifier 11-20 corresponding to the new associated information is added according to the instruction in the first adjustment configuration information (A+B) to obtain the configured registration center.
[0093] According to the second adjustment configuration information, the associated information configuration file in the soft load cluster is configured to obtain a configured soft load cluster, including:
[0094] Step 504: if it is determined that new association information needs to be added according to the second adjustment configuration information, then the corresponding container identifier in the association information configuration file in the soft load cluster is added according to the second adjustment configuration information to obtain a configured soft load cluster.
[0095] Specifically, the instructions in the second adjustment configuration information are traversed to search for instructions and content for adding new associated information. If the result of the traversal is that an instruction for adding new associated information is found, and the content of the new associated information is further found, then the corresponding container identifier in the associated information configuration file described in the adjustment instruction of the second adjustment configuration information for the soft load cluster is added to obtain the configured soft load cluster, and finally the soft load cluster service is restarted.
[0096] For example, the instructions corresponding to (A+B+C+D) in the first adjustment configuration information (A+B+C+D) are traversed to search for instructions and content for adding new associated information. If the search result is any instruction for adding new associated information, the corresponding container identifiers 1-10 in the associated information configuration file described in the second adjustment configuration information for the soft load cluster are added according to the instructions in the second adjustment configuration information (A+B+C+D) to obtain the configured soft load cluster, and finally restart the soft load cluster service.
[0097] In this embodiment, by determining that new association information needs to be added to the first adjustment configuration information and the second adjustment configuration information, the registration center and the soft load cluster to which the new association information needs to be added can be correctly configured.
[0098] In one embodiment, the process of adding / modifying / deleting the target association information in the association information configuration file corresponding to the soft load association container is as follows: Fig.11 shown.
[0099] In one embodiment, Figure 6 As shown, the target association information set corresponding to the registration center includes at least one target association information, and the method further includes:
[0100] Step 602: If the registration center has a container identifier corresponding to the container, the registration center is queried to see whether the format of the container routing information corresponding to the container identifier is normal.
[0101] The container routing information can be a "key-value" pair formed with the container identifier, which is used to represent the quantity of specific attribute information of the container routing. Among them: the container identifier (key) is the unique identifier of the container, and the corresponding "value" can be obtained through the "key". The content of the container routing information (value) is the container IP and port. The "value" of a "key" can be multiple container IPs and ports, or it can be empty.
[0102] Specifically, the container identifiers corresponding to all containers of the registration center are traversed, the information corresponding to the container identifier in the target association information is queried, and whether the container identifier information exists is judged. If the container identifier does not exist, new association information is added to the target association information, wherein the new association information includes at least one newly added container identifier; if the container identifier exists, the corresponding attribute information of one or more container routing information corresponding to each container identifier in the target association information is queried, and whether the format of the container routing information corresponding to the container identifier is normal is queried through the registration center.
[0103] For example, traverse the container identifiers 1-100 corresponding to all containers in the registration center, query the information 1-100 corresponding to the container identifier in the target association information, then query the corresponding attribute information of one or more container routing information corresponding to the container identifier 1-100 in the target association information, and query the registration center through the registration center whether the format of the container routing information 1-1000 corresponding to the container identifier is normal.
[0104] Step 604: If the format corresponding to the container routing information is normal, a configuration information check is performed on the associated information configuration file in the soft load cluster according to the service node in the soft load cluster and the container identifier corresponding to the container.
[0105] The configuration information check may be a check on the legitimacy of a "key-value" pair consisting of a container identifier and container routing information in an associated information configuration file in the soft load cluster.
[0106] Among them, the business node can be the smallest load unit on the soft load cluster. A group of containers associated with the same business node provide the same service to the outside world. There can be multiple business nodes on a soft load cluster.
[0107] Specifically, the format of at least one container routing information corresponding to each container identifier is traversed through the registration center. If it is found that the formats of these container routing information are normal, the "key-value" pair consisting of the container identifier and the container routing information in the association information configuration file carrying the target association information in the soft load cluster is checked for legitimacy according to the service node (minimum load unit) in the soft load cluster and the container identifier corresponding to each container.
[0108] For example, the registration center traverses the format 1-N of at least one container routing information corresponding to each container identifier 1-100, and finds that the formats of these container routing information 1-N are all normal. Then, according to the business node ag in the soft load cluster and the container identifier 1-100 corresponding to the container, the "key-value" pair consisting of the container identifier 1-100 and the container routing information 1-N in the association information configuration file H that carries the target association information in the soft load cluster is checked for legitimacy. If the association information configuration file is consistent with the stored association information, the next verification cycle is directly entered. If the association information configuration file is inconsistent with the stored association information, the soft load system will regenerate the correct association information configuration file and send it to the soft load cluster. After the association information configuration file is sent, the soft load system immediately restarts the services of all servers under the configured soft load cluster, and enters the next verification cycle after the restart is completed.
[0109] Step 606, if the format corresponding to the container routing information is abnormal, after deleting each container routing information in the target association information set corresponding to the registration center, the association information configuration file in the soft load cluster is checked according to the service node in the soft load cluster and the container identifier corresponding to the container.
[0110] Specifically, the format of at least one container routing information corresponding to each container identifier is traversed through the registration center. If the format of these container routing information is found to be abnormal, after deleting each container routing information in the target association information set composed of at least two target association information in the registration center, the "key-value" pair composed of the container identifier and the container routing information in the association information configuration file including the target association information in the soft load cluster is checked for legitimacy according to the service node (minimum load unit) in the soft load cluster and the container identifier corresponding to each container. If the association information configuration file is consistent with the stored association information, the next verification cycle is directly entered. If the association information configuration file is inconsistent with the stored association information, the soft load system will regenerate the correct association information configuration file and send it to the soft load cluster. After the association information configuration file is sent, the soft load system immediately restarts the services of all servers under the configured soft load cluster, and enters the next verification cycle after the restart is completed.
[0111] For example, by traversing the formats 1-N of at least one container routing information corresponding to each container identifier 1-100 through the registration center, if it is found that the formats of these container routing information 1-N are abnormal, then after deleting each container routing information 1-N in the target association information set composed of at least two target association information in the registration center, the "key-value" pair composed of the container identifier 1-100 and the container routing information 1-N in the association information configuration file H carrying the target association information in the soft load cluster is checked for legitimacy according to the service node ag in the soft load cluster and the container identifier 1-100 corresponding to the container.
[0112] Step 608, or, if the registration center does not have the container identifier corresponding to the container, after adding the container identifier corresponding to the container through the registration center, the associated information configuration file in the soft load cluster is checked for configuration information according to the service node in the soft load cluster and the container identifier corresponding to the container.
[0113] Specifically, the registration center traverses the format of at least one container routing information corresponding to each container identifier, and if it is found that these container identifiers do not exist or an error occurs, then the registration center adds a container identifier corresponding to at least one container, and after pairing the container identifier and the container routing information, the "key-value" pair consisting of the container identifier and the container routing information in the association information configuration file including the target association information in the soft load cluster is checked for legitimacy according to the service node (minimum load unit) in the soft load cluster and the container identifier corresponding to each container. If the association information configuration file is consistent with the stored association information, the next verification cycle is directly entered. If the association information configuration file is inconsistent with the stored association information, the soft load system will regenerate the correct association information configuration file and send it to the soft load cluster. After the association information configuration file is sent, the soft load system immediately restarts the services of all servers under the configured soft load cluster, and enters the next verification cycle after the restart is completed.
[0114] For example, the registration center traverses the formats 1-N of at least one container routing information corresponding to each container identifier 1-100, and finds that these container identifiers do not exist or an error occurs. Then, the registration center adds a container identifier 101-200 corresponding to at least one container, and after pairing the container identifier 101-200 and the container routing information NM, the "key-value" pair consisting of the container identifier 101-200 and the container routing information NM in the association information configuration file K carrying the target association information in the soft load cluster is checked for legitimacy according to the service node ag in the soft load cluster and the container identifier 101-200 corresponding to the container.
[0115] In this embodiment, by judging whether the registration center has a container identifier and querying whether the format of the container routing information is normal, the corresponding configuration information checks can be accurately performed for the three situations of the existence of a container identifier and a normal format, the existence of a container identifier and an abnormal format, and the absence of a container identifier.
[0116] In one embodiment, Figure 7 As shown, the method also includes:
[0117] Step 702, if the result of the configuration information check is abnormal, re-execute the step of generating second adjustment configuration information for the soft load cluster according to the soft load cluster number, business node name, container identifier corresponding to the container and configuration method in the target association information, and configure the association information configuration file in the soft load cluster according to the second adjustment configuration information to obtain the step of configuring the soft load cluster.
[0118] Specifically, if the business node (minimum load unit) in the soft load cluster and the container identifier corresponding to each container perform a validity check on the "key-value" pair consisting of the container identifier and the container routing information in the association information configuration file including the target association information in the soft load cluster, and the corresponding result is abnormal, then the step of "generating a new soft load template file configuration according to the soft load cluster number, business node name, container identifier of the associated container and the corresponding information input type (addition / modification / deletion) in the target association information passed in, that is, generating the second adjustment configuration information for the soft load cluster; the soft load cluster records the unadjusted association information configuration file, and the command in the second adjustment configuration information generated according to the soft load cluster number, business node name, container identifier corresponding to the container and the configuration method adjusts the container identifier, container routing information and the pairing relationship between the two to obtain a configured soft load cluster" is re-executed.
[0119] For example, if the result of the legitimacy check of the "key-value" pair consisting of the container identifier 1-100 and the container routing information 1-N in the association information configuration file H including the target association information in the soft load cluster is abnormal according to the business node ag in the soft load cluster and the container identifier 1-100 corresponding to the container, then the step of "generating a new soft load template file configuration (A+B+C+D) according to the configuration method B formed by the soft load cluster number C, the business node name D, the container identifier A of the associated container and the corresponding deletion information input type in the incoming target association information, that is, generating the second adjustment configuration information (A+B+C+D) for the soft load cluster; configuring the association information configuration file in the soft load cluster according to the second adjustment configuration information (A+B+C+D) to obtain the configured soft load cluster Y" is repeated.
[0120] Step 704: restart the configured soft load cluster.
[0121] Specifically, the soft load system will regenerate the correct association information configuration file and send it to the soft load cluster. After the association information configuration file is sent, the soft load system will immediately restart the services of all servers under the configured soft load cluster, and enter the next verification cycle after the restart is completed.
[0122] In this embodiment, by determining that the configuration information check result is abnormal, the soft load cluster is further reconfigured, so that errors of the soft load system can be corrected in time and the operation stability of the soft load system can be improved.
[0123] In one embodiment, Figure 8 As shown, the method also includes:
[0124] Step 802 : storing the first adjustment configuration information and the target association information corresponding to the configured registration center, and the second adjustment configuration information and the association information configuration file corresponding to the configured soft load cluster, to generate stored soft load system configuration information.
[0125] The stored soft load system configuration information may be a configuration information record file generated by combining the first adjustment configuration information, the target association information, the second adjustment configuration information and the association information configuration file.
[0126] Specifically, the first adjustment configuration information, the target association information corresponding to the configured registration center, the second adjustment configuration information and the association information configuration file corresponding to the configured soft load cluster are extracted respectively, transmitted to the storage unit of the server, and all the above information is merged into one file, which is represented by the stored soft load system configuration information file.
[0127] For example, the first adjustment configuration information (A+B), the second adjustment configuration information (A+B+C+D), the target association file corresponding to the configured registration center X, and the association information configuration file corresponding to the configured soft load cluster Y are simultaneously input into the storage unit of the server and collectively referred to as the same file, which is the stored soft load system configuration information file Z.
[0128] Step 804 : in response to a visualization display request for the stored soft load system configuration information, the stored soft load system configuration information is visualized.
[0129] Specifically, the soft load system responds to the instruction input by the user, transmits the user's visualization display request to the stored soft load system configuration information, and performs visualization display on the stored soft load system configuration information in the server storage unit.
[0130] For example, the soft load system responds to the instructions input by users 1-10 and issues corresponding commands to the stored soft load system configuration information Z according to the instructions to meet the user's visualization display request, so that the stored soft load system configuration information Z in the server storage unit is visualized through the visualization device.
[0131] In one embodiment, the process of checking / repairing the configuration information of the soft load associated container is as follows: Fig.12 shown.
[0132] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0133] Based on the same inventive concept, the embodiment of the present application also provides a soft load system configuration device for implementing the soft load system configuration method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more soft load system configuration device embodiments provided below can refer to the limitations of the soft load system configuration method above, and will not be repeated here.
[0134] In one embodiment, Fig.13 As shown, a soft load system configuration device is provided, comprising: a configuration request receiving module, an adjustment configuration information generating module and an adjustment configuration information application module, wherein:
[0135] The configuration request receiving module 1302 is used to receive a configuration request initiated for target association information; the target association information is used to characterize the association relationship between the soft load service node to be configured and the container; the configuration request is used to indicate the configuration method of the target association information;
[0136] The adjustment configuration information generation module 1304 is used to generate first adjustment configuration information for the registration center according to the container identifier and configuration method corresponding to the container; and to generate second adjustment configuration information for the soft load cluster according to the soft load cluster number, the service node name, the container identifier and configuration method corresponding to the container in the target association information; the soft load cluster is used to receive the data stream containing the container information sent by the registration center;
[0137] The configuration information adjustment application module 1306 is used to configure the target association information recorded in the registration center according to the first adjustment configuration information to obtain a configured registration center, and to configure the association information configuration file in the soft load cluster according to the second adjustment configuration information to obtain a configured soft load cluster; the association information configuration file is used to record at least one target association information in the soft load cluster.
[0138] In one of the embodiments, the configuration information application module is further used to determine whether the target association information needs to be deleted if it is determined according to the first adjustment configuration information that new association information does not need to be added; if the target association information does not need to be deleted, the container identifier corresponding to the target association information is deleted according to the first adjustment configuration information, and the container identifier corresponding to the new association information is added to obtain a configured registration center; if it is determined according to the second adjustment configuration information that new association information does not need to be added, determine whether the target association information needs to be deleted; if the target association information does not need to be deleted, the corresponding container identifier in the association information configuration file in the soft load cluster is adjusted according to the second adjustment configuration information to obtain a configured soft load cluster.
[0139] In one of the embodiments, the configuration information application module is further used to, if the target association information needs to be deleted, delete the container identifier corresponding to the target association information according to the first adjustment configuration information to obtain a configured registration center; and / or, if the target association information needs to be deleted, delete the corresponding container identifier in the association information configuration file in the soft load cluster according to the second adjustment configuration information to obtain a configured soft load cluster.
[0140] In one of the embodiments, the configuration information application module is further used to, if it is determined according to the first adjustment configuration information that new association information needs to be added, add the container identifier corresponding to the target association information according to the first adjustment configuration information to obtain a configured registration center; if it is determined according to the second adjustment configuration information that new association information needs to be added, add the corresponding container identifier in the association information configuration file in the soft load cluster according to the second adjustment configuration information to obtain a configured soft load cluster.
[0141] In one of the embodiments, the configuration information checking module is further used to, if the registration center has a container identifier corresponding to the container, query through the registration center whether the format of the container routing information corresponding to the container identifier is normal; if the format corresponding to the container routing information is normal, then perform a configuration information check on the associated information configuration file in the soft load cluster according to the service node in the soft load cluster and the container identifier corresponding to the container; if the format corresponding to the container routing information is abnormal, then after deleting each container routing information in the target associated information set corresponding to the registration center, perform a configuration information check on the associated information configuration file in the soft load cluster according to the service node in the soft load cluster and the container identifier corresponding to the container; or, if the registration center does not have a container identifier corresponding to the container, then after adding the container identifier corresponding to the container through the registration center, perform a configuration information check on the associated information configuration file in the soft load cluster according to the service node in the soft load cluster and the container identifier corresponding to the container.
[0142] In one of the embodiments, the configuration information checking module is further used to, if the result of the configuration information checking is abnormal, re-execute the steps of generating second adjustment configuration information for the soft load cluster according to the soft load cluster number, the business node name, the container identifier corresponding to the container, and the configuration method in the target association information, and configuring the association information configuration file in the soft load cluster according to the second adjustment configuration information to obtain a configured soft load cluster; and restart the configured soft load cluster.
[0143] In one of the embodiments, a visualization display module is used to store the target association information corresponding to the first adjustment configuration information and the configured registration center, and the association information configuration file corresponding to the second adjustment configuration information and the configured soft load cluster, to generate stored soft load system configuration information; and in response to a visualization display request for the stored soft load system configuration information, the stored soft load system configuration information is visualized.
[0144] Each module in the above-mentioned soft load system configuration device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each of the above modules.
[0145] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig.14As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store server data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a soft load system configuration method is implemented.
[0146] Those skilled in the art will understand that Fig.14 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0147] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0148] In one embodiment, a computer-readable storage medium is provided, storing a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0149] In one embodiment, a computer program product or computer program is provided, the computer program product or computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps in the above-mentioned method embodiments.
[0150] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0151] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0152] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0153] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A soft load system configuration method, characterized in that: The method comprises: Receiving a configuration request initiated for target association information; the target association information is used to characterize the association relationship between the soft load service node to be configured and the container; the configuration request is used to indicate a configuration method for the target association information; Generate first adjustment configuration information for the registration center according to the container identifier corresponding to the container and the configuration method; and generate second adjustment configuration information for the soft load cluster according to the soft load cluster number, the service node name, the container identifier corresponding to the container and the configuration method in the target association information; the soft load cluster is used to receive the data stream containing container information sent by the registration center; According to the first adjustment configuration information, the target association information recorded in the registration center is configured to obtain a configured registration center, and, according to the second adjustment configuration information, the association information configuration file in the soft load cluster is configured to obtain a configured soft load cluster; the association information configuration file is used to record at least one of the target association information in the soft load cluster; wherein, the registration center records unadjusted target association information, generates a command in the first adjustment configuration information according to the container identifier and configuration method corresponding to the container, and uses the command to adjust the container identifier, container routing information and the pairing relationship between the two to obtain the configured registration center.
2. The method according to claim 1, characterized in that The configuring the target association information recorded in the registration center according to the first adjustment configuration information to obtain a configured registration center includes: If it is determined according to the first adjustment configuration information that new association information does not need to be added, determining whether the target association information needs to be deleted; If the target association information does not need to be deleted, deleting the container identifier corresponding to the target association information according to the first adjustment configuration information, and adding the container identifier corresponding to the new association information to obtain a configured registration center; The configuring the associated information configuration file in the soft load cluster according to the second adjustment configuration information to obtain a configured soft load cluster includes: If it is determined according to the second adjustment configuration information that new association information does not need to be added, determining whether the target association information needs to be deleted; If the target association information does not need to be deleted, the corresponding container identifier in the association information configuration file in the soft load cluster is adjusted according to the second adjustment configuration information to obtain a configured soft load cluster.
3. The method according to claim 2, characterized in that The method further comprises: If the target association information needs to be deleted, the container identifier corresponding to the target association information is deleted according to the first adjustment configuration information to obtain the configured registration center; and / or, If the target association information needs to be deleted, the corresponding container identifier in the association information configuration file in the soft load cluster is deleted according to the second adjustment configuration information to obtain a configured soft load cluster.
4. The method according to claim 1, characterized in that: After configuring the target association information recorded in the registration center according to the first adjustment configuration information to obtain the configured registration center, the method further includes: If it is determined that new association information needs to be added according to the first adjustment configuration information, then a container identifier corresponding to the target association information is added according to the first adjustment configuration information to obtain a configured registration center; The configuring the associated information configuration file in the soft load cluster according to the second adjustment configuration information to obtain a configured soft load cluster includes: If it is determined according to the second adjustment configuration information that new association information needs to be added, then according to the second adjustment configuration information, the corresponding container identifier in the association information configuration file in the soft load cluster is added to obtain a configured soft load cluster.
5. The method according to any one of claims 1 to 4, characterized in that: The target association information set corresponding to the registration center includes at least one target association information, and the method further includes: If the registration center has a container identifier corresponding to the container, querying the registration center whether the format of the container routing information corresponding to the container identifier is normal; If the format corresponding to the container routing information is normal, performing a configuration information check on the associated information configuration file in the soft load cluster according to the service node in the soft load cluster and the container identifier corresponding to the container; If the format corresponding to the container routing information is abnormal, after deleting each container routing information in the target association information set corresponding to the registration center, a configuration information check is performed on the association information configuration file in the soft load cluster according to the service node in the soft load cluster and the container identifier corresponding to the container; Alternatively, if the registration center does not have a container identifier corresponding to the container, after adding the container identifier corresponding to the container through the registration center, the configuration information of the associated information configuration file in the soft load cluster is checked according to the service node in the soft load cluster and the container identifier corresponding to the container.
6. The method according to claim 5, characterized in that The method further comprises: If the result of the configuration information check is abnormal, re-execute the step of generating the second adjustment configuration information for the soft load cluster according to the soft load cluster number in the target association information, the service node name, the container identifier corresponding to the container, and the configuration method, and configuring the association information configuration file in the soft load cluster according to the second adjustment configuration information to obtain the configured soft load cluster; Restart the configured soft load cluster.
7. The method according to claim 6, characterized in that The method further comprises: The first adjustment configuration information and the target association information corresponding to the configured registration center, and the second adjustment configuration information and the association information configuration file corresponding to the configured soft load cluster are stored to generate stored soft load system configuration information; In response to a visualization display request for the stored soft load system configuration information, the stored soft load system configuration information is visualized.
8. A soft load system configuration device, characterized in that: The device comprises: A configuration request receiving module, used to receive a configuration request initiated for target association information; the target association information is used to characterize the association relationship between the soft load service node to be configured and the container; the configuration request is used to indicate a configuration method for the target association information; An adjustment configuration information generation module is used to generate first adjustment configuration information for a registration center according to a container identifier corresponding to the container and the configuration method; and to generate second adjustment configuration information for the soft load cluster according to a soft load cluster number, a service node name, a container identifier corresponding to the container and the configuration method in the target association information; the soft load cluster is used to receive a data stream containing container information sent by the registration center; The configuration information application module is used to configure the target association information recorded in the registration center according to the first adjustment configuration information to obtain a configured registration center, and to configure the association information configuration file in the soft load cluster according to the second adjustment configuration information to obtain a configured soft load cluster; the association information configuration file is used to record at least one target association information in the soft load cluster; wherein the registration center records unadjusted target association information, generates a command in the first adjustment configuration information according to the container identifier and configuration method corresponding to the container, and uses the command to adjust the container identifier, container routing information and the pairing relationship between the two to obtain the configured registration center.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Device and method for balancing active load of Docker container
CN106790595A