Distributed cluster capacity expansion method and device, equipment and storage medium

By sorting and extracting and verifying the servers in a distributed cluster, the problem of unstable configuration information import during the capacity expansion of distributed clusters in the existing technology is solved, and fast and accurate capacity expansion and performance optimization are achieved.

CN119945901AActive Publication Date: 2025-05-06INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510098389.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-22
Publication Date
2025-05-06
Estimated Expiration
2045-01-22

AI Technical Summary

Technical Problem

The existing technology lacks effective methods in the process of distributed cluster expansion to extract the configuration information of the physical server in the original cluster and correctly import the newly added servers, resulting in unstable expansion and affecting the performance of production services.

Method used

By classifying servers in a distributed cluster, extracting initial configuration information and distinguishing between static and dynamic configuration items, writing configuration content to the server to be expanded in turn, and checksum write operations are performed to ensure the correctness and consistency of configuration information.

Benefits of technology

It realizes rapid and accurate capacity expansion of distributed clusters, reduces manual intervention, improves the accuracy and correctness of configuration information, and avoids the performance impact during capacity expansion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119945901A_ABST
    Figure CN119945901A_ABST
Patent Text Reader

Abstract

The invention provides a distributed cluster capacity expansion method and device, equipment and a storage medium. The method comprises the steps that multiple servers in a distributed cluster are classified; extracting initial configuration information of one or more servers from each class and storing the initial configuration information, obtaining each initial sub-configuration item in the initial configuration information, and distinguishing each initial sub-configuration item as a static configuration item or a dynamic configuration item; according to the type of the initial sub-configuration item, sequentially writing the configuration content corresponding to each initial sub-configuration item into a to-be-expanded server and modifying the configuration content to obtain first configuration information; and when the first configuration information is correct, clearing the configuration information of the capacity expansion server, and writing the first configuration information as target configuration information into the server to be subjected to capacity expansion.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a distributed cluster expansion method, device, equipment and storage medium. Background Art

[0002] In the prior art, a distributed cluster generally needs to add multiple physical servers during the expansion process. The newly added physical servers are usually manually configured according to general configuration methods, and there is no method to simply and quickly configure the newly added physical servers to achieve the same configuration as the original cluster server. Since the configuration information content of the physical servers in the original cluster is relatively complex, the logical correlation between the host and the cluster is strong, and there is a lack of a complete configuration information collection method from the physical server to the cluster. At the same time, due to the complexity of the information, there is still no good method to import the information into the newly added servers and ensure that the newly added servers are correctly expanded into the existing cluster, that is, there is a lack of a method to extract the cluster configuration information of the physical servers in the original cluster, and then import it to the newly added physical servers through an effective method and apply it correctly.

[0003] In addition, when the original distributed cluster expands the physical server capacity, it will automatically trigger a data resource balancing operation, synchronize data resources, and trigger a large number of reads and writes, which will affect the performance of the cluster's production business.

[0004] Therefore, in view of the shortcomings of the existing technical solutions, the present invention provides a distributed cluster capacity expansion method. Summary of the invention

[0005] Based on this, it is necessary to provide a distributed cluster expansion method, device, equipment and storage medium to address the above technical problems.

[0006] On the one hand, a distributed cluster expansion method is provided, the method comprising: in response to the expansion demand of the distributed cluster, classifying multiple servers in the distributed cluster according to the hardware configuration type and / or business load type of the server; extracting and storing the initial configuration information of one or more servers from each classification, obtaining each initial sub-configuration item in the initial configuration information, and distinguishing each initial sub-configuration item as a static configuration item or a dynamic configuration item according to the initial sub-configuration content corresponding to each initial sub-configuration item; according to the type of the initial sub-configuration item, writing the configuration content corresponding to each initial sub-configuration item into one or more servers to be expanded and modifying it in turn to obtain first configuration information; comparing the first configuration information with the initial configuration information and / or a list to be expanded to verify the correctness of the first configuration information, wherein the list to be expanded includes the dynamic information of the one or more servers to be expanded; when the first configuration information is correct, clearing the configuration information of the one or more servers to be expanded, and writing the first configuration information as the target configuration information into the one or more servers to be expanded.

[0007] Optionally, the distinguishing each initial sub-configuration item as a static configuration item or a dynamic configuration item includes: according to the initial sub-configuration item, collecting initial sub-configuration contents corresponding to the initial sub-configuration items in multiple servers, and judging whether the initial sub-configuration contents corresponding to each server are the same; when the initial sub-configuration contents corresponding to the initial sub-configuration items of each server are the same, determining that the initial sub-configuration item is a static configuration item; when there are servers whose initial sub-configuration contents corresponding to the initial sub-configuration items are different, taking the initial sub-configuration content with the largest number of repetitions as the first configuration content, and judging whether the number of repetitions of the first configuration content is greater than or equal to a first preset value; if the number of repetitions of the first configuration content is greater than or equal to a first preset value, The number is less than the first preset value, determining that the initial sub-configuration item corresponding to the first configuration content is a dynamic configuration item; if the number of repetitions of the first configuration content is greater than or equal to the first preset value, calculating the deviation value between the initial sub-configuration content of each server and the first configuration content in turn; when the deviation value between the initial sub-configuration content of each server and the first configuration content is less than or equal to the first preset range, determining that the initial sub-configuration item corresponding to the initial sub-configuration content is a static configuration item; when there is a server whose initial sub-configuration content and the first configuration content have a deviation value greater than the first preset range, determining that the initial sub-configuration item corresponding to the initial sub-configuration content is a dynamic configuration item.

[0008] Optionally, according to the type of the initial sub-configuration item, the configuration content corresponding to each initial sub-configuration item is written into one or more servers to be expanded and modified in turn to obtain the first configuration information, including: determining in turn whether each initial sub-configuration item is static configuration information or dynamic configuration information; when the initial sub-configuration item is a static configuration item, determining the static configuration content of the static configuration item according to the initial sub-configuration content, and writing the static configuration content into the one or more servers to be expanded; when the initial sub-configuration item is a dynamic configuration item, determining the dynamic configuration content of the dynamic configuration item according to the list to be expanded, and writing the dynamic configuration content into the one or more servers to be expanded.

[0009] Optionally, according to the type of the initial sub-configuration item, the configuration content corresponding to each initial sub-configuration item is written into one or more servers to be expanded and modified in turn to obtain the first configuration information, including: writing the configuration content corresponding to each initial sub-configuration item into the one or more servers to be expanded to obtain pre-application configuration information of each server to be expanded; running the one or more servers to be expanded based on the pre-application configuration information, and recording the running status of the one or more servers to be expanded through the running log; monitoring the running log, and when it is monitored that the running log reports an error, determining the server to be expanded that reports the error, stopping the server to be expanded that reports the error, comparing the pre-application configuration information of the server to be expanded that reports the error with the initial configuration information one by one, determining the erroneous configuration information and sending it to the user; receiving the modified erroneous configuration information returned by the user, writing the modified erroneous configuration information into the server to be expanded that reports the error and running it, and detecting whether the modified configuration information is correct; when the modified configuration information is correct, obtaining the first configuration information.

[0010] Optionally, comparing the first configuration information with the initial configuration information and / or the list to be expanded to verify the correctness of the first configuration information includes: checking each first sub-configuration item and first sub-configuration content in the first configuration information in turn; when the first sub-configuration item is a static configuration item, comparing the first sub-configuration content with the corresponding initial sub-configuration content to determine whether they are consistent; when the first sub-configuration content is consistent with the initial sub-configuration content, the first sub-configuration content is the correct configuration content; when the first sub-configuration item is a dynamic configuration item, comparing the first sub-configuration content with the list to be expanded; when the first sub-configuration content is consistent with the information in the list to be expanded, the first sub-configuration content is the correct configuration content.

[0011] Optionally, the method also includes: determining the maximum resource value of each server according to the hardware type of each server in the distributed cluster; determining the maximum resource value of the distributed cluster according to the maximum resource value of each server; reading the current resource value of the distributed cluster according to the business load of each server; subtracting the current resource value from the maximum resource value to obtain a theoretical available resource value; subtracting the operating resource value of the distributed cluster from the theoretical available resource value to obtain the available resource value of the one or more servers to be expanded; and expanding the one or more servers to be expanded based on the available resource value.

[0012] Optionally, expanding the one or more servers to be expanded based on the available resource value includes: determining a first available resource value of a first server to be expanded based on the available resource value and the number of servers to be expanded; expanding the first server to be expanded according to the first available resource value; when the expansion of the first server to be expanded is successful, recording the resource configuration corresponding to the first server to be expanded in a storage space, and applying the resource configuration, wherein the resource configuration includes the current resource value, the maximum resource value and the first available resource value; when the expansion of the first server to be expanded fails, reading and applying the resource configuration corresponding to the previous successful expansion.

[0013] On the other hand, a distributed cluster expansion device is provided, the device comprising: a classification module, for classifying multiple servers in the distributed cluster according to the hardware configuration type and / or business load type of the server in response to the expansion demand of the distributed cluster; a processing module, for extracting and storing the initial configuration information of one or more servers from each classification, obtaining each initial sub-configuration item in the initial configuration information, and distinguishing each initial sub-configuration item as a static configuration item or a dynamic configuration item according to the initial sub-configuration content corresponding to each initial sub-configuration item; a configuration module, for writing and modifying the configuration content corresponding to each initial sub-configuration item in turn to one or more servers to be expanded according to the type of the initial sub-configuration item, to obtain first configuration information; a verification module, for comparing the first configuration information with the initial configuration information and / or a list to be expanded, and verifying the correctness of the first configuration information, wherein the list to be expanded includes the dynamic information of the one or more servers to be expanded; a writing module, for clearing the configuration information of the one or more servers to be expanded when the first configuration information is correct, and writing the first configuration information as the target configuration information to the one or more servers to be expanded.

[0014] On the other hand, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program: in response to the expansion demand of the distributed cluster, classify multiple servers in the distributed cluster according to the hardware configuration type and / or business load type of the server; extract and store the initial configuration information of one or more servers from each classification, obtain each initial sub-configuration item in the initial configuration information, and distinguish each initial sub-configuration item as a static configuration item or a dynamic configuration item according to the initial sub-configuration content corresponding to each initial sub-configuration item; according to the type of the initial sub-configuration item, write the configuration content corresponding to each initial sub-configuration item to one or more servers to be expanded and modify it in turn to obtain first configuration information; compare the first configuration information with the initial configuration information and / or the list to be expanded to verify the correctness of the first configuration information, wherein the list to be expanded includes the dynamic information of the one or more servers to be expanded; when the first configuration information is correct, clear the configuration information of the one or more servers to be expanded, and write the first configuration information as the target configuration information to the one or more servers to be expanded.

[0015] On the other hand, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: in response to the expansion demand of the distributed cluster, multiple servers in the distributed cluster are classified according to the hardware configuration type and / or business load type of the server; initial configuration information of one or more servers is extracted and stored from each classification, each initial sub-configuration item in the initial configuration information is obtained, and each initial sub-configuration item is distinguished as a static configuration item or a dynamic configuration item according to the initial sub-configuration content corresponding to each initial sub-configuration item; according to the type of the initial sub-configuration item, the configuration content corresponding to each initial sub-configuration item is written into one or more servers to be expanded and modified in turn to obtain first configuration information; the first configuration information is compared with the initial configuration information and / or the list to be expanded to verify the correctness of the first configuration information, wherein the list to be expanded includes the dynamic information of the one or more servers to be expanded; when the first configuration information is correct, the configuration information of the one or more servers to be expanded is cleared, and the first configuration information is written into the one or more servers to be expanded as the target configuration information.

[0016] The above-mentioned distributed cluster expansion method, device, equipment and storage medium, the method includes: in response to the expansion demand of the distributed cluster, classifying multiple servers in the distributed cluster according to the hardware configuration type and / or business load type of the server; extracting and storing the initial configuration information of one or more servers from each classification, obtaining each initial sub-configuration item in the initial configuration information, and distinguishing each initial sub-configuration item as a static configuration item or a dynamic configuration item according to the initial sub-configuration content corresponding to each initial sub-configuration item; according to the type of the initial sub-configuration item, writing the configuration content corresponding to each initial sub-configuration item into one or more servers to be expanded and modifying them to obtain the first configuration information; The first configuration information is compared with the initial configuration information and / or the list of servers to be expanded to verify the correctness of the first configuration information, wherein the list of servers to be expanded includes dynamic information of the one or more servers to be expanded; when the first configuration information is correct, the configuration information of the one or more servers to be expanded is cleared, and the first configuration information is written into the one or more servers to be expanded as the target configuration information; in this way, by extracting the configuration information of servers of different categories, the accuracy of the configuration information can be improved; the configuration information is verified twice to ensure the correctness of the information; by distinguishing dynamic configuration items from static configuration items and automatically generating configuration content, the workload of manual intervention and the possibility of errors can be reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 A schematic diagram of a process of a distributed cluster expansion method in one embodiment;

[0018] Figure 2 A schematic diagram of a capacity expansion process of a distributed cluster capacity expansion method in one embodiment;

[0019] Figure 3 A schematic diagram of the system architecture of a distributed cluster expansion method in one embodiment;

[0020] Figure 4 It is a structural block diagram of a distributed cluster expansion device in one embodiment;

[0021] Figure 5 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0022] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0023] It should be understood that in the description of the present application, unless the context clearly requires otherwise, words such as "include", "comprises", and the like throughout the specification should be interpreted as including rather than being exclusive or exhaustive; that is, as including but not limited to.

[0024] It should also be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of this application, unless otherwise specified, "plurality" means two or more.

[0025] It should be noted that the terms "S1", "S2", etc. are only used for the purpose of describing the steps, and do not specifically refer to the order or sequence, nor are they used to limit the present application. They are only for the convenience of describing the method of the present application, and cannot be understood as indicating the order of the steps. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in this field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection required by the present application.

[0026] In one embodiment, Figure 1 As shown, a distributed cluster expansion method is provided, comprising the following steps:

[0027] S101: In response to a capacity expansion demand of a distributed cluster, a plurality of servers in the distributed cluster are classified according to hardware configuration types and / or service load types of the servers.

[0028] Here, hardware may include central processing unit, memory, hard disk, motherboard and other hardware; services may include web applications, database management, mail services, multimedia processing, game servers and other services.

[0029] Among them, a distributed cluster is a system composed of multiple independent computers (nodes) that work together through a network connection to provide higher performance, availability, and scalability than a single computer. A distributed cluster can be a hyper-converged cluster, a high-availability cluster, a load balancing cluster, a big data processing cluster, a container orchestration cluster, a database cluster, a message queue cluster, etc.

[0030] The capacity expansion demand can be issued by the user as an expansion instruction, or it can be automatically generated when the servers in the current cluster cannot meet the normal operation requirements during the processing of the distributed cluster.

[0031] S102: extracting and storing initial configuration information of one or more servers from each category, obtaining each initial sub-configuration item in the initial configuration information, and distinguishing each initial sub-configuration item as a static configuration item or a dynamic configuration item according to the initial sub-configuration content corresponding to each initial sub-configuration item.

[0032] Here, the initial configuration information may include server configuration information and cluster configuration information, for example, it may include the server's CPU (Central Processing Unit), memory and other hardware configurations and firmware version, host name, IP (Internet Protocol) address and other server system configuration information, cluster virtualization computing configuration information, distributed storage configuration information, and virtual network configuration information.

[0033] Here, different servers in the distributed cluster correspond to different server configurations, and different servers in the distributed cluster correspond to the same cluster configuration.

[0034] Here, static configuration items are configuration items corresponding to each server in the distributed cluster, and the content is the same. For example, static configuration items can be network configuration, security configuration, system resource limit configuration, log and monitoring configuration, service discovery and registration limit, etc. Dynamic configuration items are configuration items corresponding to each server in the distributed cluster, and the content may be different, for example, the server host name, the server host IP address, etc. Static configuration items and dynamic configuration items may be server configuration information or cluster configuration information.

[0035] The initial configuration information of each server may be stored in a configuration library.

[0036] Specifically, the servers in the distributed cluster are classified according to their hardware configuration types and business load types, and then a certain number of servers and cluster configuration information are randomly selected from each category.

[0037] S103: According to the type of the initial sub-configuration item, write the configuration content corresponding to each initial sub-configuration item into one or more servers to be expanded and modify them in turn to obtain first configuration information.

[0038] Specifically, according to the difference between dynamic configuration items and solid configuration items, the configuration items and their corresponding configuration contents are respectively filled into the server to be expanded, and the erroneous configuration contents are modified.

[0039] In one embodiment, when multiple servers to be expanded are expanded at the same time, the next step is executed after all the servers to be expanded have written configuration items and configuration contents into the servers to be expanded.

[0040] In one embodiment, before writing configuration items and configuration contents into one or more servers to be expanded, the configuration information of each server to be expanded is cleared to prevent old information from affecting normal expansion operations.

[0041] S104: Compare the first configuration information with the initial configuration information and / or the list of servers to be expanded to verify the correctness of the first configuration information, wherein the list of servers to be expanded includes dynamic information of one or more servers to be expanded.

[0042] Here, the list of capacity to be expanded includes server dynamic information such as the host name and corresponding IP address of the physical server to be expanded, and also includes cluster dynamic information.

[0043] S105: When the first configuration information is correct, clear the configuration information of one or more servers to be expanded, and write the first configuration information as target configuration information into the one or more servers to be expanded.

[0044] In one embodiment, when the first configuration information is incorrect, the process returns to the first step, reclassifies the servers in the distributed cluster and extracts configuration information.

[0045] It should be noted that the present application can improve the accuracy of configuration information by extracting configuration information of servers of different categories; perform secondary verification on the configuration information to ensure the correctness of the information; and automatically generate configuration content by distinguishing between dynamic configuration items and static configuration items, thereby reducing the workload of manual intervention and the possibility of errors.

[0046] In some specific implementations, distinguishing each initial sub-configuration item as a static configuration item or a dynamic configuration item includes:

[0047] According to the initial sub-configuration items, initial sub-configuration contents corresponding to the initial sub-configuration items in multiple servers are collected to determine whether the initial sub-configuration contents corresponding to each server are the same;

[0048] When the initial sub-configuration contents corresponding to each server initial sub-configuration item are the same, the initial sub-configuration item is determined to be a static configuration item;

[0049] When there are different initial sub-configuration contents corresponding to the initial sub-configuration items of the server, the initial sub-configuration content with the largest number of repetitions is used as the first configuration content, and it is determined whether the number of repetitions of the first configuration content is greater than or equal to a first preset value;

[0050] If the number of repetitions of the first configuration content is less than a first preset value, determining that the initial sub-configuration item corresponding to the first configuration content is a dynamic configuration item;

[0051] If the number of repetitions of the first configuration content is greater than or equal to the first preset value, the deviation value between the initial sub-configuration content of each server and the first configuration content is calculated in sequence;

[0052] When the deviation value between the initial sub-configuration content of each server and the first configuration content is less than or equal to the first preset range, determining that the initial sub-configuration item corresponding to the initial sub-configuration content is a static configuration item;

[0053] When there is a deviation value between the initial sub-configuration content of the server and the first configuration content that is greater than a first preset range, it is determined that the initial sub-configuration item corresponding to the initial sub-configuration content is a dynamic configuration item.

[0054] Here, the first preset value and the first preset range can be configured according to user requirements or business load requirements. For example, the first preset value can be 50% of the number of all servers, and the second preset range can be 5%.

[0055] Specifically, each configuration information collected and recorded from multiple servers is compared. Assuming that configuration item 1 is determined to be a static configuration item or a dynamic configuration item, configuration item 1 and the corresponding configuration content 1 of each server are obtained. When the configuration content 1 of each server is the same, configuration item 1 is a static configuration item. When there are different configuration contents 1, the configuration content 1 with the largest number of repetitions is obtained, and it is determined whether the number of repetitions exceeds 50% of the number of servers. When it does not exceed, configuration item 1 is a dynamic configuration item. When it exceeds, the configuration content 1 with the largest number of repetitions is used as a benchmark value, and the deviation between the configuration content 1 of other servers and the benchmark value is compared. When the deviation between the configuration content 1 of all servers and the benchmark value is less than or equal to 5%, configuration item 1 is a static configuration item. When the deviation between the configuration content 1 of a server and the benchmark value is greater than 5%, configuration item 1 is a dynamic configuration item.

[0056] In this way, by setting a reasonable tolerance, we can avoid misjudging some minor differences that do not actually affect system operation as dynamic configuration items.

[0057] In some specific implementations, according to the type of the initial sub-configuration item, the configuration content corresponding to each initial sub-configuration item is sequentially written into one or more servers to be expanded and modified to obtain the first configuration information, including:

[0058] Determine in sequence whether each initial sub-configuration item is static configuration information or dynamic configuration information;

[0059] When the initial sub-configuration item is a static configuration item, the static configuration content of the static configuration item is determined according to the initial sub-configuration content, and the static configuration content is written into one or more servers to be expanded;

[0060] When the initial sub-configuration item is a dynamic configuration item, the dynamic configuration content of the dynamic configuration item is determined according to the list to be expanded, and the dynamic configuration content is written into one or more servers to be expanded.

[0061] Specifically, the initial configuration information and the list to be expanded are read. For static configuration items, the configuration content corresponding to the static configuration items is obtained by reading the initial configuration information. For dynamic configuration items, the configuration content corresponding to the dynamic configuration items is obtained by reading the list to be expanded.

[0062] In this way, the configuration content is automatically filled into the server to be expanded according to the type of configuration item, reducing manual operations.

[0063] In some specific implementations, according to the type of the initial sub-configuration item, the configuration content corresponding to each initial sub-configuration item is sequentially written into one or more servers to be expanded and modified to obtain the first configuration information, including:

[0064] Write the configuration content corresponding to each initial sub-configuration item to one or more servers to be expanded, and obtain pre-application configuration information of each server to be expanded;

[0065] Running one or more servers to be expanded based on the pre-application configuration information, and recording the running status of the one or more servers to be expanded through the running log;

[0066] Monitor the operation log. When an error is detected in the operation log, determine the server to be expanded that has reported the error, stop running the server to be expanded that has reported the error, compare the pre-application configuration information of the server to be expanded that has reported the error with the initial configuration information one by one, determine the wrong configuration information and send it to the user;

[0067] The modified erroneous configuration information returned by the user is received, the modified erroneous configuration information is written into the server to be expanded that reports the error and runs the information to detect whether the modified configuration information is correct; if the modified configuration information is correct, the first configuration information is obtained.

[0068] Here, the operation log includes the operation status of each server to be expanded. Multiple servers to be expanded may be recorded in one operation log, or each server to be expanded may be recorded in a different operation log.

[0069] When all the configuration information in the pre-application configuration information is correct, the modification and rewriting of the pre-application information is finished.

[0070] Specifically, check the operation log of each server to be expanded. If an error is reported, stop the operation of the server accordingly, check the server and configuration items with the error, compare the configuration library contents one by one according to the error information, confirm the configuration items with the error, record the correct and incorrect servers and configuration items, and automatically re-execute the operation after manual intervention to correct the error until the configuration is written normally.

[0071] In this way, the incorrect configuration content is rewritten to ensure the correctness of the configuration, while improving the import efficiency and the ability to respond to abnormal situations.

[0072] In some specific implementations, comparing the first configuration information with the initial configuration information and / or the list of capacity to be expanded to verify the correctness of the first configuration information includes:

[0073] Checking each first sub-configuration item and first sub-configuration content in the first configuration information in sequence;

[0074] When the first sub-configuration item is a static configuration item, comparing the first sub-configuration content with the corresponding initial sub-configuration content to determine whether they are consistent;

[0075] When the first sub-configuration content is consistent with the initial sub-configuration content, the first sub-configuration content is the correct configuration content;

[0076] When the first sub-configuration item is a dynamic configuration item, the first sub-configuration content is compared with the list to be expanded;

[0077] When the first sub-configuration content is consistent with the information in the to-be-expanded list, the first sub-configuration content is the correct configuration content.

[0078] Among them, the configuration items and configuration contents can be exported to a newly created configuration library, the initial configuration information can be stored in an initial configuration library, the contents in the list to be expanded can be stored in a dynamic configuration library, and according to each configuration item in the initial configuration library and the dynamic configuration library, it can be checked whether it exists in the newly created configuration library and whether it is correct.

[0079] Specifically, there may be problems that are not detected during the writing process, such as missing configuration items, syntax errors, differences in permission settings, version compatibility issues, and consistency of environment variables.

[0080] In one embodiment, the initial configuration information and the configuration items in the to-be-expanded list may be compared one by one to see whether corresponding configuration items exist in the first configuration information, so as to prevent the situation where configuration items are missing.

[0081] In this way, through secondary verification, problems that were not detected during the write modification process can be verified, thereby improving the accuracy of the configuration.

[0082] In some embodiments, the method further comprises:

[0083] Determine the maximum resource value of each server based on the hardware type of each server in the distributed cluster;

[0084] Determine the maximum resource value of the distributed cluster based on the maximum resource value of each server;

[0085] Read the current resource value of the distributed cluster based on the business load of each server;

[0086] Subtract the current resource value from the maximum resource value to get the theoretical available resource value;

[0087] Subtract the running resource value of the distributed cluster from the theoretical available resource value to obtain the available resource value of one or more servers to be expanded;

[0088] Based on the available resource value, one or more servers to be expanded are expanded.

[0089] Here, the resource value may be an I / O (Input / Output) value, a bandwidth value, a CPU usage rate, a memory usage, a disk usage space, and the like.

[0090] Here, the hardware type of the server may be a physical hardware model of the server, such as a storage card, a disk, or a network card.

[0091] Here, the running resource value of the distributed cluster is the resource value consumed by the running of the distributed cluster itself, which can be a fixed value or a part of the maximum resource value, such as 20%, 15%, etc.

[0092] The maximum resource value of the server can be obtained by obtaining the maximum value of the server's storage card resources, the maximum value of the disk collection resources, and the maximum value of the resources in the network card IO link, and taking the minimum value of the maximum value of each component resource as the maximum resource value of the server.

[0093] When multiple servers to be expanded are expanded, the available resource value of each server to be expanded is obtained by dividing the available resource values ​​of the multiple servers to be expanded by the number of servers to be expanded.

[0094] Furthermore, when multiple servers to be expanded are expanded into the cluster in turn, the first server to be expanded can obtain the available resource value of the first server to be expanded by dividing the available resource value by the number of servers to be expanded. The second server to be expanded needs to recalculate the maximum resource value and current resource value of the distributed cluster after the first server to be expanded joins the cluster, obtain the available resource value of the remaining servers to be expanded, divide it by the number of remaining servers to be expanded, and obtain the available resource value of the second server to be expanded, and so on.

[0095] Specifically, the maximum resource value of the cluster is obtained based on the maximum resource value of each server. The sum of the current real-time resource values ​​of each server is read as the real-time resource value of the cluster according to the real-time business load situation. The real-time resource value is subtracted from the maximum resource value to obtain the theoretical available resource value. The theoretical available resource value is subtracted from the running resource value to obtain the available resource value of the server to be expanded.

[0096] In one embodiment, when multiple servers to be expanded are expanded, the multiple servers to be expanded can be calculated according to the hardware type and other characteristics of the servers to be expanded to obtain the weight of each server to be expanded. When calculating the available resource value, the weight of the server to be expanded is combined for allocation.

[0097] In this way, data resource balance can be achieved while ensuring that the resources of the cluster are not disturbed.

[0098] In some specific implementations, based on the available resource value, expanding the capacity of one or more servers to be expanded includes:

[0099] Determine a first available resource value of a first server to be expanded based on the available resource value and the number of servers to be expanded;

[0100] Expanding the capacity of the first server to be expanded according to the first available resource value;

[0101] When the capacity expansion of the first server to be expanded is successful, the resource configuration corresponding to the first server to be expanded is recorded in the storage space, and the resource configuration is applied, wherein the resource configuration includes a current resource value, a maximum resource value, and a first available resource value;

[0102] When the capacity expansion of the first server to be expanded fails, the resource configuration corresponding to the previous successful capacity expansion is read and applied.

[0103] Specifically, assuming that the servers to be expanded are server 1, server 2 and server 3, the available resource value of server 1 is obtained by dividing the available resource value by 3, and server 1 is expanded. When the expansion of server 1 fails, return to the first step to recalculate the available resource value of server 1. After the expansion of server 1 is successful, the resource configuration 1 corresponding to server 1 is recorded in the storage space, and the configuration of the cluster is adjusted according to the resource configuration 1. The available resource value of server 2 is calculated, and server 2 is expanded. After the expansion of server 2 is successful, the resource configuration 1 in the storage space is updated to the resource configuration 2 corresponding to server 2, and the configuration of the cluster is adjusted according to the resource configuration 2. After the expansion of server 2 fails, the resource configuration 1 is read from the storage space, and the configuration of the cluster is restored to the configuration corresponding to the resource configuration 1.

[0104] In this way, by recording the configuration status when the most recent expansion was successful, the distributed system can be restored to the most recent correct resource balance configuration status to ensure that the cluster business is not affected.

[0105] In some embodiments, the method further comprises:

[0106] Dynamically adjust the first preset value and the first preset range according to business conditions;

[0107] When the business is busy, lowering the first preset value and the first preset range;

[0108] When the service is idle, the first preset value and the first preset range are increased.

[0109] Specifically, the judgment scope of static configuration items can be relaxed during off-peak hours, allowing more configuration differences to exist without triggering alarms or interventions, while the judgment scope of static configuration items can be tightened during business peak hours to ensure system stability and performance.

[0110] In this way, its behavior is automatically adjusted according to the actual operating conditions, thus better adapting to different workload patterns.

[0111] In one embodiment, Figure 2 Schematic diagram of the expansion process in the embodiment of the present application, such as Figure 2 As shown, the update process includes: S201: the original cluster (i.e., distributed cluster) exports configuration information (i.e., initial configuration information); S202: the new node imports and pre-applies configuration information (i.e., first configuration information); S203: checks whether the pre-application configuration information is normal, if not, returns to S201, if yes, executes S204; S204: verifies whether the pre-application configuration information is correct, if not, returns to S201, if yes, executes S205; S205: applies configuration information (i.e., target configuration information); S206: reads the original cluster IO value (i.e., current resource value); S207: allocates data resources to balance IO limits (i.e., available resource values).

[0112] In one embodiment, Figure 3 Schematic diagram of the system architecture in the embodiment of the present application. Figure 3 As shown, the system architecture in the present application includes: a configuration information collection device, a configuration information importing device, a configuration information verification device and a data resource balancing device.

[0113] Specifically, the configuration information collection device is used to classify the servers in the distributed cluster according to their hardware configuration types and business load type factors, and then randomly extract a certain number of servers and cluster configuration information from each category and record them in the configuration library.

[0114] Specifically, the configuration information importing device is used to compare the collected physical server configuration information in the original distributed cluster, and record the configuration items with consistent content as static configuration items. When there are records with inconsistent configuration items, if more than 50% of the values ​​in the inconsistent records are the same, then the value is set as the benchmark value, and other inconsistent records are compared with the benchmark value. If the deviation value is less than 5%, then the item is considered to be a static configuration item, and if it is greater than 5%, then the item is set as a dynamic configuration item. In addition, the pre-application configuration information of the expanded server can also be compared with the configuration information in the original distributed cluster to confirm the validity of the pre-application configuration information.

[0115] Specifically, the configuration information verification device is used to import the configuration information in the original distributed cluster into multiple expansion servers at the same time, pre-apply the configuration information or formally apply the configuration information, and log the problems generated during the pre-application of the configuration information or the application of the configuration information. If an import error occurs, after checking and confirming, the device only re-imports the failed configuration items to improve the import efficiency and the ability to respond to abnormal situations.

[0116] Specifically, the data resource balancing device is used to read the hardware information in the original distributed cluster, confirm the theoretical maximum IO value of the server disk and network hardware, calculate the theoretical maximum IO value of the distributed cluster, read the current real-time IO value of each physical server according to the real-time business load, and allocate the remaining value after reserving 20% ​​of the difference between the theoretical maximum value and the current real-time IO value to the expanded server for data resource balancing, read the current system business IO in real time, and dynamically adjust the data resource balance value limit in the newly expanded node according to the number of expanded nodes. In addition, if a calculation error or system failure occurs during the dynamic adjustment of the data resource balance value limit, it can detect and restore to the most recent correct IO resource balance configuration state to ensure that the cluster business is not affected.

[0117] Exemplarily, the distributed cluster includes host 1, host 2 ... host N, each host includes configuration information, each host corresponds to the same cluster information, and host X is the server to be expanded. The configuration information collection device extracts the configuration information 1 and cluster information of host 1, and sends the configuration information 1 and cluster information to the configuration information importing device. The configuration information importing device imports the configuration information into host X. The configuration information verification device determines whether the imported device information is correct by comparing the configuration information 1 in host 1 with the configuration information in host X, the cluster information corresponding to host 1 and the cluster information corresponding to host X. The data balancing device obtains the data resource status of host 1, host 2 ... host N and host X, and balances the data resources of the distributed cluster.

[0118] It should be understood that although Figure 1-3The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1-3 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0119] In one embodiment, Figure 4 As shown, a distributed cluster expansion device is provided, and the device includes: a classification module 401, which is used to classify multiple servers in the distributed cluster according to the hardware configuration type and / or business load type of the server in response to the expansion demand of the distributed cluster; a processing module 402, which is used to extract and store the initial configuration information of one or more servers from each classification, obtain each initial sub-configuration item in the initial configuration information, and distinguish each initial sub-configuration item as a static configuration item or a dynamic configuration item according to the initial sub-configuration content corresponding to each initial sub-configuration item; a configuration module 403, which is used to write the configuration content corresponding to each initial sub-configuration item into one or more servers to be expanded and modify it in turn according to the type of the initial sub-configuration item, so as to obtain first configuration information; a verification module 404, which is used to compare the first configuration information with the initial configuration information and / or the list to be expanded, and verify the correctness of the first configuration information, wherein the list to be expanded includes the dynamic information of one or more servers to be expanded; a writing module 405, which is used to clear the configuration information of one or more servers to be expanded when the first configuration information is correct, and write the first configuration information as the target configuration information into one or more servers to be expanded.

[0120] As a preferred implementation, in the embodiment of the present application, the processing module 402 is specifically used to: according to the initial sub-configuration item, collect the initial sub-configuration content corresponding to the initial sub-configuration item in multiple servers, and determine whether the initial sub-configuration content corresponding to each server is the same; when the initial sub-configuration content corresponding to the initial sub-configuration item of each server is the same, determine that the initial sub-configuration item is a static configuration item; when there are servers whose initial sub-configuration contents corresponding to the initial sub-configuration items are different, take the initial sub-configuration content with the largest number of repetitions as the first configuration content, and determine whether the number of repetitions of the first configuration content is greater than or equal to a first preset value; if the first configuration content When the number of repetitions is less than a first preset value, the initial sub-configuration item corresponding to the first configuration content is determined to be a dynamic configuration item; if the number of repetitions of the first configuration content is greater than or equal to the first preset value, the deviation value between the initial sub-configuration content and the first configuration content of each server is calculated in turn; when the deviation value between the initial sub-configuration content and the first configuration content of each server is less than or equal to a first preset range, the initial sub-configuration item corresponding to the initial sub-configuration content is determined to be a static configuration item; when there is a server whose initial sub-configuration content and the first configuration content have a deviation value greater than the first preset range, the initial sub-configuration item corresponding to the initial sub-configuration content is determined to be a dynamic configuration item.

[0121] As a preferred implementation, in the embodiment of the present application, the configuration module 403 is specifically used to: determine in turn whether each initial sub-configuration item is static configuration information or dynamic configuration information; when the initial sub-configuration item is a static configuration item, determine the static configuration content of the static configuration item based on the initial sub-configuration content, and write the static configuration content to one or more servers to be expanded; when the initial sub-configuration item is a dynamic configuration item, determine the dynamic configuration content of the dynamic configuration item based on the list to be expanded, and write the dynamic configuration content to one or more servers to be expanded.

[0122] As a preferred implementation mode, in the embodiment of the present application, the configuration module 403 is specifically used to: write the configuration content corresponding to each initial sub-configuration item into one or more servers to be expanded, and obtain the pre-application configuration information of each server to be expanded; run one or more servers to be expanded based on the pre-application configuration information, and record the operating status of one or more servers to be expanded through the operation log; monitor the operation log, and when an error is detected in the operation log, determine the server to be expanded that has reported the error, stop running the server to be expanded that has reported the error, compare the pre-application configuration information of the server to be expanded that has reported the error with the initial configuration information one by one, determine the erroneous configuration information and send it to the user; receive the modified erroneous configuration information returned by the user, write the modified erroneous configuration information into the server to be expanded that has reported the error and run it, and detect whether the modified configuration information is correct; when the modified configuration information is correct, obtain the first configuration information.

[0123] As a preferred implementation mode, in the embodiment of the present application, the verification module 404 is specifically used to: check each first sub-configuration item and first sub-configuration content in the first configuration information in turn; when the first sub-configuration item is a static configuration item, compare the first sub-configuration content with the corresponding initial sub-configuration content to determine whether they are consistent; when the first sub-configuration content and the initial sub-configuration content are consistent, the first sub-configuration content is the correct configuration content; when the first sub-configuration item is a dynamic configuration item, compare the first sub-configuration content with the list to be expanded; when the first sub-configuration content is consistent with the information in the list to be expanded, the first sub-configuration content is the correct configuration content.

[0124] As a preferred implementation mode, in the embodiment of the present application, the device also includes: a balancing module, which is specifically used to: determine the maximum resource value of each server according to the hardware type of each server in the distributed cluster; determine the maximum resource value of the distributed cluster according to the maximum resource value of each server; read the current resource value of the distributed cluster according to the business load of each server; subtract the current resource value from the maximum resource value to obtain the theoretical available resource value; subtract the running resource value of the distributed cluster from the theoretical available resource value to obtain the available resource value of one or more servers to be expanded; and expand one or more servers to be expanded based on the available resource value.

[0125] As a preferred implementation mode, in the embodiment of the present application, the balancing module is specifically used to: determine the first available resource value of the first server to be expanded based on the available resource value and the number of servers to be expanded; expand the first server to be expanded according to the first available resource value; when the expansion of the first server to be expanded is successful, record the resource configuration corresponding to the first server to be expanded in the storage space, and apply the resource configuration, wherein the resource configuration includes the current resource value, the maximum resource value and the first available resource value; when the expansion of the first server to be expanded fails, read and apply the corresponding resource configuration when the previous expansion was successful.

[0126] For the specific definition of the distributed cluster expansion device, please refer to the definition of the distributed cluster expansion method above, which will not be repeated here. Each module in the above-mentioned distributed cluster expansion device can be implemented in whole or in part by software, hardware and a combination thereof. 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 of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0127] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 5As 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 and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. 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 distributed cluster expansion method is implemented.

[0128] Those skilled in the art will understand that Figure 5 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.

[0129] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program: S1: in response to the expansion demand of the distributed cluster, a plurality of servers in the distributed cluster are classified according to the hardware configuration type and / or the business load type of the server; S2: initial configuration information of one or more servers is extracted and stored from each classification, each initial sub-configuration item in the initial configuration information is obtained, and each initial sub-configuration item is distinguished as a static configuration item or a dynamic configuration item according to the initial sub-configuration content corresponding to each initial sub-configuration item; S3: according to the type of the initial sub-configuration item, the configuration content corresponding to each initial sub-configuration item is sequentially written into one or more servers to be expanded and modified to obtain first configuration information; S4: the first configuration information is compared with the initial configuration information and / or the list to be expanded to verify the correctness of the first configuration information, wherein the list to be expanded includes the dynamic information of one or more servers to be expanded; S5: when the first configuration information is correct, the configuration information of one or more servers to be expanded is cleared, and the first configuration information is written into the one or more servers to be expanded as the target configuration information.

[0130] In one embodiment, when the processor executes the computer program, the following steps are further implemented: according to the initial sub-configuration item, initial sub-configuration contents corresponding to the initial sub-configuration items in multiple servers are collected, and it is determined whether the initial sub-configuration contents corresponding to each server are the same; when the initial sub-configuration contents corresponding to the initial sub-configuration items of each server are the same, the initial sub-configuration item is determined to be a static configuration item; when the initial sub-configuration contents corresponding to the initial sub-configuration items of the servers are different, the initial sub-configuration contents with the largest number of repetitions are used as the first configuration content, and it is determined whether the number of repetitions of the first configuration content is greater than or equal to a first preset value; if the number of repetitions of the first configuration content is less than the first preset value, the initial sub-configuration item corresponding to the first configuration content is determined to be a dynamic configuration item; if the number of repetitions of the first configuration content is greater than or equal to the first preset value, the deviation value between the initial sub-configuration content of each server and the first configuration content is calculated in turn; when the deviation value between the initial sub-configuration content of each server and the first configuration content is less than or equal to the first preset range, the initial sub-configuration item corresponding to the initial sub-configuration content is determined to be a static configuration item; when the deviation value between the initial sub-configuration content of the server and the first configuration content is greater than the first preset range, the initial sub-configuration item corresponding to the initial sub-configuration content is determined to be a dynamic configuration item.

[0131] In one embodiment, when the processor executes the computer program, the following steps are also implemented: determining in sequence whether each initial sub-configuration item is static configuration information or dynamic configuration information; when the initial sub-configuration item is a static configuration item, determining the static configuration content of the static configuration item based on the initial sub-configuration content, and writing the static configuration content into one or more servers to be expanded; when the initial sub-configuration item is a dynamic configuration item, determining the dynamic configuration content of the dynamic configuration item based on the list to be expanded, and writing the dynamic configuration content into one or more servers to be expanded.

[0132] In one embodiment, when the processor executes the computer program, the following steps are also implemented: writing the configuration content corresponding to each initial sub-configuration item into one or more servers to be expanded, and obtaining pre-application configuration information of each server to be expanded; running one or more servers to be expanded based on the pre-application configuration information, and recording the operating status of one or more servers to be expanded through the operation log; monitoring the operation log, and when an error is detected in the operation log, determining the server to be expanded that has reported the error, stopping the operation of the server to be expanded that has reported the error, comparing the pre-application configuration information of the server to be expanded that has reported the error with the initial configuration information one by one, determining the erroneous configuration information and sending it to the user; receiving the modified erroneous configuration information returned by the user, writing the modified erroneous configuration information into the server to be expanded that has reported the error and running it, and detecting whether the modified configuration information is correct; when the modified configuration information is correct, obtaining the first configuration information.

[0133] In one embodiment, the processor further implements the following steps when executing the computer program: checking each first sub-configuration item and first sub-configuration content in the first configuration information in turn; when the first sub-configuration item is a static configuration item, comparing the first sub-configuration content with the corresponding initial sub-configuration content to determine whether they are consistent; when the first sub-configuration content is consistent with the initial sub-configuration content, the first sub-configuration content is the correct configuration content; when the first sub-configuration item is a dynamic configuration item, comparing the first sub-configuration content with the list to be expanded; when the first sub-configuration content is consistent with the information in the list to be expanded, the first sub-configuration content is the correct configuration content.

[0134] In one embodiment, the processor also implements the following steps when executing the computer program: determining the maximum resource value of each server according to the hardware type of each server in the distributed cluster; determining the maximum resource value of the distributed cluster according to the maximum resource value of each server; reading the current resource value of the distributed cluster according to the business load of each server; subtracting the current resource value from the maximum resource value to obtain the theoretical available resource value; subtracting the running resource value of the distributed cluster from the theoretical available resource value to obtain the available resource value of one or more servers to be expanded; and expanding the capacity of one or more servers to be expanded based on the available resource value.

[0135] In one embodiment, when the processor executes the computer program, the following steps are also implemented: based on the available resource value and the number of servers to be expanded, a first available resource value of the first server to be expanded is determined; according to the first available resource value, the first server to be expanded is expanded; when the expansion of the first server to be expanded is successful, the resource configuration corresponding to the first server to be expanded is recorded in the storage space, and the resource configuration is applied, wherein the resource configuration includes the current resource value, the maximum resource value and the first available resource value; when the expansion of the first server to be expanded fails, the resource configuration corresponding to the previous successful expansion is read and applied.

[0136] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: S1: in response to the expansion demand of the distributed cluster, multiple servers in the distributed cluster are classified according to the hardware configuration type and / or business load type of the server; S2: initial configuration information of one or more servers is extracted and stored from each classification, each initial sub-configuration item in the initial configuration information is obtained, and each initial sub-configuration item is distinguished as a static configuration item or a dynamic configuration item according to the initial sub-configuration content corresponding to each initial sub-configuration item; S3: according to the type of the initial sub-configuration item, the configuration content corresponding to each initial sub-configuration item is written into one or more servers to be expanded and modified in turn to obtain first configuration information; S4: the first configuration information is compared with the initial configuration information and / or the list to be expanded to verify the correctness of the first configuration information, wherein the list to be expanded includes the dynamic information of one or more servers to be expanded; S5: when the first configuration information is correct, the configuration information of one or more servers to be expanded is cleared, and the first configuration information is written into one or more servers to be expanded as the target configuration information.

[0137] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: according to the initial sub-configuration item, initial sub-configuration contents corresponding to the initial sub-configuration items in multiple servers are collected, and it is determined whether the initial sub-configuration contents corresponding to each server are the same; when the initial sub-configuration contents corresponding to the initial sub-configuration items of each server are the same, the initial sub-configuration item is determined to be a static configuration item; when the initial sub-configuration contents corresponding to the initial sub-configuration items of the servers are different, the initial sub-configuration contents with the largest number of repetitions are used as the first configuration content, and it is determined whether the number of repetitions of the first configuration content is greater than or equal to a first preset value; if the number of repetitions of the first configuration content is less than the first preset value, the initial sub-configuration item corresponding to the first configuration content is determined to be a dynamic configuration item; if the number of repetitions of the first configuration content is greater than or equal to the first preset value, the deviation value between the initial sub-configuration content of each server and the first configuration content is calculated in turn; when the deviation value between the initial sub-configuration content of each server and the first configuration content is less than or equal to the first preset range, the initial sub-configuration item corresponding to the initial sub-configuration content is determined to be a static configuration item; when the deviation value between the initial sub-configuration content of the server and the first configuration content is greater than the first preset range, the initial sub-configuration item corresponding to the initial sub-configuration content is determined to be a dynamic configuration item.

[0138] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: determining in sequence whether each initial sub-configuration item is static configuration information or dynamic configuration information; when the initial sub-configuration item is a static configuration item, determining the static configuration content of the static configuration item based on the initial sub-configuration content, and writing the static configuration content into one or more servers to be expanded; when the initial sub-configuration item is a dynamic configuration item, determining the dynamic configuration content of the dynamic configuration item based on the list to be expanded, and writing the dynamic configuration content into one or more servers to be expanded.

[0139] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: writing the configuration content corresponding to each initial sub-configuration item into one or more servers to be expanded, and obtaining pre-application configuration information of each server to be expanded; running one or more servers to be expanded based on the pre-application configuration information, and recording the operating status of one or more servers to be expanded through the operation log; monitoring the operation log, and when an error is detected in the operation log, determining the server to be expanded that has reported the error, stopping the operation of the server to be expanded that has reported the error, comparing the pre-application configuration information of the server to be expanded that has reported the error with the initial configuration information one by one, determining the erroneous configuration information and sending it to the user; receiving the modified erroneous configuration information returned by the user, writing the modified erroneous configuration information into the server to be expanded that has reported the error and running it, and detecting whether the modified configuration information is correct; when the modified configuration information is correct, obtaining the first configuration information.

[0140] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: each first sub-configuration item and first sub-configuration content in the first configuration information is checked in turn; when the first sub-configuration item is a static configuration item, the first sub-configuration content is compared with the corresponding initial sub-configuration content to determine whether they are consistent; when the first sub-configuration content is consistent with the initial sub-configuration content, the first sub-configuration content is the correct configuration content; when the first sub-configuration item is a dynamic configuration item, the first sub-configuration content is compared with the list to be expanded; when the first sub-configuration content is consistent with the information in the list to be expanded, the first sub-configuration content is the correct configuration content.

[0141] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: determining the maximum resource value of each server according to the hardware type of each server in the distributed cluster; determining the maximum resource value of the distributed cluster according to the maximum resource value of each server; reading the current resource value of the distributed cluster according to the business load of each server; subtracting the current resource value from the maximum resource value to obtain the theoretical available resource value; subtracting the running resource value of the distributed cluster from the theoretical available resource value to obtain the available resource value of one or more servers to be expanded; and expanding the capacity of one or more servers to be expanded based on the available resource value.

[0142] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: based on the available resource value and the number of servers to be expanded, a first available resource value of the first server to be expanded is determined; according to the first available resource value, the first server to be expanded is expanded; when the expansion of the first server to be expanded is successful, the resource configuration corresponding to the first server to be expanded is recorded in the storage space, and the resource configuration is applied, wherein the resource configuration includes the current resource value, the maximum resource value and the first available resource value; when the expansion of the first server to be expanded fails, the resource configuration corresponding to the previous successful expansion is read and applied.

[0143] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments 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 memory, storage, database or other media used in the embodiments provided in the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0144] The technical features of the above embodiments may be arbitrarily combined. 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.

[0145] The above 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 invention patent. 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 patent of the present application shall be subject to the attached claims.

Claims

1. A distributed cluster expansion method, characterized in that: The method comprises: In response to a capacity expansion demand of a distributed cluster, classifying a plurality of servers in the distributed cluster according to hardware configuration types and / or service load types of the servers; Extracting and storing initial configuration information of one or more servers from each category, obtaining each initial sub-configuration item in the initial configuration information, and distinguishing each initial sub-configuration item as a static configuration item or a dynamic configuration item according to initial sub-configuration content corresponding to each initial sub-configuration item; According to the type of the initial sub-configuration item, write the configuration content corresponding to each initial sub-configuration item into one or more servers to be expanded and modify them in turn to obtain first configuration information; Comparing the first configuration information with the initial configuration information and / or the list of capacity to be expanded to verify the correctness of the first configuration information, wherein the list of capacity to be expanded includes dynamic information of the one or more servers to be expanded; When the first configuration information is correct, the configuration information of the one or more servers to be expanded is cleared, and the first configuration information is written into the one or more servers to be expanded as target configuration information.

2. The distributed cluster expansion method according to claim 1, characterized in that: The distinguishing each initial sub-configuration item as a static configuration item or a dynamic configuration item includes: According to the initial sub-configuration items, initial sub-configuration contents corresponding to the initial sub-configuration items in multiple servers are collected, and it is determined whether the initial sub-configuration contents corresponding to each server are the same; When the initial sub-configuration contents corresponding to the initial sub-configuration items of each server are the same, determining that the initial sub-configuration item is a static configuration item; When there are different initial sub-configuration contents corresponding to the initial sub-configuration items of the server, taking the initial sub-configuration content with the largest number of repetitions as the first configuration content, and determining whether the number of repetitions of the first configuration content is greater than or equal to a first preset value; If the number of repetitions of the first configuration content is less than the first preset value, determining that the initial sub-configuration item corresponding to the first configuration content is a dynamic configuration item; If the number of repetitions of the first configuration content is greater than or equal to the first preset value, sequentially calculating the deviation value between the initial sub-configuration content of each server and the first configuration content; When the deviation value between the initial sub-configuration content of each server and the first configuration content is less than or equal to a first preset range, determining that the initial sub-configuration item corresponding to the initial sub-configuration content is a static configuration item; When there is a deviation value between the initial sub-configuration content of the server and the first configuration content that is greater than the first preset range, it is determined that the initial sub-configuration item corresponding to the initial sub-configuration content is a dynamic configuration item.

3. The distributed cluster expansion method according to claim 2, characterized in that: The step of writing the configuration content corresponding to each initial sub-configuration item into one or more servers to be expanded and modifying the configuration content in turn according to the type of the initial sub-configuration item to obtain the first configuration information includes: Determine in sequence whether each initial sub-configuration item is static configuration information or dynamic configuration information; When the initial sub-configuration item is a static configuration item, determining the static configuration content of the static configuration item according to the initial sub-configuration content, and writing the static configuration content into the one or more servers to be expanded; When the initial sub-configuration item is a dynamic configuration item, the dynamic configuration content of the dynamic configuration item is determined according to the to-be-expanded list, and the dynamic configuration content is written into the one or more to-be-expanded servers.

4. The distributed cluster expansion method according to claim 3, characterized in that: The step of writing the configuration content corresponding to each initial sub-configuration item into one or more servers to be expanded and modifying the configuration content in turn according to the type of the initial sub-configuration item to obtain the first configuration information includes: Writing the configuration content corresponding to each initial sub-configuration item into the one or more servers to be expanded, to obtain pre-application configuration information of each server to be expanded; Running the one or more servers to be expanded based on the pre-application configuration information, and recording the operating status of the one or more servers to be expanded through an operating log; Monitoring the operation log, when an error is detected in the operation log, determining the server to be expanded that reports the error, stopping the server to be expanded that reports the error, comparing the pre-application configuration information of the server to be expanded that reports the error with the initial configuration information one by one, determining the error configuration information and sending it to the user; The modified erroneous configuration information returned by the user is received, the modified erroneous configuration information is written into the server to be expanded that reports the error and runs the server to detect whether the modified configuration information is correct; when the modified configuration information is correct, the first configuration information is obtained.

5. The distributed cluster expansion method according to claim 2, characterized in that: The comparing the first configuration information with the initial configuration information and / or the list of capacity to be expanded to verify the correctness of the first configuration information includes: Checking each first sub-configuration item and first sub-configuration content in the first configuration information in sequence; When the first sub-configuration item is a static configuration item, comparing the first sub-configuration content with the corresponding initial sub-configuration content to determine whether they are consistent; When the first sub-configuration content is consistent with the initial sub-configuration content, the first sub-configuration content is a correct configuration content; When the first sub-configuration item is a dynamic configuration item, comparing the first sub-configuration content with the list to be expanded; When the first sub-configuration content is consistent with the information in the to-be-expanded list, the first sub-configuration content is a correct configuration content.

6. The distributed cluster expansion method according to claim 1, characterized in that: The method further comprises: Determining a maximum resource value of each server according to a hardware type of each server in the distributed cluster; Determining the maximum resource value of the distributed cluster according to the maximum resource value of each server; Read the current resource value of the distributed cluster according to the business load of each server; Subtract the current resource value from the maximum resource value to obtain a theoretical available resource value; Subtract the running resource value of the distributed cluster from the theoretical available resource value to obtain the available resource value of the one or more servers to be expanded; Based on the available resource value, the one or more servers to be expanded are expanded.

7. The distributed cluster expansion method according to claim 6, characterized in that: The step of expanding the capacity of the one or more servers to be expanded based on the available resource value includes: Determine a first available resource value of a first server to be expanded based on the available resource value and the number of servers to be expanded; Expanding the capacity of the first server to be expanded according to the first available resource value; When the capacity expansion of the first server to be expanded is successful, recording the resource configuration corresponding to the first server to be expanded in the storage space, and applying the resource configuration, wherein the resource configuration includes the current resource value, the maximum resource value, and the first available resource value; When the capacity expansion of the first server to be expanded fails, the resource configuration corresponding to the previous successful capacity expansion is read and applied.

8. A distributed cluster expansion device, characterized in that: The device comprises: A classification module, configured to classify a plurality of servers in the distributed cluster according to a hardware configuration type and / or a service load type of the server in response to a capacity expansion demand of the distributed cluster; A processing module, configured to extract and store initial configuration information of one or more servers from each category, obtain each initial sub-configuration item in the initial configuration information, and distinguish each initial sub-configuration item as a static configuration item or a dynamic configuration item according to the initial sub-configuration content corresponding to each initial sub-configuration item; A configuration module, configured to write and modify the configuration content corresponding to each initial sub-configuration item in turn into one or more servers to be expanded according to the type of the initial sub-configuration item, so as to obtain first configuration information; a verification module, configured to compare the first configuration information with the initial configuration information and / or the list of servers to be expanded, to verify the correctness of the first configuration information, wherein the list of servers to be expanded includes dynamic information of the one or more servers to be expanded; The writing module is used to clear the configuration information of the one or more servers to be expanded when the first configuration information is correct, and write the first configuration information as the target configuration information into the one or more servers to be expanded.

9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: 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.

Citation Information

Patent Citations

  • Cloud server initialization method and device and storage medium

    CN112804352A

  • Information configuration method and device, equipment and medium

    CN116132289A

  • Fault domain capacity expansion method and device, computer equipment and storage medium

    CN117631996A

  • Service model re-computation based on configuration item change type

    US20200228408A1