A server cluster construction method, device, equipment and storage medium

By determining the total resource information of the server cluster on the resource management platform and setting key-free communication, the efficiency problem of building a server cluster is solved, and efficient data processing and unified resource management are achieved.

CN118075259BActive Publication Date: 2025-02-11NETTRIX INFORMATION IND CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211466608.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-22
Publication Date
2025-02-11
Estimated Expiration
2042-11-22

AI Technical Summary

Technical Problem

How to quickly and effectively build a server cluster so that servers of different communication methods and resource types can form clusters and facilitate unified management, thereby improving data processing efficiency.

Method used

By calling preset platform address information and account password information on the resource management platform, the total resource information of the target server and other servers is determined, and the communication method of the server cluster is key-free communication, and the total resource information is synchronized to other servers. To achieve the construction of server cluster.

Benefits of technology

It realizes the rapid and accurate determination of the total resource information of the server cluster, improves the data processing efficiency of the server cluster, and improves the communication efficiency between servers through key-free communication, so that the resource information of the server cluster can be managed in a unified manner.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118075259B_ABST
    Figure CN118075259B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device, equipment and storage medium for building a server cluster. The method comprises: in response to a request for building a server cluster, determining the communication mode of the server cluster as key-free communication; the server cluster comprises a target server and other servers except the target server; calling a preset resource management platform to determine the total resource information of the target server and other servers; synchronizing the total resource information to other servers to realize the building of the server cluster. The technical solution of the present invention can realize fast and effective server cluster building based on the resource management platform, and facilitate the unified management of server resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of big data, and in particular to a server cluster construction method, device, equipment and storage medium. Background Art

[0002] With the development of big data technology, in order to meet the needs of processing massive data, multiple servers are often required to form a cluster to jointly perform data processing tasks.

[0003] How to quickly and effectively build a server cluster so that servers with different communication methods and resource types form a server cluster, thereby facilitating unified management and improving data processing efficiency, is a problem that needs to be solved urgently. Summary of the invention

[0004] The present invention provides a server cluster construction method, device, equipment and storage medium, which can realize fast and effective server cluster construction based on a resource management platform.

[0005] According to one aspect of the present invention, a method for building a server cluster is provided, the method comprising:

[0006] In response to a request for establishing a server cluster, determining the communication mode of the server cluster as key-free communication; the server cluster includes a target server and other servers except the target server;

[0007] Call the preset resource management platform to determine the total resource information of the target server and other servers;

[0008] The total resource information is synchronized to other servers to realize server cluster construction.

[0009] Optionally, calling a preset resource management platform to determine total resource information of the target server and other servers includes:

[0010] Based on the preset platform address information and account password information, call the preset resource management platform;

[0011] Sending attribute information of the target server and other servers to the resource management platform so that the resource management platform can perform server configuration and resource collection;

[0012] The total resource information of the target server and other servers is determined based on the resource information collected by the resource management platform.

[0013] The above technical solution can enable the target server to log in to the resource management platform accurately and quickly through the preset platform address information and account password. By sending the attribute information of the target server and other servers to the resource management platform, the resource management platform can be effectively utilized to realize the collection of resource information of all servers in the server cluster, thereby determining accurate and comprehensive total resource information.

[0014] Optionally, synchronizing the total resource information to other servers includes:

[0015] According to the total resource information, configure the management database;

[0016] The preset operation and maintenance tool in the target server is used to send a data synchronization request to other servers to instruct other servers to call the management database to achieve data synchronization.

[0017] The above technical solution configures the management database according to the total resource information of the target server and other servers in the server cluster, so that other servers can quickly call the management database to achieve data synchronization when they receive a data synchronization request sent by the target server. In addition, by adopting a preset operation and maintenance tool, it is possible to synchronously send synchronization requests to other servers, thereby improving the rate of server data synchronization.

[0018] Optionally, determining the communication mode of the server cluster as key-free communication includes:

[0019] Disable the local security system and local firewall, and set up keyless login;

[0020] Using the preset operation and maintenance tools in the target server, key-free communication requests are synchronously sent to other servers to instruct other servers to set up key-free login and realize key-free communication of the server cluster.

[0021] The above technical solution enables the target server to set up key-free login locally and communicate with other servers, so that other servers are also set up with key-free login, thereby realizing key-free communication of the entire server cluster, which is convenient for improving the communication efficiency between servers. In addition, by adopting preset operation and maintenance tools, communication requests can be sent to other servers synchronously, so that key-free communication of the server cluster can be quickly set up.

[0022] Optionally, before calling the preset resource management platform, the method further includes:

[0023] Based on the preset installation instructions, the management service of the preset resource management platform is installed locally on the target server;

[0024] After the management service is installed, based on the preset detection instructions, the local system log of the target server is detected to determine whether the target port information exists in the system log;

[0025] If so, it is determined that the pre-installation of the management service is completed.

[0026] The above technical solution installs the management service of the resource management platform locally based on preset installation instructions, which facilitates the subsequent call of the resource management platform by the target server. In addition, the system log is checked based on preset detection instructions to determine whether the management service is successfully installed. This can ensure that when the management service of the resource management platform is successfully installed, the resource management platform is called to collect resources and build a server cluster, thereby improving the efficiency of server cluster construction.

[0027] Optionally, after the server cluster is built, the step further includes:

[0028] In response to the server cluster monitoring instruction, the resource management platform is called to obtain resource information of each server in the server cluster within a preset detection period;

[0029] Generate cluster resource information based on resource information of each server in the server cluster, and monitor and manage the cluster resource information.

[0030] The above technical solution can achieve unified management of server cluster resource information, reduce the workload of server maintenance and waste of machine resources, and also help to monitor the status of each server in real time by responding to server cluster monitoring instructions and monitoring and managing the cluster resource information of each server in the server cluster based on the resource management platform after the server cluster is built.

[0031] Optionally, cluster resource information is generated according to resource information of each server in the server cluster, including:

[0032] Determine the CPU usage information of the target server in the server cluster, and the CPU call information of other servers in the server cluster except the target server;

[0033] Cluster CPU information is generated according to the CPU occupancy information and the CPU call information.

[0034] The above technical solution can generate comprehensive and accurate cluster CPU information by separately determining the CPU occupancy information of the target server and the CPU call information of other servers in the server cluster. It provides an implementable method for generating cluster resource information based on the resource information of each server in the server cluster, thereby improving the richness of cluster resource information.

[0035] According to another aspect of the present invention, a server cluster building device is provided, the device being configured in a target server and comprising:

[0036] A first determination module is used to determine the communication mode of the server cluster as key-free communication in response to a request for establishing a server cluster; the server cluster includes a target server and other servers except the target server;

[0037] The second determination module is used to call a preset resource management platform to determine the total resource information of the target server and other servers;

[0038] The synchronization module is used to synchronize the total resource information to other servers to realize the construction of server clusters.

[0039] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0040] at least one processor; and

[0041] a memory communicatively connected to the at least one processor; wherein,

[0042] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the server cluster building method described in any embodiment of the present invention.

[0043] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the server cluster building method described in any embodiment of the present invention when executed.

[0044] The technical solution of the embodiment of the present invention is that the target server responds to the request for setting up the server cluster, determines the communication mode between the target server and other servers except the target server as key-free communication, calls the preset resource management platform, determines the total resource information of the target server and other servers, synchronizes the total resource information with other servers, and realizes the server cluster construction. By making the target server call the resource management platform, the total resource information of the server cluster can be quickly and accurately determined. In addition, by determining the communication mode of the server cluster as key-free communication, the overall data processing efficiency of the server cluster can be improved. By making the target server synchronize the acquired total resource information with other servers, the resource information of the target server and other servers can be shared, thereby realizing the construction of the server cluster, which is helpful for the subsequent unified management of the total resource information of the server cluster.

[0045] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0047] Figure 1 is a flow chart of a server cluster building method provided according to Embodiment 1 of the present invention;

[0048] Figure 2 is a flow chart of a server cluster building method provided according to Embodiment 2 of the present invention;

[0049] Figure 3 is a flow chart of a method for building a server cluster according to Embodiment 3 of the present invention;

[0050] Figure 4 This is a schematic diagram of the structure of a server cluster building device provided according to Embodiment 4 of the present invention;

[0051] Figure 5 It is a structural schematic diagram of an electronic device for implementing the server cluster building method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0052] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0053] It should be noted that the terms "first", "second", "target", "candidate", "alternative", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0054] Embodiment 1

[0055] Figure 1 This is a flow chart of a server cluster building method provided according to the first embodiment of the present invention. This embodiment is applicable to the case where the target server builds a server cluster based on a resource management platform. The method can be executed by a server cluster building device. The server cluster building device can be implemented in the form of hardware and / or software. The server cluster building device can be configured in an electronic device and executed by the target server. Figure 1 As shown, the server cluster construction method includes:

[0056] S101. In response to a request for establishing a server cluster, determining the communication mode of the server cluster to be key-free communication.

[0057] Among them, the construction request refers to a request to gather the servers in the server cluster to provide services together. The server cluster refers to the server cluster to be built. Specifically, the server cluster may include the target server and other servers except the target server. The target server refers to the server in the server cluster that is pre-designated for server cluster construction. Key-free communication refers to a communication method in which servers can interact without exchanging keys.

[0058] It should be noted that the servers in the server cluster can perform data processing tasks through parallel computing, thereby effectively improving data processing efficiency. For the client that issues a data processing request, the entire server cluster can be regarded as a large server.

[0059] Optionally, relevant personnel may designate at least two servers including the target server as the target server cluster to be built, and further send corresponding server cluster building instructions to the target server. The target server may consider that a server cluster building request has been detected when receiving the server cluster building instruction issued by the relevant personnel; the target server may also determine the target server cluster to be built based on preset rules and automatically generate a server cluster building request when it detects that its own data processing efficiency is lower than a preset threshold.

[0060] Optionally, after the target server detects the request to set up a server cluster, it can respond to the request to set up the server cluster and communicate with other servers in the server cluster, so that the communication mode between the target server and other servers, and between other servers, is updated to key-free communication, thereby determining the communication mode of the server cluster as key-free communication.

[0061] Optionally, the communication mode of the server cluster is determined to be key-free communication, including: shutting down the local security system and local firewall, and setting up key-free login; using the preset operation and maintenance tool in the target server to synchronously send key-free communication requests to other servers to instruct other servers to set up key-free login, thereby realizing key-free communication of the server cluster.

[0062] The local security system refers to the security system where the target server is located. For example, the local security system may be Se-Linux (Security-Enhanced Linux, a new security subsystem). The preset operation and maintenance tool refers to a preset automated operation and maintenance tool that can be used to execute instructions in batches, such as an ANSIBLE tool. The preset operation and maintenance tool may be pre-installed in the target server.

[0063] Optionally, in response to the request to set up a server cluster, the target server can shut down the local security system and the local firewall, and further configure based on the attribute information of the designated server (i.e., other servers in the server cluster) to determine the communication method with the above-mentioned designated server as key-free login, so that the above-mentioned designated server does not need to provide a key when communicating with the target server, that is, shut down the local security system and the local firewall, and set up key-free login.

[0064] Optionally, after the target server completes the key-free communication settings locally, it can generate instructions to request key-free communication with other servers, and further use the preset operation and maintenance tools in the target server to send the instructions in batches, so as to enable the target server to synchronously send key-free communication requests to other servers.

[0065] Optionally, after receiving the key-free communication request sent by the target server, other servers can perform key-free setting operations similar to the target server, that is, shut down their own security systems and firewalls locally, and set up key-free login.

[0066] Optionally, the target server may obtain feedback information sent by other servers after completing key-free login settings. If it is detected that other servers in the server cluster have completed key-free settings, it is determined that key-free communication of the server cluster is achieved.

[0067] This optional embodiment enables the target server to set up key-free login locally and communicate with other servers, so that other servers are also set up with key-free login, thereby realizing key-free communication of the entire server cluster, facilitating the improvement of communication efficiency between servers, and also helping to improve data processing efficiency when other servers subsequently perform data processing tasks together with the target server. In addition, by adopting preset operation and maintenance tools, it is possible to synchronously send communication requests to other servers, thereby quickly setting up key-free communication of the server cluster.

[0068] S102: Call a preset resource management platform to determine total resource information of the target server and other servers.

[0069] The resource management platform refers to a preset platform that can uniformly manage the resource information of multiple servers. For example, the resource management platform can be a CM (Cloudera Manager) resource management platform, which can implement resource scheduling of servers in heterogeneous network environments. The total resource information may include the resource information of the target server and the resource information of other servers. The resource information may include at least one of the following: CPU (central processing unit) information, memory information, disk information, and IO (Input / Output) information.

[0070] Optionally, the target server can call the relevant services of the preset resource management platform based on the calling instruction, integrate the resource information of each server collected by the resource management platform, and determine the total resource information of the target server and other servers; it can also directly send a resource acquisition request to the preset resource management platform to obtain the resource information collected by the resource management platform as the total resource information of the target server and other servers.

[0071] Optionally, before calling the preset resource management platform, it also includes: based on preset installation instructions, installing the management service of the preset resource management platform locally on the target server; after the management service is installed, based on preset detection instructions, detecting the local system log of the target server to determine whether there is target port information in the system log; if so, it is determined that the pre-installation of the management service is completed.

[0072] The preset installation instruction refers to an instruction for installing the resource management platform management service, and the preset detection instruction refers to an instruction for calling and querying the system log. The target port information refers to the port information that can indicate whether the resource management platform management service has been installed.

[0073] Optionally, the target server may generate preset installation instructions according to the preset address information of the resource management platform and the account password information pre-authorized by the resource management platform, and install the management service of the preset resource management platform locally on the target server based on the preset installation instructions.

[0074] Optionally, after the management service is installed, the target server can query the local system log based on preset detection instructions to determine whether the target port information exists in the system log. If so, it is determined that the pre-installation of the management service is completed. If not, the above-mentioned operation of installing the management service based on the preset installation instructions is re-executed.

[0075] Exemplarily, if the resource management platform is a CM platform, the target server can use the command line window to issue a preset installation instruction, such as "cloudera-scm-server.service", to install the management service of the resource management platform, and further obtain the system log generated by the management service under the system, and use the command line window to issue a preset detection instruction to query whether there is target port information in the system log, such as "Started Jetty server" information. If so, it indicates that the console of the CM platform is ready, and the pre-installation of the management service is determined to be completed.

[0076] The above technical solution installs the management service of the resource management platform locally based on preset installation instructions, which facilitates the subsequent call of the resource management platform by the target server. In addition, the system log is checked based on preset detection instructions to determine whether the management service is successfully installed. This can ensure that when the management service of the resource management platform is successfully installed, the resource management platform is called to collect resources and build a server cluster, thereby improving the efficiency of server cluster construction.

[0077] S103, synchronizing total resource information to other servers to implement server cluster construction.

[0078] Optionally, after the target server determines the total resource information of the target server and other servers based on the resource management platform, it can synchronize the determined total resource information to other servers in real time based on the address information of other servers, so that the target server and other servers can share resources, thereby realizing server cluster construction.

[0079] It should be noted that using the resource management platform to obtain resource information and building a cluster uniformly after determining the total resource information can effectively reduce the number of clusters to be built, quickly build clusters, reduce maintenance workload and waste of machine resources.

[0080] According to the technical solution of the embodiment of the present invention, in response to the request for setting up the server cluster, the target server determines the communication mode of the server cluster as key-free communication, calls the preset resource management platform, determines the total resource information of the target server and other servers, and synchronizes the total resource information with other servers to achieve the server cluster construction. By setting the communication mode in the server cluster as key-free communication and enabling the sharing of the resources of the server cluster, the server cluster can be effectively built so that the server cluster can provide services as a whole; further, by enabling the target server to call the resource management platform, the total resource information of the server cluster can be quickly and accurately determined; in addition, by determining the communication mode of the server cluster as key-free communication, the overall data processing efficiency of the server cluster can be improved; by enabling the target server to synchronize the acquired total resource information with other servers, the resource information of the target server and other servers can be shared, thereby achieving the construction of the server cluster, which is helpful for the subsequent unified management of the total resource information of the server cluster.

[0081] Optionally, after the server cluster is built, it also includes: responding to the server cluster monitoring instruction, calling the resource management platform to obtain the resource information of each server in the server cluster within a preset detection period; generating cluster resource information based on the resource information of each server in the server cluster, and monitoring and managing the cluster resource information.

[0082] Among them, the server cluster monitoring instruction refers to an instruction to monitor the resource information of the server cluster as a whole. The preset detection period refers to the preset period for detecting and collecting resource information, for example, it can be 6 hours. Cluster resource information refers to the resource information of the server cluster as a whole. The cluster resource information may include at least one of the following: cluster CPU information, cluster disk IO information, cluster network IO information, cluster important events, alarm information, and cluster operation status. The cluster operation status includes: running, stopped, and not started.

[0083] Optionally, after the server cluster is built, the target server may generate server cluster monitoring instructions in real time or at regular intervals, i.e., detect the server cluster monitoring instructions; or it may be considered that the server cluster monitoring instructions are detected when receiving a monitoring command issued by relevant personnel.

[0084] Optionally, after the target server detects the server cluster monitoring instruction, it can call the management service of the resource management platform in response to the server cluster monitoring instruction to directly obtain the resource information collected by the resource management platform based on a preset detection cycle, that is, obtain the resource information of each server in the server cluster within the preset detection cycle; it can also be based on the preset detection cycle, and obtain the resource information collected by the resource management platform in real time at each moment within the preset detection cycle, and integrate the resource information collected at each moment, so as to determine the resource information of each server in the server cluster within the preset detection cycle.

[0085] Optionally, the target server can classify and integrate the resource information of each server in the server cluster based on preset resource indicators, such as CPU information or IO information, and obtain cluster resource information of each indicator category respectively, that is, generate cluster resource information based on the resource information of each server in the server cluster.

[0086] Exemplarily, the target server can call the resource management platform to obtain the operating status of each server in the server cluster in real time, count the identification information of the servers in the server cluster that are running, stopped, and not started, and generate the cluster operating status, that is, generate cluster resource information based on the resource information of each server in the server cluster.

[0087] Optionally, after the target server generates cluster resource information, it can detect the indicators of each cluster resource information based on preset rules to determine whether there is alarm information. If so, it can remind relevant personnel to realize the monitoring and management of cluster resource information; it can also directly display the generated cluster resource information in a visual way based on preset display rules, so that relevant personnel can intuitively understand the overall resource information of the server cluster.

[0088] Optionally, in order to facilitate the target server to monitor and manage cluster resource information, the target server can perform permission control on other servers. Specifically, a preset operation and maintenance tool can be used to install dependency packages for other servers so that other servers allow the target server to manage local resources of other servers. For example, the dependency package can be Open IPMI or Open IPMI-libs.

[0089] The above technical solution can achieve unified management of server cluster resource information, reduce the workload of server maintenance and waste of machine resources, and also help to monitor the status of each server in real time by responding to server cluster monitoring instructions and monitoring and managing the cluster resource information of each server in the server cluster based on the resource management platform after the server cluster is built.

[0090] Optionally, cluster resource information is generated based on resource information of each server in the server cluster, including: determining the central processing unit (CPU) occupancy information of the target server in the server cluster, and CPU call information of other servers in the server cluster except the target server; generating cluster CPU information based on the CPU occupancy information and CPU call information.

[0091] The CPU (central processing unit) occupancy information refers to the percentage of the local CPU of the target server being occupied, such as 0.1%. The CPU call information refers to information indicating whether the local CPU of other servers is called.

[0092] Optionally, the target server can directly determine the local CPU usage information as the CPU usage information of the target server in the server cluster; or it can obtain the local CPU information collected by the resource management platform, and compare the local CPU usage information collected by the resource management platform with the local CPU usage information obtained by itself. If the two are consistent, it is determined that the CPU usage information collected by the resource management platform is correct, and the CPU usage information collected by the resource management platform is determined as the CPU usage information of the target server in the server cluster. If the two are inconsistent, the local CPU usage information is collected again, and the newly collected local CPU usage information is used as the CPU usage information of the target server in the server cluster.

[0093] Optionally, after the CPU occupancy information of the target server in the server cluster is determined, it may be combined with the CPU call information of other servers to generate cluster CPU information of the server cluster.

[0094] The above technical solution can generate comprehensive and accurate cluster CPU information by separately determining the CPU occupancy information of the target server and the CPU call information of other servers in the server cluster. It provides an implementable method for generating cluster resource information based on the resource information of each server in the server cluster, thereby improving the richness of cluster resource information.

[0095] Embodiment 2

[0096] Figure 2It is a flow chart of a server cluster building method provided according to the second embodiment of the present invention. This embodiment is optimized and improved on the basis of the above technical solutions.

[0097] Furthermore, "calling the preset resource management platform to determine the total resource information of the target server and other servers" is refined into "calling the preset resource management platform based on the preset platform address information and account password information; sending the attribute information of the target server and other servers to the resource management platform, so that the resource management platform performs server configuration and resource collection; determining the total resource information of the target server and other servers based on the resource information collected by the resource management platform" to improve the method of determining the total resource information of the target server and other servers based on the resource management platform.

[0098] Furthermore, "synchronizing total resource information to other servers" is refined into "configuring the management database based on the total resource information; using the preset operation and maintenance tools in the target server to send data synchronization requests to other servers, used to instruct other servers to call the management database to achieve data synchronization" to improve the method of synchronizing total resource information to other servers.

[0099] like Figure 2 As shown, the method comprises the following specific steps:

[0100] S201. In response to a request for establishing a server cluster, determine the communication mode of the server cluster as key-free communication.

[0101] S202: Based on the preset platform address information and account password information, call the preset resource management platform.

[0102] The platform address information refers to the address information of the preset resource management platform. The account and password information refers to the authorized account and password information of the resource management platform pre-stored on the target server.

[0103] Optionally, the target server may send a login request to a preset resource management platform based on the platform address information, and log in to the resource management platform according to the account and password information, thereby implementing the call to the preset resource management platform.

[0104] S203: Sending attribute information of the target server and other servers to the resource management platform, so that the resource management platform can perform server configuration and resource collection.

[0105] The attribute information may be identification information of the server, for example, may include an IP address (Internet Protocol) of the server.

[0106] Optionally, the target server can communicate with other servers to determine the attribute information of other servers, thereby generating the attribute information of the target server and other servers and sending it to the resource management platform. The resource management platform can add the target server and other servers to the ranks of management servers based on the identified attribute information, that is, perform server configuration; after the server configuration is completed, the resource management platform can obtain the resource information of the configured servers in real time, that is, perform resource collection.

[0107] It should be noted that by adding the server to the resource management platform based on the server's attribute information, the resource management platform can be used to automatically collect resource information of the server's IO, CPU, disk, memory and other indicators, avoiding the need to build a server cluster separately when collecting resource information for each indicator, thereby reducing the waste of machine resources.

[0108] S204: Determine the total resource information of the target server and other servers based on the resource information collected by the resource management platform.

[0109] Optionally, the target server can obtain the resource information of the configured servers collected by the resource management platform in real time, and directly use the obtained resource information as the total resource information of the target server and other servers; or the resource information collected by the resource management platform can be filtered, and the resource information that does not belong to the servers in the server cluster can be discarded, and the filtered resource information can be determined as the total resource information of the target server and other servers.

[0110] Optionally, after determining the total resource information, the target server can compare the total resource information with the total resource information obtained during the last detection to determine whether they are consistent. If not, the total resource information of the target server and other servers stored locally will be updated to the latest resource information collected by the resource management platform. If so, no update will be performed.

[0111] S205. Synchronize total resource information to other servers to build a server cluster.

[0112] Optionally, synchronizing total resource information to other servers includes: configuring a management database based on the total resource information; using a preset operation and maintenance tool in the target server to send data synchronization requests to other servers to instruct other servers to call the management database to achieve data synchronization.

[0113] The management database may be a database shared by the target server and other servers, and the management database may be, for example, a MySQL database.

[0114] Optionally, the target server can store the total resource information in a preset management database, i.e., a configuration management database, and generate a corresponding driver file, generate a data synchronization request based on the relevant information of the driver file and the identification information of other servers, and further use the preset operation and maintenance tool in the target server to synchronously send data synchronization requests to other servers, so that other servers can install the driver file based on the relevant information of the driver file in the data synchronization request, and based on the driver file, call the management database configured by the target server to achieve data synchronization. The driver file can be, for example, a JDBC file.

[0115] The above technical solution configures the management database according to the total resource information of the target server and other servers in the server cluster, so that other servers can quickly call the management database to achieve data synchronization when they receive a data synchronization request sent by the target server. In addition, by adopting a preset operation and maintenance tool, it is possible to synchronously send synchronization requests to other servers, thereby improving the rate of server data synchronization.

[0116] The technical solution of the embodiment of the present invention is that after the target server determines the communication mode of the server cluster as key-free communication, based on the preset platform address information and account password information, the preset resource management platform is called, and the attribute information of the target server and other servers is sent to the resource management platform, so that the resource management platform performs server configuration and resource collection, and determines the total resource information of the target server and other servers based on the resource information collected by the resource management platform, and finally synchronizes the total resource information with other servers to realize the construction of the server cluster. Through the preset platform address information and account password, the target server can accurately and quickly log in to the resource management platform. By sending the attribute information of the target server and other servers to the resource management platform, the resource management platform can be effectively utilized to realize the collection of resource information of all servers in the server cluster, thereby determining accurate and comprehensive total resource information.

[0117] Embodiment 3

[0118] Figure 3 It is a flow chart of a method for building a server cluster according to Embodiment 3 of the present invention. This embodiment provides a preferred example based on the above embodiments.

[0119] like Figure 3 As shown, the method comprises the following specific steps:

[0120] S301. In response to a request to build a server cluster, close the local security system and the local firewall, and set up key-free login.

[0121] S302: Use the preset operation and maintenance tool in the target server to synchronously send a key-free communication request to other servers to instruct other servers to set up key-free login and realize key-free communication of the server cluster.

[0122] S303: Based on the preset platform address information and account password information, call the preset resource management platform.

[0123] S304: Sending attribute information of the target server and other servers to the resource management platform, so that the resource management platform can perform server configuration and resource collection.

[0124] S305: Determine the total resource information of the target server and other servers based on the resource information collected by the resource management platform.

[0125] S306. Configure the management database according to the total resource information.

[0126] S307: Use the preset operation and maintenance tool in the target server to send a data synchronization request to other servers to instruct other servers to call the management database to achieve data synchronization, thereby realizing the construction of a server cluster.

[0127] S308. In response to the server cluster monitoring instruction, the resource management platform is called to obtain resource information of each server in the server cluster within a preset detection period.

[0128] S309: Generate cluster resource information according to the resource information of each server in the server cluster, and monitor and manage the cluster resource information.

[0129] Optionally, a possible implementation method of generating cluster resource information is: determining the CPU occupancy information of the target server in the server cluster and the CPU call information of other servers in the server cluster except the target server, and generating cluster CPU information according to the CPU occupancy information and the CPU call information.

[0130] The technical solution of the present invention uses a resource management platform to determine total resource information, thereby building a server cluster, which can improve the speed of server cluster building and also help to unify the management of server cluster resources in the future. The communication mode of the server cluster is determined to be a key-free mode, and the total resource information is shared in the server cluster, which can effectively build a server cluster, so that the servers in the server cluster can be regarded as a whole to complete data processing tasks, thereby improving data processing efficiency.

[0131] Embodiment 4

[0132] Figure 4is a structural diagram of a server cluster building device provided according to a fourth embodiment of the present invention. The server cluster building device provided in the embodiment of the present invention can be applicable to the case where the target server builds a server cluster based on a resource management platform. The server cluster building device can be implemented in the form of hardware and / or software and configured in the target server, such as Figure 4 As shown, the device specifically includes: a first determination module 401, a second determination module 402 and a synchronization module 403.

[0133] in,

[0134] A first determination module 401 is used to determine the communication mode of the server cluster as key-free communication in response to a request for establishing a server cluster; the server cluster includes a target server and other servers except the target server;

[0135] The second determination module 402 is used to call a preset resource management platform to determine the total resource information of the target server and other servers;

[0136] The synchronization module 403 is used to synchronize the total resource information with other servers to realize the construction of a server cluster.

[0137] The technical solution of the embodiment of the present invention is that the target server responds to the request for setting up the server cluster, determines the communication mode between the target server and other servers except the target server as key-free communication, calls the preset resource management platform, determines the total resource information of the target server and other servers, synchronizes the total resource information with other servers, and realizes the server cluster construction. By making the target server call the resource management platform, the total resource information of the server cluster can be quickly and accurately determined. In addition, by determining the communication mode of the server cluster as key-free communication, the overall data processing efficiency of the server cluster can be improved. By making the target server synchronize the acquired total resource information with other servers, the resource information of the target server and other servers can be shared, thereby realizing the construction of the server cluster, which is helpful for the subsequent unified management of the total resource information of the server cluster.

[0138] Further, the second determining module 402 is specifically configured to:

[0139] Based on the preset platform address information and account password information, call the preset resource management platform;

[0140] Sending attribute information of the target server and other servers to the resource management platform so that the resource management platform can perform server configuration and resource collection;

[0141] The total resource information of the target server and other servers is determined based on the resource information collected by the resource management platform.

[0142] Furthermore, the synchronization module 403 is specifically used for:

[0143] According to the total resource information, configure the management database;

[0144] The preset operation and maintenance tool in the target server is used to send a data synchronization request to other servers to instruct other servers to call the management database to achieve data synchronization.

[0145] Furthermore, the first determining module 401 is specifically configured to:

[0146] Disable the local security system and local firewall, and set up keyless login;

[0147] Using the preset operation and maintenance tools in the target server, key-free communication requests are synchronously sent to other servers to instruct other servers to set up key-free login and realize key-free communication of the server cluster.

[0148] Furthermore, the above device is also used for:

[0149] Before calling the preset resource management platform, the management service of the preset resource management platform is installed locally on the target server based on the preset installation instructions;

[0150] After the management service is installed, based on the preset detection instructions, the local system log of the target server is detected to determine whether the target port information exists in the system log;

[0151] If so, it is determined that the pre-installation of the management service is completed.

[0152] Furthermore, the above device also includes:

[0153] The acquisition module is used to call the resource management platform in response to the server cluster monitoring instruction after the server cluster is built to obtain the resource information of each server in the server cluster within a preset detection period;

[0154] The monitoring module is used to generate cluster resource information according to the resource information of each server in the server cluster after the server cluster is built, and monitor and manage the cluster resource information.

[0155] Furthermore, the monitoring module is specifically used for:

[0156] Determine the CPU usage information of the target server in the server cluster, and the CPU call information of other servers in the server cluster except the target server;

[0157] Cluster CPU information is generated according to the CPU occupancy information and the CPU call information.

[0158] The server cluster building device provided in the embodiment of the present invention can execute the server cluster building method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0159] Embodiment 5

[0160] Figure 5 is a schematic diagram of the structure of an electronic device for implementing the server cluster building method according to an embodiment of the present invention, Figure 5 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0161] like Figure 5 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0162] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0163] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a server cluster building method.

[0164] In some embodiments, the server cluster building method can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the server cluster building method described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to execute the server cluster building method in any other appropriate manner (for example, by means of firmware).

[0165] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0166] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0167] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0168] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0169] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0170] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0171] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0172] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for building a server cluster, characterized in that: Executed by the target server, the method includes: In response to a request for establishing a server cluster, determining the communication mode of the server cluster as key-free communication; the server cluster includes a target server and other servers except the target server; Call the preset resource management platform to determine the total resource information of the target server and other servers; Synchronize the total resource information to other servers to build a server cluster; The calling of a preset resource management platform to determine the total resource information of the target server and other servers includes: Based on the preset platform address information and account password information, call the preset resource management platform; Sending attribute information of the target server and other servers to the resource management platform so that the resource management platform can perform server configuration and resource collection; Determine the total resource information of the target server and other servers based on the resource information collected by the resource management platform; After determining the target server and other server total resource information, it also includes: The target server compares the total resource information with the total resource information obtained during the last detection to determine whether they are consistent; If not, the total resource information of the target server and other servers stored locally is updated to the resource information most recently collected by the resource management platform; If so, no update is performed.

2. The method according to claim 1, characterized in that The synchronizing the total resource information to other servers includes: According to the total resource information, configure the management database; The preset operation and maintenance tool in the target server is used to send a data synchronization request to other servers to instruct other servers to call the management database to achieve data synchronization.

3. The method according to claim 1, characterized in that: Determining the communication mode of the server cluster as key-free communication includes: Disable the local security system and local firewall, and set up keyless login; Using the preset operation and maintenance tools in the target server, key-free communication requests are synchronously sent to other servers to instruct other servers to set up key-free login and realize key-free communication of the server cluster.

4. The method according to claim 1, characterized in that: Before calling the preset resource management platform, the method further includes: Based on the preset installation instructions, the management service of the preset resource management platform is installed locally on the target server; After the management service is installed, based on the preset detection instructions, the local system log of the target server is detected to determine whether the target port information exists in the system log; If so, it is determined that the pre-installation of the management service is completed.

5. The method according to claim 1, characterized in that After the server cluster is built, the following steps are also included: In response to the server cluster monitoring instruction, the resource management platform is called to obtain resource information of each server in the server cluster within a preset detection period; Generate cluster resource information based on resource information of each server in the server cluster, and monitor and manage the cluster resource information.

6. The method according to claim 5, characterized in that Generate cluster resource information based on the resource information of each server in the server cluster, including: Determine the CPU usage information of the target server in the server cluster, and the CPU call information of other servers in the server cluster except the target server; Cluster CPU information is generated according to the CPU occupancy information and the CPU call information.

7. A server cluster building device, characterized in that: The device is configured in the target server and includes: A first determination module is used to determine the communication mode of the server cluster as key-free communication in response to a request for establishing a server cluster; the server cluster includes a target server and other servers except the target server; The second determination module is used to call a preset resource management platform to determine the total resource information of the target server and other servers; A synchronization module, used to synchronize the total resource information with other servers to realize server cluster construction; Wherein, the second determining module is specifically used for: Based on the preset platform address information and account password information, call the preset resource management platform; Sending attribute information of the target server and other servers to the resource management platform so that the resource management platform can perform server configuration and resource collection; Determine the total resource information of the target server and other servers based on the resource information collected by the resource management platform; After determining the target server and other server total resource information, it also includes: The target server compares the total resource information with the total resource information obtained during the last detection to determine whether they are consistent; If not, the total resource information of the target server and other servers stored locally is updated to the resource information most recently collected by the resource management platform; If so, no update is performed.

8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the server cluster building method described in any one of claims 1-6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the server cluster building method according to any one of claims 1 to 6 when executed.

Citation Information

Patent Citations

  • Cluster system resource integration method

    CN103634373A

  • Cloud storage deployment method and device, computer equipment and readable storage medium

    CN110764788A