Domain name management method and device, computer equipment and storage medium
By using the shared primary domain name and object identifier to determine the subdomain name and cluster domain name in an environment across multiple storage clusters, and establish correspondence relationships, the problems of cross-cluster domain name management and load balancing are solved, and the precise positioning of the target communication address and the selection of the optimal storage cluster are achieved.
Patent Information
- Application Number
- CN202411845310.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-03-14
AI Technical Summary
In an environment that spans multiple storage clusters, it is difficult to achieve domain name management and load balancing across clusters.
By obtaining the main domain name shared by N storage clusters and the object identification of the object to be stored for each storage cluster, determining the subdomain name and cluster domain name corresponding to each storage cluster, establishing M correspondence relationships, and then upon receiving the target domain name request, the target storage cluster is determined based on the target object identification and correspondence relationship, and obtaining the target communication address feedback from its master node.
The domain name management across clusters is realized, allowing the target communication address that meets the target domain name request and has the best performance of nodes, ensuring that the domain name request can be distributed to the optimal storage cluster.
Smart Images

Figure CN119629148A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a domain name management method, device, computer equipment and storage medium. Background Art
[0002] With the rapid development of cloud computing and big data technology, distributed storage systems have become key infrastructure to support large-scale data processing and services, used to store large amounts of data. Distributed storage systems usually use IP addresses to identify storage nodes. IP addresses are usually managed by the Domain Name System (DNS).
[0003] In the domain name management process, usually for a single cluster of a distributed storage system, when a client sends a domain name request for a target domain name to the front-end load balancer in a single cluster, the front-end load balancer selects a storage node in the cluster based on load balancing strategies such as polling, and maps the target domain name to a virtual IP address in the IP list through the DNS of the storage node, and returns it to the client. This method is only for load balancing within a single cluster. In an environment across multiple storage clusters, it is difficult to achieve cross-cluster domain name management and load balancing. Summary of the invention
[0004] In view of this, the present invention provides a domain name management method, apparatus, computer device and storage medium to solve the problem that it is difficult to implement cross-cluster domain name management in an environment across multiple storage clusters.
[0005] In a first aspect, the present invention provides a domain name management method, the method comprising: obtaining a primary domain name shared by N storage clusters and an object identifier of an object to be stored corresponding to each storage cluster; determining a subdomain name corresponding to each storage cluster based on the object identifier; obtaining a cluster domain name corresponding to each storage cluster according to the primary domain name and the subdomain name corresponding to each storage cluster; establishing M corresponding relationships, M≤N, according to the cluster domain name corresponding to each storage cluster and the object identifier of the object to be stored corresponding to each storage cluster; when a target domain name request from a client is received, determining a target storage cluster according to a target object identifier included in the target domain name request and the M corresponding relationships, and obtaining a target communication address fed back by a master node of the target storage cluster; and sending the target communication address to the client.
[0006] Based on the first aspect above, the cluster domain name corresponding to each storage cluster can be obtained based on the primary domain name shared by N storage clusters and the subdomain name corresponding to the object identifier of the object to be stored corresponding to each storage cluster. When a target domain name request is received, the target storage cluster can be determined based on the target object identifier included in the target domain name request and the correspondence between the cluster domain name corresponding to each storage cluster and the corresponding object identifier, thereby obtaining the target communication address fed back by the master node in the target storage cluster.
[0007] Since N storage clusters share the same primary domain name, and the subdomain name of each storage cluster is associated with the object to be stored in the storage cluster, and different storage clusters can be used to store the same object to be stored, a cluster domain name obtained can correspond to at least one storage cluster, that is, when a target domain name request is received, the target communication address corresponding to the target domain name request can be determined across clusters, thereby realizing cross-cluster domain name management, so that the target communication address of the node that meets the target domain name request and has the best node performance is determined.
[0008] In an optional implementation, N storage clusters correspond to N cluster domain names; the target storage cluster is determined based on the target object identifier and M corresponding relationships included in the target domain name request, including: determining the target cluster domain name from the N cluster domain names based on the target object identifier and the M corresponding relationships; based on the target cluster domain name, determining L first storage clusters corresponding to the target cluster domain name; if L=1, determining the L prepared clusters as the target storage clusters; if L≥2, obtaining the load information of each first storage cluster within a preset time period, and determining the target storage cluster based on the load information of each first storage cluster.
[0009] Based on the above method, when the number of first storage clusters corresponding to the target cluster domain name is one, the first storage cluster can be directly determined as the target storage cluster; and when the number of first storage clusters corresponding to the target cluster domain name is multiple, the target domain name request can be sent to the target storage cluster according to the comprehensive load situation of each storage cluster to ensure that the target domain name request can be distributed to the optimal storage cluster.
[0010] In an optional embodiment, the load information includes multiple central processing unit CPU resource utilization rates, multiple memory utilization rates, multiple disk read and write speeds, and multiple network bandwidths of each first storage cluster within a preset time period; obtaining the load information of each first storage cluster within a preset time period, and determining the target storage cluster based on the load information of each first storage cluster, including: obtaining multiple CPU resource utilization rates, multiple memory utilization rates, multiple disk read and write speeds, and multiple network bandwidths of each first storage cluster within a preset time period; calculating the load value of each first storage cluster based on the multiple CPU resource utilization rates, multiple memory utilization rates, multiple disk read and write speeds, and multiple network bandwidths; determining the target storage cluster based on the load value and a load safety value, the load safety value being the maximum load value for each first storage cluster to maintain normal operation.
[0011] Based on the above method, the load value of each first storage cluster can be determined based on the CPU resource utilization rate, multiple memory utilization rates, multiple disk read and write speeds and multiple network bandwidths of each first storage cluster, and then based on the load value, a target storage cluster can be selected so that the determined target storage cluster can maintain normal operation.
[0012] In an optional embodiment, the load value of each first storage cluster is calculated based on multiple CPU resource utilization rates, multiple memory utilization rates, multiple disk read and write speeds, and multiple network bandwidths, including: obtaining a first weight value corresponding to the CPU resource utilization rate, a second weight value corresponding to the memory utilization rate, a third weight value corresponding to the disk read and write speed, and a fourth weight value corresponding to the network bandwidth; determining the maximum CPU resource utilization rate and the minimum CPU resource utilization rate from the multiple CPU resource utilization rates of each first storage cluster within a preset time period, determining the maximum memory utilization rate and the minimum memory utilization rate from the multiple memory utilization rates, determining the maximum disk read and write speed and the minimum disk read and write speed from the multiple disk read and write speeds, and determining the maximum network bandwidth and the minimum network bandwidth from the multiple network bandwidths.
[0013] The average CPU resource utilization is calculated by averaging multiple CPU resource utilizations, the average memory utilization is calculated by averaging multiple memory utilizations, the average disk read / write speed is calculated by averaging multiple disk read / write speeds, and the average network bandwidth is calculated by averaging multiple network bandwidths.
[0014] Based on the maximum CPU resource utilization and the minimum CPU resource utilization, the average CPU resource utilization is normalized to obtain the target CPU resource utilization; based on the maximum memory utilization and the minimum memory utilization, the average CPU resource utilization is normalized to obtain the target memory utilization; based on the maximum disk read and write speed and the minimum disk read and write speed, the average disk read and write speed is normalized to obtain the target disk read and write speed; based on the maximum network bandwidth and the minimum network bandwidth, the average network bandwidth is normalized to obtain the target network bandwidth.
[0015] The load value of each first storage cluster is calculated based on the first weight value and the target CPU resource usage, the second weight value and the target memory usage, the third weight value and the target disk read / write speed, and the fourth weight value and the target network bandwidth.
[0016] Based on the above method, the average values of multiple CPU resource utilization rates, multiple memory utilization rates, multiple disk read and write speeds, and multiple network bandwidths can be calculated, and the average values can be normalized. Based on the first weight value, the second weight value, the third weight value, and the fourth weight value, the load value of each first storage cluster can be obtained, so as to facilitate the determination of the target storage cluster based on the load value of each first storage cluster.
[0017] In an optional implementation, the load value of each first storage cluster is calculated based on the first weight value and the target CPU resource usage, the second weight value and the target memory usage, the third weight value and the target disk read / write speed, and the fourth weight value and the target network bandwidth, including:
[0018] Based on the first weight value and the target CPU resource usage, the second weight value and the target memory usage, the third weight value and the target disk read / write speed, the fourth weight value and the target network bandwidth, the load value of each first storage cluster is calculated by a preset algorithm, and the preset algorithm is:
[0019] Q=A*R1+B*R2+C*R3+D*R4
[0020] Among them, Q is the load value, A is the target CPU resource utilization, B is the target memory utilization, C is the target disk read and write speed, D is the target network bandwidth, R1 is the first weight value, R2 is the second weight value, R3 is the third weight value, and R4 is the fourth weight value.
[0021] Based on the above method, the load value of each first storage cluster can be obtained based on a preset algorithm, so as to facilitate determining the target storage cluster based on the load value of each first storage cluster and avoid the load value of the determined target storage cluster being greater than the load safety value.
[0022] In an optional embodiment, the target storage cluster includes a master node and at least one slave node; obtaining the target communication address fed back by the master node of the target storage cluster includes: forwarding the target domain name request to the master node, the master node is used to receive the target domain name request, and based on the load balancing strategy, determining the target node from all nodes included in the target storage cluster, and feeding back the target communication address of the target node to the domain name management server.
[0023] Based on the above method, since the target node is determined by the master node of the target storage cluster based on the load balancing strategy, the determined target node is the node with the smallest load in the target storage cluster, which facilitates the subsequent storage of the object to be stored corresponding to the target domain name into the target node.
[0024] In a second aspect, the present invention provides a domain name management device, which includes: a transceiver module, which is used to obtain a primary domain name shared by N storage clusters and an object identifier of an object to be stored corresponding to each storage cluster; a processing module, which is used to determine the subdomain name corresponding to each storage cluster based on the object identifier; the processing module is also used to obtain a cluster domain name corresponding to each storage cluster based on the primary domain name and the subdomain name corresponding to each storage cluster; the processing module is also used to establish M corresponding relationships, M≤N, based on the cluster domain name corresponding to each storage cluster and the object identifier of the object to be stored corresponding to each storage cluster; the transceiver module is used to receive a target domain name request from a client; the processing module is also used to determine the target storage cluster based on the target object identifier and M corresponding relationships included in the target domain name request when the transceiver module receives the target domain name request, and obtain the target communication address fed back by the master node of the target storage cluster; the transceiver module is also used to send the target communication address to the client.
[0025] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the domain name management method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0026] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the domain name management method of the first aspect or any corresponding embodiment thereof.
[0027] In a fifth aspect, the present invention provides a computer program product, including computer instructions, and the computer instructions are used to enable a computer to execute the domain name management method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0029] Figure 1 is a topology diagram of a domain name management system according to an embodiment of the present invention;
[0030] Figure 2 is a flowchart of a domain name management method according to an embodiment of the present invention;
[0031] Figure 3 is a flow chart of a method for calculating a load value of a storage cluster according to an embodiment of the present invention;
[0032] Figure 4 is a structural block diagram of a domain name management device according to an embodiment of the present invention;
[0033] Figure 5 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0034] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution 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 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 those skilled in the art without creative work are within the scope of protection of the present invention.
[0035] The embodiment of the present invention is applied to a distributed storage system, which includes multiple storage clusters. When a storage cluster receives a domain name request, it needs to return a communication address corresponding to the domain name request.
[0036] As described in the background art, the related art usually targets a single storage cluster and determines the communication address corresponding to the domain name request from the single storage cluster. In an environment across multiple storage clusters, it is difficult to achieve cross-cluster domain name management and load balancing.
[0037] In order to solve the above technical problems, an embodiment of the present invention provides a domain name management method, which manages the domain names of multiple storage clusters, determines the target communication address corresponding to the target domain name request, and then realizes cross-cluster domain name management, and determines the target communication address of the node that meets the target domain name request and has the best node performance.
[0038] Below Figure 1 Taking the domain name management system 100 as an example, the method provided in the embodiment of the present application is described. Figure 1 It is only a schematic diagram and does not constitute a limitation on the applicable scenarios of the technical solution provided in this application.
[0039] like Figure 1 As shown, Figure 1 is a topological diagram of a domain name management system according to an embodiment of the present invention. Figure 1 In the embodiment, the domain name management system 100 may include a domain name management device 101 , a client 102 , a first storage cluster 103 , and a second storage cluster 104 .
[0040] The first storage cluster includes at least one node; the second storage cluster includes at least one node.
[0041] The domain name management device 101 in the embodiment of the present application can be any device with computing and communication capabilities. Optionally, the domain name management device 101 also has a display function, which is used to provide a visual management interface to facilitate the administrator to monitor and manage the entire system. For example, the domain name management device 101 can be a server, a cloud server, or a virtual machine. The server can be a central domain name management server. Optionally, the domain name management device 101 includes a computing distribution module and a load receiving module.
[0042] The client 102 in the embodiment of the present application may be any device with communication capability and display function. It is understandable that the client may have a display interface, and the display interface may be used by the user to input a domain name request.
[0043] The first storage cluster 103 or the second storage cluster 104 in the embodiment of the present application may include at least one node. The at least one node may include a master node and other slave nodes. A domain name resolution server is deployed inside the first storage cluster 103 or the second storage cluster 104.
[0044] Figure 1 The domain name management system 100 shown is only used as an example and is not used to limit the technical solution of the present application. Those skilled in the art should understand that in the specific implementation process, the domain name management system 100 can also include other storage clusters, and the number of nodes in each storage cluster can also be determined according to specific needs without limitation.
[0045] According to an embodiment of the present invention, a domain name management method embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0046] In this embodiment, a domain name management method is provided, which can be used in the above-mentioned domain name management device. Figure 2 is a flow chart of a domain name management method according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:
[0047] S201: Obtain a primary domain name shared by N storage clusters and an object identifier of an object to be stored corresponding to each storage cluster.
[0048] The primary domain name may be a preset domain name, for example, example.com.
[0049] The object to be stored may be a service object or a file object.
[0050] The object identifier of the object to be stored may be an identifier in any form.
[0051] It can be understood that if the objects to be stored are the same, the object identifiers of the objects to be stored are also the same.
[0052] S202: Determine the subdomain name corresponding to each storage cluster based on the object identifier.
[0053] In one example, the domain name management device determines, based on the object identifier, a subdomain name of a storage cluster that stores an object to be stored corresponding to the object identifier.
[0054] Exemplarily, taking the object identifiers abc and efg as an example, the domain name management device can determine that the subdomain name of the storage cluster storing the object to be stored corresponding to "abc" is "P." based on the object identifier "abc". The domain name management device can determine that the subdomain name of the storage cluster storing the object to be stored corresponding to "abc" is "Q." based on the object identifier "efg".
[0055] S203: Obtain a cluster domain name corresponding to each storage cluster according to the primary domain name and the subdomain name corresponding to each storage cluster.
[0056] The cluster domain name consists of a primary domain name and a subdomain name. For example, the cluster domain name can be "P.example.com" or "Q.example.com".
[0057] S204: Establish M corresponding relationships according to the cluster domain name corresponding to each storage cluster and the object identifier of the to-be-stored object corresponding to each storage cluster.
[0058] Where M≤N. One object identifier corresponds to the cluster domain names of multiple storage clusters.
[0059] It can be understood that N storage clusters correspond to N cluster domain names. One cluster domain name corresponds to at least one storage cluster, so the number of established correspondences is less than or equal to the number of clusters.
[0060] S205: When a target domain name request is received from the client, a target storage cluster is determined according to the target object identifier and the M corresponding relationships included in the target domain name request, and a target communication address fed back by a master node of the target storage cluster is obtained.
[0061] The target domain name request is used to request the resolution of the communication address (also called IP address) corresponding to the target domain name. The target domain name request includes a target object identifier. Optionally, the target domain name request also includes a target domain name. The target domain name is a unified domain name of the domain name management device. For example, the target domain name is "uni.example.com".
[0062] The target communication address is used to indicate the storage node of the object to be stored.
[0063] In one example, a domain name management device determines a target cluster domain name from N cluster domain names based on a target object identifier and M corresponding relationships; based on the target cluster domain name, determines L first storage clusters corresponding to the target cluster domain name; if L=1, determines the L prepared clusters as target storage clusters; if L≥2, obtains load information of each first storage cluster within a preset time period, and determines the target storage cluster based on the load information of each first storage cluster.
[0064] The load information includes multiple central processing unit CPU resource utilization rates, multiple memory utilization rates, multiple disk read and write speeds, and multiple network bandwidths of each first storage cluster within a preset time period.
[0065] Specifically, the domain name management device obtains multiple CPU resource utilization rates, multiple memory utilization rates, multiple disk read / write speeds, and multiple network bandwidths of each first storage cluster within a preset time period. According to the multiple CPU resource utilization rates, multiple memory utilization rates, multiple disk read / write speeds, and multiple network bandwidths, the load value of each first storage cluster is calculated; according to the load value and the load safety value, the target storage cluster is determined, and the load safety value is the maximum load value for each first storage cluster to maintain normal operation.
[0066] In one example, Figure 3 As shown, Figure 3 is a flow chart of a method for calculating a load value of a storage cluster according to an embodiment of the present invention; Figure 3 In the process, the domain name management device calculates the load value of each first storage cluster according to multiple CPU resource utilization rates, multiple memory utilization rates, multiple disk read and write speeds, and multiple network bandwidths. Specifically, the following steps are included:
[0067] S301: Obtain a first weight value corresponding to CPU resource usage, a second weight value corresponding to memory usage, a third weight value corresponding to disk read / write speed, and a fourth weight value corresponding to network bandwidth.
[0068] S302: Determine the maximum CPU resource utilization and the minimum CPU resource utilization from multiple CPU resource utilizations of each first storage cluster within a preset time period, determine the maximum memory utilization and the minimum memory utilization from multiple memory utilizations, determine the maximum disk read and write speed and the minimum disk read and write speed from multiple disk read and write speeds, and determine the maximum network bandwidth and the minimum network bandwidth from multiple network bandwidths.
[0069] S303: Calculate the average of multiple CPU resource utilizations to obtain an average CPU resource utilization, calculate the average of multiple memory utilizations to obtain an average memory utilization, calculate the average of multiple disk read and write speeds to obtain an average disk read and write speed, and calculate the average of multiple network bandwidths to obtain an average network bandwidth.
[0070] S304: Based on the maximum CPU resource utilization and the minimum CPU resource utilization, the average CPU resource utilization is normalized to obtain a target CPU resource utilization.
[0071] S305: Based on the maximum memory usage and the minimum memory usage, the average CPU resource usage is normalized to obtain a target memory usage.
[0072] S306: Based on the maximum disk read / write speed and the minimum disk read / write speed, the average disk read / write speed is normalized to obtain a target disk read / write speed.
[0073] S307: Based on the maximum network bandwidth and the minimum network bandwidth, the average network bandwidth is normalized to obtain a target network bandwidth.
[0074] S308: Calculate the load value of each first storage cluster based on the first weight value and the target CPU resource usage, the second weight value and the target memory usage, the third weight value and the target disk read / write speed, and the fourth weight value and the target network bandwidth.
[0075] The first weight value, the second weight value, the third weight value and the fourth weight value can be set according to actual needs without limitation. For example, the first weight value can be 0.2, the second weight value can be 0.2, the third weight value can be 0.3 and the fourth weight value can be 0.3.
[0076] In one example, the domain name management device calculates the load value of each first storage cluster through a preset algorithm based on the first weight value and target CPU resource utilization, the second weight value and target memory utilization, the third weight value and target disk read and write speed, and the fourth weight value and target network bandwidth.
[0077] Among them, the preset algorithm is:
[0078] Q=A*R1+B*R2+C*R3+D*R4
[0079] Among them, Q is the load value, A is the target CPU resource utilization, B is the target memory utilization, C is the target disk read and write speed, D is the target network bandwidth, R1 is the first weight value, R2 is the second weight value, R3 is the third weight value, and R4 is the fourth weight value.
[0080] In some optional implementations, the domain name management device selects P second storage clusters from the L first storage clusters; and determines the second storage cluster with the smallest load value among the P second storage clusters as the target storage cluster.
[0081] The load value of each second storage cluster is less than or equal to the load safety value.
[0082] In one example, the domain name management device forwards the target domain name request to the master node, which is used to receive the target domain name request, determine the target node from all nodes included in the target storage cluster based on the load balancing strategy, and feed back the target communication address of the target node to the domain name management server.
[0083] The load balancing strategy may be a polling strategy, the number of node connections, or the hash value of the client. The load balancing strategy may also be the task execution status on each node and the number of tasks to be executed.
[0084] S206: Send the target communication address to the client.
[0085] It can be understood that after receiving the target communication address, the client can store the to-be-stored object corresponding to the target domain name request in the target node corresponding to the target communication address.
[0086] Based on the above Figure 2 According to the method, the domain name management device can obtain the cluster domain name corresponding to each storage cluster based on the main domain name shared by N storage clusters and the subdomain name corresponding to the object identifier of the object to be stored corresponding to each storage cluster, and when receiving the target domain name request, according to the target object identifier included in the target domain name request, and the correspondence between the cluster domain name corresponding to each storage cluster and the corresponding object identifier, determine the target storage cluster, and then obtain the target communication address fed back by the master node in the target storage cluster.
[0087] Since N storage clusters share the same primary domain name, and the subdomain name of each storage cluster is associated with the object to be stored in the storage cluster, and different storage clusters can be used to store the same object to be stored, a cluster domain name obtained can correspond to at least one storage cluster, that is, when a target domain name request is received, the target communication address corresponding to the target domain name request can be determined across clusters, thereby realizing cross-cluster domain name management, so that the target communication address of the node that meets the target domain name request and has the best node performance is determined.
[0088] In this embodiment, a domain name management device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0089] This embodiment provides a domain name management device, such as Figure 4 As shown, including:
[0090] The transceiver module 401 is used to obtain a primary domain name shared by N storage clusters and an object identifier of an object to be stored corresponding to each storage cluster.
[0091] Processing module 402 is used to determine the subdomain name corresponding to each storage cluster based on the object identifier, and obtain the cluster domain name corresponding to each storage cluster according to the primary domain name and the subdomain name corresponding to each storage cluster.
[0092] According to the cluster domain name corresponding to each storage cluster and the object identifier of the to-be-stored object corresponding to each storage cluster, M corresponding relationships are established, where M≤N.
[0093] The transceiver module 401 is used to receive a target domain name request from a client.
[0094] The processing module 402 is further used to determine the target storage cluster according to the target object identifier and M corresponding relationships included in the target domain name request when the transceiver module 401 receives the target domain name request, and obtain the target communication address fed back by the master node of the target storage cluster.
[0095] The transceiver module 401 is also used to send the target communication address to the client.
[0096] In some optional implementations, N storage clusters correspond to N cluster domain names; the processing module 402 is specifically used to determine the target cluster domain name from the N cluster domain names based on the target object identifier and M corresponding relationships; the processing module 402 is also specifically used to determine L first storage clusters corresponding to the target cluster domain name based on the target cluster domain name; the processing module 402 is also specifically used to determine the L prepared clusters as the target storage cluster if L=1; the processing module 402 is also specifically used to obtain the load information of each first storage cluster within a preset time period if L≥2, and determine the target storage cluster according to the load information of each first storage cluster.
[0097] In some optional embodiments, the load information includes multiple central processing unit CPU resource utilization rates, multiple memory utilization rates, multiple disk read and write speeds, and multiple network bandwidths of each first storage cluster within a preset time period; the processing module 402 is also specifically used to obtain multiple CPU resource utilization rates, multiple memory utilization rates, multiple disk read and write speeds, and multiple network bandwidths of each first storage cluster within a preset time period; the processing module 402 is also specifically used to calculate the load value of each first storage cluster based on the multiple CPU resource utilization rates, multiple memory utilization rates, multiple disk read and write speeds, and multiple network bandwidths; the processing module 402 is also specifically used to determine the target storage cluster based on the load value and the load safety value, and the load safety value is the maximum load value for each first storage cluster to maintain normal operation.
[0098] In some optional embodiments, the processing module 402 is further specifically used to obtain a first weight value corresponding to the CPU resource utilization, a second weight value corresponding to the memory utilization, a third weight value corresponding to the disk read and write speed, and a fourth weight value corresponding to the network bandwidth; determine the maximum CPU resource utilization and the minimum CPU resource utilization from multiple CPU resource utilizations of each first storage cluster within a preset time period, determine the maximum memory utilization and the minimum memory utilization from multiple memory utilizations, determine the maximum disk read and write speed and the minimum disk read and write speed from multiple disk read and write speeds, and determine the maximum network bandwidth and the minimum network bandwidth from multiple network bandwidths.
[0099] The processing module 402 is also specifically used to calculate the average value of multiple CPU resource utilization rates to obtain the average CPU resource utilization rate, calculate the average value of multiple memory utilization rates to obtain the average memory utilization rate, calculate the average value of multiple disk read and write speeds to obtain the average disk read and write speed, and calculate the average value of multiple network bandwidths to obtain the average network bandwidth; based on the maximum CPU resource utilization rate and the minimum CPU resource utilization rate, the average CPU resource utilization rate is normalized to obtain the target CPU resource utilization rate; based on the maximum memory utilization rate and the minimum memory utilization rate, the average CPU resource utilization rate is normalized to obtain the target memory utilization rate; based on the maximum disk read and write speed and the minimum disk read and write speed, the average disk read and write speed is normalized to obtain the target disk read and write speed; based on the maximum network bandwidth and the minimum network bandwidth, the average network bandwidth is normalized to obtain the target network bandwidth.
[0100] The processing module 402 is further specifically used to calculate the load value of each first storage cluster based on the first weight value and target CPU resource usage, the second weight value and target memory usage, the third weight value and target disk read and write speed, and the fourth weight value and target network bandwidth.
[0101] In some optional implementations, the processing module 402 is further specifically used to select P second storage clusters from L first storage clusters, and the load value of each second storage cluster is less than or equal to the load safety value; the processing module 402 is further specifically used to determine the second storage cluster with the smallest load value among the P second storage clusters as the target storage cluster.
[0102] In some optional implementations, the processing module 402 is further specifically configured to calculate the load value of each first storage cluster by a preset algorithm based on the first weight value and the target CPU resource usage rate, the second weight value and the target memory usage rate, the third weight value and the target disk read / write speed, and the fourth weight value and the target network bandwidth, wherein the preset algorithm is:
[0103] Q=A*R1+B*R2+C*R3+D*R4
[0104] Among them, Q is the load value, A is the target CPU resource utilization, B is the target memory utilization, C is the target disk read and write speed, D is the target network bandwidth, R1 is the first weight value, R2 is the second weight value, R3 is the third weight value, and R4 is the fourth weight value.
[0105] In some optional embodiments, the target storage cluster includes a master node and at least one slave node; the processing module 402 is further specifically used to forward the target domain name request to the master node, the master node is used to receive the target domain name request, and determine the target node from all nodes included in the target storage cluster based on the load balancing strategy, and feed back the target communication address of the target node to the domain name management server.
[0106] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0107] The domain name management device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0108] The embodiment of the present invention also provides a computer device having the above Figure 4 The domain name management device shown.
[0109] See also Figure 5 , Figure 5 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 5 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 5 A processor 10 is taken as an example.
[0110] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0111] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
[0112] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0113] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0114] The computer device also includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Figure 5 The example of connecting through bus is taken in the following.
[0115] The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device can be a touch screen.
[0116] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0117] Part of the present application may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present application through the operation of the computer. Those skilled in the art should understand that the existence of computer program instructions in computer-readable media includes but is not limited to source files, executable files, installation package files, etc., and accordingly, the way in which computer program instructions are executed by a computer includes but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the computer.
[0118] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A domain name management method, characterized in that: The method comprises: Obtaining a primary domain name shared by N storage clusters and an object identifier of an object to be stored corresponding to each storage cluster; Based on the object identifier, determine the subdomain name corresponding to each of the storage clusters; Obtaining a cluster domain name corresponding to each storage cluster according to the primary domain name and the subdomain name corresponding to each storage cluster; Establishing M corresponding relationships according to the cluster domain name corresponding to each storage cluster and the object identifier of the object to be stored corresponding to each storage cluster, where M≤N; When receiving a target domain name request from a client, determining a target storage cluster according to a target object identifier included in the target domain name request and the M corresponding relationships, and obtaining a target communication address fed back by a master node of the target storage cluster; The target communication address is sent to the client.
2. The method according to claim 1, characterized in that The N storage clusters correspond to N cluster domain names; and determining the target storage cluster according to the target object identifier included in the target domain name request and the M corresponding relationships, comprises: Determine a target cluster domain name from the N cluster domain names according to the target object identifier and the M corresponding relationships; Based on the target cluster domain name, determining L first storage clusters corresponding to the target cluster domain name; If L=1, determining the L prepared clusters as the target storage clusters; If L≥2, the load information of each of the first storage clusters within a preset time period is acquired, and the target storage cluster is determined according to the load information of each of the first storage clusters.
3. The method according to claim 2, characterized in that The load information includes multiple CPU resource utilization rates, multiple memory utilization rates, multiple disk read / write speeds, and multiple network bandwidths of each of the first storage clusters within the preset time period; The acquiring the load information of each of the first storage clusters within a preset time period, and determining the target storage cluster according to the load information of each of the first storage clusters, includes: Obtaining the multiple CPU resource utilization rates, the multiple memory utilization rates, the multiple disk read / write speeds, and the multiple network bandwidths of each of the first storage clusters within the preset time period; calculating the load value of each of the first storage clusters according to the multiple CPU resource utilization rates, the multiple memory utilization rates, the multiple disk read / write speeds, and the multiple network bandwidths; The target storage cluster is determined according to the load value and the load safety value, where the load safety value is a maximum load value for each of the first storage clusters to maintain normal operation.
4. The method according to claim 3, characterized in that: The calculating the load value of each first storage cluster according to the multiple CPU resource utilization rates, the multiple memory utilization rates, the multiple disk read and write speeds, and the multiple network bandwidths includes: Obtain a first weight value corresponding to the CPU resource usage, a second weight value corresponding to the memory usage, a third weight value corresponding to the disk read / write speed, and a fourth weight value corresponding to the network bandwidth; Determine a maximum CPU resource usage rate and a minimum CPU resource usage rate from the multiple CPU resource usage rates of each of the first storage clusters within the preset time period, determine a maximum memory usage rate and a minimum memory usage rate from the multiple memory usage rates, determine a maximum disk read / write speed and a minimum disk read / write speed from the multiple disk read / write speeds, and determine a maximum network bandwidth and a minimum network bandwidth from the multiple network bandwidths; Calculate the average value of the multiple CPU resource utilization rates to obtain the average CPU resource utilization rate, calculate the average value of the multiple memory utilization rates to obtain the average memory utilization rate, calculate the average value of the multiple disk read and write speeds to obtain the average disk read and write speed, and calculate the average value of the multiple network bandwidths to obtain the average network bandwidth; Based on the maximum CPU resource utilization rate and the minimum CPU resource utilization rate, the average CPU resource utilization rate is normalized to obtain a target CPU resource utilization rate; Based on the maximum memory usage and the minimum memory usage, the average CPU resource usage is normalized to obtain a target memory usage; Based on the maximum disk read / write speed and the minimum disk read / write speed, the average disk read / write speed is normalized to obtain a target disk read / write speed; Based on the maximum network bandwidth and the minimum network bandwidth, the average network bandwidth is normalized to obtain a target network bandwidth; The load value of each of the first storage clusters is calculated based on the first weight value and the target CPU resource usage, the second weight value and the target memory usage, the third weight value and the target disk read / write speed, and the fourth weight value and the target network bandwidth.
5. The method according to claim 3, characterized in that: The determining the target storage cluster according to the load value and the load safety value includes: Selecting P second storage clusters from the L first storage clusters, wherein the load value of each of the second storage clusters is less than or equal to the load safety value; A second storage cluster with the smallest load value among the P second storage clusters is determined as the target storage cluster.
6. The method according to claim 4, characterized in that The calculating the load value of each of the first storage clusters based on the first weight value and the target CPU resource usage, the second weight value and the target memory usage, the third weight value and the target disk read / write speed, and the fourth weight value and the target network bandwidth includes: Based on the first weight value and the target CPU resource usage, the second weight value and the target memory usage, the third weight value and the target disk read / write speed, the fourth weight value and the target network bandwidth, the load value of each first storage cluster is calculated by a preset algorithm, and the preset algorithm is: Q=A*R1+B*R2+C*R3+D*R4 Among them, Q is the load value, A is the target CPU resource utilization, B is the target memory utilization, C is the target disk read and write speed, D is the target network bandwidth, R1 is the first weight value, R2 is the second weight value, R3 is the third weight value, and R4 is the fourth weight value.
7. The method according to claim 6, characterized in that The target storage cluster includes a master node and at least one slave node; The obtaining of the target communication address fed back by the master node of the target storage cluster includes: The target domain name request is forwarded to the master node, the master node is used to receive the target domain name request, determine the target node from all nodes included in the target storage cluster based on the load balancing strategy, and feed back the target communication address of the target node to the domain name management server.
8. A domain name management device, characterized in that: The device comprises: A transceiver module, used to obtain a primary domain name shared by N storage clusters and an object identifier of an object to be stored corresponding to each storage cluster; A processing module, configured to determine a subdomain name corresponding to each storage cluster based on the object identifier; According to the primary domain name and the subdomain name corresponding to each storage cluster, a cluster domain name corresponding to each storage cluster is obtained; according to the cluster domain name corresponding to each storage cluster and the object identifier of the object to be stored corresponding to each storage cluster, M corresponding relationships are established, where M≤N; The transceiver module is used to receive the target domain name request from the client; The processing module is further configured to determine the target storage cluster according to the target object identifier included in the target domain name request and the M corresponding relationships when the transceiver module receives the target domain name request, and obtain the target communication address fed back by the master node of the target storage cluster; The transceiver module is further used to send the target communication address to the client.
9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the domain name management method according to any one of claims 1 to 7 by executing the computer instructions.
10. 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 computer to execute the domain name management method according to any one of claims 1 to 7.