Cluster management method, system, and storage medium

By creating resource allocation parameters and replica allocation information in a multi-cluster environment through the master cluster controller, the lack of flexibility in cross-cluster management in existing technologies is solved, and cross-cluster management is achieved without additional cost.

CN116074329BActive Publication Date: 2025-10-21JD DIGITS HAIYI INFORMATION TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310132893.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-09
Publication Date
2025-10-21
Estimated Expiration
2043-02-09

AI Technical Summary

Technical Problem

Existing multi-cluster management or cross-cluster deployment frameworks cannot flexibly manage stateful services, and users need additional learning and modification costs to adapt to CRD resources, resulting in insufficient flexibility in cross-cluster management.

Method used

A cluster management method is provided, which creates resource allocation parameters and initial replica number allocation information through the main cluster controller, schedules and fills the target replica number allocation information according to the target resource distribution strategy, and creates a second state set and resource allocation parameters on the sub-cluster to achieve cross-cluster replica tuning.

Benefits of technology

It enables cross-cluster management, improving the flexibility of cross-cluster management without additional costs. Users only need to create resource distribution policies on the main cluster, and the main cluster automatically determines the number of replicas in the sub-clusters and completes the allocation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116074329B_ABST
    Figure CN116074329B_ABST
Patent Text Reader

Abstract

The disclosure relates to a cluster management method and system and a storage medium, and belongs to the technical field of computers. The method comprises the following steps: in response to a user creating a first state set and a target resource under a policy, a master cluster controller creates first resource allocation parameters corresponding to the first state set and initial replica number allocation information; when it is monitored that the initial replica number allocation information is not allocated cluster information, the initial replica number allocation information is scheduled and filled according to the target resource policy and the first resource allocation parameters to obtain target replica number allocation information; each sub-cluster is traversed, and a sub-cluster controller tunes the replicas allocated to the sub-cluster according to the target replica number allocation information, a second state set and corresponding second resource allocation parameters, until each sub-cluster completes replica allocation according to the target resource policy. In this way, cross-cluster management resources can be realized without additional cost, and the flexibility of cross-cluster management is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and more particularly to a cluster management method, system, and storage medium. Background Art

[0002] Currently, there are many popular multi-cluster management or cross-cluster deployment frameworks, such as Karmada and Kubevela. However, none of them can manage stateful services like the native StatefulSet. For example, Karmada does not support allocating StatefulSet-type resources to different clusters. Kubevela manages multi-cluster workloads by defining CRD resources. Other frameworks are similar.

[0003] Kubernetes's cross-cluster support relies on pre-planned clusters. This requires careful planning, and existing clusters cannot be managed across them, resulting in a lack of flexibility. Furthermore, currently popular cross-cluster deployment frameworks impose additional learning and modification costs on users. For example, most current PaaS operators manage workloads through stateful sets. To achieve cross-cluster support, adapting to CRD resource management requires rewriting core logic, incurring additional costs.

[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute prior art known to ordinary technicians in this field. Summary of the Invention

[0005] The purpose of the present disclosure is to provide a cluster management method, system and storage medium, thereby overcoming, at least to a certain extent, the problem that existing clusters cannot be managed across clusters and lack flexibility.

[0006] According to one aspect of the present disclosure, a cluster management method is provided, including:

[0007] In response to a first state set and a target resource delivery policy created by a user in the primary cluster, the primary cluster controller creates first resource allocation parameters and initial replica number allocation information corresponding to the first state set;

[0008] When it is detected that no cluster information is allocated to the initial replica number allocation information, the primary cluster controller schedules and fills the initial replica number allocation information according to the target resource delivery policy and the first resource allocation parameter to obtain target replica number allocation information;

[0009] The main cluster controller creates second state sets corresponding to the plurality of subclusters and second resource allocation parameters corresponding to each subcluster according to the target resource delivery policy;

[0010] Traversing each subcluster, the subcluster controller tunes the replicas allocated to the subcluster according to the target replica number allocation information, the second state set, and the corresponding second resource allocation parameter until each subcluster completes replica allocation according to the target resource delivery policy.

[0011] Optionally, the first resource allocation parameter includes replica number information, replica allocation information, and a target sequence number. The primary cluster controller schedules and populates the initial replica number allocation information according to the target resource delivery policy and the first resource allocation parameter to obtain the target replica number allocation information, including:

[0012] The main cluster controller determines allocation correspondence information between the multiple subclusters and the multiple replicas according to the target resource delivery policy, the replica number information, and the replica allocation information;

[0013] Fill the allocation correspondence information and the target sequence number into the initial copy number allocation information to obtain the target copy number allocation information.

[0014] Optionally, the target resource delivery strategy includes a replica configuration weight, and the main cluster controller creates second state sets corresponding to the plurality of subclusters and second resource allocation parameters corresponding to each subcluster according to the target resource delivery strategy, including:

[0015] The main cluster controller creates the second state set and the second resource allocation parameter corresponding to each sub-cluster according to the replica configuration weight.

[0016] Optionally, traversing each subcluster, the subcluster controller tuning the replicas allocated to the subcluster according to the target replica number allocation information, the second state set, and the corresponding second resource allocation parameter, includes:

[0017] The sub-cluster controller determines the target sequence number corresponding to each sub-cluster according to the target replica number allocation information;

[0018] In the order indicated by the target sequence numbers, each sub-cluster controller sequentially tunes the replicas allocated to the sub-cluster according to the second state set and the corresponding second resource allocation parameters.

[0019] Optionally, each sub-cluster controller sequentially tunes the replicas allocated to the sub-cluster according to the second state set and the corresponding second resource allocation parameter, including:

[0020] Each sub-cluster controller sequentially adjusts the type and number of replicas corresponding to the second state set on the sub-cluster according to the second resource allocation parameter.

[0021] Optionally, the method further includes:

[0022] When tuning of the second state set is completed on the sub-cluster, the state in the second state set is updated to a completed state.

[0023] Optionally, the method further includes:

[0024] The main cluster controller monitors the second state sets corresponding to the multiple sub-clusters, and synchronizes the second state sets to the first resource allocation parameters corresponding to the first state set.

[0025] According to one aspect of the present disclosure, there is provided a cluster management system, the system comprising:

[0026] The main cluster controller, in response to a first state set and a target resource delivery policy created by a user in the main cluster, creates first resource allocation parameters and initial replica number allocation information corresponding to the first state set; when it is detected that no cluster information is allocated to the initial replica number allocation information, schedules and populates the initial replica number allocation information according to the target resource delivery policy and the first resource allocation parameters to obtain target replica number allocation information; and creates second state sets corresponding to multiple subclusters and second resource allocation parameters corresponding to each subcluster according to the target resource delivery policy.

[0027] The subcluster controller traverses each subcluster and adjusts the replicas allocated to the subcluster according to the target replica number allocation information, the second state set, and the corresponding second resource allocation parameters until each subcluster completes replica allocation according to the target resource delivery policy.

[0028] Optionally, the first resource allocation parameter includes replica number information, replica allocation information, and a target sequence number, and the primary cluster controller is further configured to:

[0029] The main cluster controller determines allocation correspondence information between the multiple subclusters and the multiple replicas according to the target resource delivery policy, the replica number information, and the replica allocation information;

[0030] Fill the allocation correspondence information and the target sequence number into the initial copy number allocation information to obtain the target copy number allocation information.

[0031] Optionally, the target resource delivery strategy includes a replica configuration weight, and the master cluster controller is further configured to:

[0032] The main cluster controller creates the second state set and the second resource allocation parameter corresponding to each sub-cluster according to the replica configuration weight.

[0033] Optionally, the sub-cluster controller is further configured to:

[0034] The sub-cluster controller determines the target sequence number corresponding to each sub-cluster according to the target replica number allocation information;

[0035] In the order indicated by the target sequence numbers, each sub-cluster controller sequentially tunes the replicas allocated to the sub-cluster according to the second state set and the corresponding second resource allocation parameters.

[0036] Optionally, the sub-cluster controller is further configured to:

[0037] Each sub-cluster controller sequentially adjusts the type and number of replicas corresponding to the second state set on the sub-cluster according to the second resource allocation parameter.

[0038] Optionally, the system further includes:

[0039] The sub-cluster controller updates the state in the second state set to a completed state when tuning of the second state set on the sub-cluster is completed.

[0040] Optionally, the system further includes:

[0041] The main cluster controller monitors the second state sets corresponding to the multiple sub-clusters, and synchronizes the second state sets to the first resource allocation parameters corresponding to the first state set.

[0042] According to one aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the computer program implements any one of the above-mentioned cluster management methods.

[0043] According to one aspect of the present disclosure, there is provided an electronic device, including:

[0044] processor; and

[0045] a memory for storing executable instructions of the processor;

[0046] The processor is configured to execute any one of the above cluster management methods by executing the executable instructions.

[0047] In summary, the cluster management method provided by the embodiment of the present disclosure can respond to the first state set and the target resource delivery policy created by the user in the main cluster. The main cluster controller creates the first resource allocation parameters and initial replica number allocation information corresponding to the first state set. When it is detected that the initial replica number allocation information has not allocated cluster information, the main cluster controller schedules and fills the initial replica number allocation information according to the target resource delivery policy and the first resource allocation parameter to obtain the target replica number allocation information. The main cluster controller creates a second state set corresponding to multiple subclusters and a second resource allocation parameter corresponding to each subcluster according to the target resource delivery policy, traverses each subcluster, and the subcluster controller tunes the replicas allocated to the subcluster according to the target replica number allocation information, the second state set, and the corresponding second resource allocation parameter until each subcluster completes the replica allocation according to the target resource delivery policy. In this way, users only need to create a resource delivery policy on the main cluster. Accordingly, the main cluster can automatically determine the number of replicas corresponding to multiple subclusters based on the resource delivery policy, and control the subclusters to complete the tuning of the allocated replicas according to the resource delivery policy. In this way, existing clusters can be managed across clusters without incurring additional costs, thereby improving the flexibility of cross-cluster management.

[0048] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] The accompanying drawings are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification, are used to explain the principles of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and those skilled in the art can derive other drawings based on these drawings without inventive effort.

[0050] Figure 1 This is a flowchart of the steps of a cluster management method provided by an embodiment of the present disclosure;

[0051] Figure 2 This is a flow chart of obtaining target replica number allocation information provided by an embodiment of the present disclosure;

[0052] Figure 3 This is a flow chart of replica tuning for sub-clusters provided by an embodiment of the present disclosure;

[0053] Figure 4 is a block diagram of a cluster management system provided by an embodiment of the present disclosure;

[0054] Figure 5 An electronic device provided by an embodiment of the present disclosure is used to implement the above cluster management method. DETAILED DESCRIPTION

[0055] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the present disclosure will be more comprehensive and complete and will fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or that other methods, components, systems, steps, etc. may be employed. In other cases, well-known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.

[0056] In addition, the accompanying drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. Identical reference numerals in the figures denote identical or similar parts, and thus repetitive descriptions thereof will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities that do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different networks and / or processor systems and / or microcontroller systems.

[0057] Figure 1 This is a flow chart of the steps of a cluster management method provided by an embodiment of the present disclosure. Figure 1 As shown, the method may include:

[0058] Step S101: In response to a first state set and a target resource delivery policy created by a user in a primary cluster, a primary cluster controller creates first resource allocation parameters and initial replica number allocation information corresponding to the first state set.

[0059] In an embodiment of the present disclosure, a user may create a first state set on the main cluster and create a target resource delivery policy at the same time. The target resource delivery policy may be mainly responsible for the resource delivery policy, for example, it may indicate the weight setting of which cluster deploys how many copies. When the main cluster controller detects that the user has created the first state set, the main cluster controller may create the first resource allocation parameters and initial copy number allocation information corresponding to the first state set. The first resource allocation parameters may include copy number information, copy allocation information and target serial number, wherein the first resource allocation parameters and initial copy number allocation information may be a statefulset custom resource (Custom Resource Definition, CRD). The main cluster may be a Host cluster.

[0060] Step S102: When it is detected that the initial replica number allocation information does not allocate cluster information, the primary cluster controller schedules and fills the initial replica number allocation information according to the target resource delivery policy and the first resource allocation parameter to obtain target replica number allocation information.

[0061] In an embodiment of the present disclosure, when the main cluster scheduler detects that the initial replica number allocation information has not allocated cluster information, the main cluster controller can schedule and fill the initial replica number allocation information corresponding to multiple sub-clusters according to the target resource delivery strategy and the first resource allocation parameter, and use each filled initial replica number allocation information as the target replica number allocation information corresponding to the sub-cluster.

[0062] Step S103: The main cluster controller creates second state sets corresponding to the plurality of subclusters and second resource allocation parameters corresponding to each subcluster according to the target resource delivery policy.

[0063] In the disclosed embodiment, the main cluster controller may create a corresponding second state set and second resource allocation parameters for each subcluster according to the replica configuration weight in the target resource delivery policy. The second state sets for different subclusters may be different, and accordingly, the second resource allocation parameters for different subclusters may also be different. The subclusters may be workload clusters.

[0064] Step S104: Traverse each subcluster, and the subcluster controller tunes the replicas allocated to the subcluster according to the target replica number allocation information, the second state set, and the corresponding second resource allocation parameters, until each subcluster completes replica allocation according to the target resource delivery policy.

[0065] In the embodiment of the present disclosure, each subcluster is traversed, and each subcluster controller tunes the replicas allocated in the second state set on the subcluster according to the target replica number allocation information, the second state set on the subcluster, and the corresponding second resource allocation parameters, until each subcluster completes the replica allocation according to the target resource delivery policy.

[0066] In summary, the cluster management method provided by the embodiment of the present disclosure can respond to the first state set and the target resource delivery policy created by the user in the main cluster. The main cluster controller creates the first resource allocation parameters and initial replica number allocation information corresponding to the first state set. When it is detected that the initial replica number allocation information has not allocated cluster information, the main cluster controller schedules and fills the initial replica number allocation information according to the target resource delivery policy and the first resource allocation parameter to obtain the target replica number allocation information. The main cluster controller creates a second state set corresponding to multiple subclusters and a second resource allocation parameter corresponding to each subcluster according to the target resource delivery policy, traverses each subcluster, and the subcluster controller tunes the replicas allocated to the subcluster according to the target replica number allocation information, the second state set, and the corresponding second resource allocation parameter until each subcluster completes the replica allocation according to the target resource delivery policy. In this way, users only need to create a resource delivery policy on the main cluster. Accordingly, the main cluster can automatically determine the number of replicas corresponding to multiple subclusters based on the resource delivery policy, and control the subclusters to complete the tuning of the allocated replicas according to the resource delivery policy. In this way, existing clusters can be managed across clusters without incurring additional costs, thereby improving the flexibility of cross-cluster management.

[0067] Optionally, in the embodiment of the present disclosure, the first resource allocation parameter may include replica number information, replica allocation information, and a target sequence number. The primary cluster controller schedules and populates the initial replica number allocation information according to the target resource delivery strategy and the first resource allocation parameter to obtain the target replica number allocation information. Figure 2 As shown, it may specifically include:

[0068] Step S1021: The main cluster controller determines allocation correspondence information between the multiple subclusters and the multiple replicas according to the target resource delivery policy, the replica number information, and the replica allocation information.

[0069] In the disclosed embodiment, the main cluster controller may determine the type and number of replicas to be allocated to each subcluster based on the configuration replica and subcluster allocation strategy indicated by the target resource delivery strategy, as well as the replica number information and replica allocation information. The replica number information may include the number of replicas and the type of replicas, and the replica allocation information may indicate the cluster type that the replica matches. It should be noted that the initial replica number allocation information may be empty, and it is necessary to wait for the next scheduling to fill in the initial replica number allocation information. The initial replica number allocation information may also include replica number status information, which may indicate whether initialization / destruction can be started and whether it is completed. The initial value of the replica number status information is false.

[0070] Step S1022: Fill the allocation correspondence information and the target sequence number into the initial copy number allocation information to obtain the target copy number allocation information.

[0071] In the embodiment of the present disclosure, the allocation correspondence information and the target sequence number may be filled into the initial replica number allocation information corresponding to each subcluster to obtain the target replica number allocation information corresponding to each subcluster.

[0072] Optionally, in the embodiment of the present disclosure, the target resource delivery policy may include a replica configuration weight. The operation of the master cluster controller creating second state sets corresponding to the plurality of subclusters and second resource allocation parameters corresponding to each subcluster according to the target resource delivery policy may specifically include:

[0073] The main cluster controller creates the second state set and the second resource allocation parameter corresponding to each sub-cluster according to the replica configuration weight.

[0074] In the disclosed embodiment, the replica configuration weights may determine the number of different types of replicas that can be configured in each subcluster based on the attributes of the subcluster and the attributes of the replicas. The primary cluster controller may create a corresponding second state set and second resource allocation parameters for each subcluster based on the replica configuration weights. Specifically, after the primary cluster detects that the initial replica number allocation information is scheduled and populated, it may begin creating the corresponding second state set and second resource allocation parameters for each subcluster based on the replica configuration weights.

[0075] Optionally, in the embodiment of the present disclosure, the sub-cluster controller performs a tuning operation on the replicas allocated to the sub-cluster according to the target replica number allocation information, the second state set, and the corresponding second resource allocation parameter, such as Figure 3 As shown, it may specifically include:

[0076] Step S1041: The sub-cluster controller determines a target sequence number corresponding to each sub-cluster according to the target replica number allocation information.

[0077] In the embodiment of the present disclosure, for multiple subclusters, each subcluster controller may determine the target sequence number corresponding to the subcluster according to the sequence number indicated in the target replica number allocation information.

[0078] Step S1042: Each sub-cluster controller tunes the replicas allocated to the sub-cluster in accordance with the second state set and the corresponding second resource allocation parameters in the order indicated by the target sequence numbers.

[0079] In the disclosed embodiment, each subcluster controller can sequentially tune the replicas allocated to the subcluster based on the second state set and the corresponding second resource allocation parameters, directly in the order indicated by the target sequence number. Compared to existing subcluster configurations that must start at 0, in the disclosed embodiment, subclusters can perform subcluster tuning based on the corresponding target sequence number, which can be an arbitrarily specified sequence number.

[0080] Optionally, in the embodiment of the present disclosure, the operation of each sub-cluster controller sequentially tuning the replicas allocated to the sub-cluster according to the second state set and the corresponding second resource allocation parameter may specifically include:

[0081] Each sub-cluster controller sequentially adjusts the type and number of replicas corresponding to the second state set on the sub-cluster according to the second resource allocation parameter.

[0082] In an embodiment of the present disclosure, the sub-cluster controller on each sub-cluster may tune the type of replicas and the number of replicas corresponding to the second state set on the sub-cluster in turn according to the type of replicas and the number of replicas indicated by the second resource allocation parameter, so that the type of replicas and the number of replicas corresponding to the second state set are the same as the type of replicas and the number of replicas indicated in the first resource allocation parameter.

[0083] Optionally, the cluster management method in the embodiment of the present disclosure may further include:

[0084] When tuning of the second state set is completed on the sub-cluster, the state in the second state set is updated to a completed state.

[0085] In the embodiment of the present disclosure, when the tuning of the second state set is completed on the sub-cluster, the state in the second state set is updated to the completed state. For example, when the tuning of the second state set (statefulset) on the sub-cluster (workload cluster) is completed, the state in the second state set is updated to the ready state to true. It should be noted that, in the embodiment of the present disclosure, the states in the second state set include the ready state and the paused state. When the second state set is in the ready state, it can indicate that the tuning of the second state set is completed. When the second state set is in the paused state, it can indicate that the tuning of the second state set is directly skipped.

[0086] For example, the main cluster controller can monitor that the second state set (statefulset) of the first subcluster is in the ready state, and then start creating the second state set (statefulset) of the second subcluster. The second state set (statefulset) can include parameters such as the target sequence number, pause state, and number of replicas. The status of the second state set (statefulset) of each subcluster is updated in sequence according to the target sequence number until the second state sets (statefulset) of all subclusters are in the ready state.

[0087] Optionally, in one implementation, the cluster management method in the embodiment of the present disclosure may further include:

[0088] The main cluster controller monitors the second state sets corresponding to the multiple sub-clusters, and synchronizes the second state sets to the first resource allocation parameters corresponding to the first state set.

[0089] For example, the controller of the main cluster (host cluster) can monitor the resource status information of the sub-cluster (Workload cluster) in the form of monitoring (watch), and synchronize the resource status information of the sub-cluster (Workload cluster) to the first resource allocation parameter (statefulset crd) and the status of the first state set (statefulset) of the main cluster (host cluster).

[0090] like Figure 4 As shown, the system 40 may include:

[0091] The main cluster controller 401, in response to a first state set and a target resource delivery policy created by a user in the main cluster, creates first resource allocation parameters and initial replica number allocation information corresponding to the first state set; when it is detected that no cluster information is allocated to the initial replica number allocation information, the main cluster controller 401 schedules and populates the initial replica number allocation information according to the target resource delivery policy and the first resource allocation parameters to obtain target replica number allocation information; and creates second state sets corresponding to multiple subclusters and second resource allocation parameters corresponding to each subcluster according to the target resource delivery policy.

[0092] The subcluster controller 402 traverses each subcluster and adjusts the replicas allocated to the subcluster according to the target replica number allocation information, the second state set, and the corresponding second resource allocation parameters until each subcluster completes replica allocation according to the target resource delivery policy.

[0093] In summary, the cluster management system provided by the embodiment of the present disclosure can respond to the first state set and the target resource delivery policy created by the user in the main cluster. The main cluster controller creates the first resource allocation parameter and initial replica number allocation information corresponding to the first state set. When it is detected that the initial replica number allocation information has not allocated cluster information, the main cluster controller schedules and fills the initial replica number allocation information according to the target resource delivery policy and the first resource allocation parameter to obtain the target replica number allocation information. The main cluster controller creates a second state set corresponding to multiple subclusters and a second resource allocation parameter corresponding to each subcluster according to the target resource delivery policy, traverses each subcluster, and the subcluster controller tunes the replicas allocated to the subcluster according to the target replica number allocation information, the second state set and the corresponding second resource allocation parameter until each subcluster completes the replica allocation according to the target resource delivery policy. In this way, users only need to create a resource delivery policy on the main cluster. Accordingly, the main cluster can automatically determine the number of replicas corresponding to multiple subclusters based on the resource delivery policy, and control the subclusters to complete the tuning of the allocated replicas according to the resource delivery policy. In this way, existing clusters can be managed across clusters without incurring additional costs, thereby improving the flexibility of cross-cluster management.

[0094] Optionally, the first resource allocation parameter includes replica number information, replica allocation information, and a target sequence number. The master cluster controller 401 is further configured to:

[0095] The main cluster controller determines allocation correspondence information between the multiple subclusters and the multiple replicas according to the target resource delivery policy, the replica number information, and the replica allocation information;

[0096] Fill the allocation correspondence information and the target sequence number into the initial copy number allocation information to obtain the target copy number allocation information.

[0097] Optionally, the target resource delivery strategy includes a replica configuration weight, and the master cluster controller 401 is further configured to:

[0098] The main cluster controller creates the second state set and the second resource allocation parameter corresponding to each sub-cluster according to the replica configuration weight.

[0099] Optionally, the sub-cluster controller 402 is further configured to:

[0100] The sub-cluster controller determines the target sequence number corresponding to each sub-cluster according to the target replica number allocation information;

[0101] In the order indicated by the target sequence numbers, each sub-cluster controller sequentially tunes the replicas allocated to the sub-cluster according to the second state set and the corresponding second resource allocation parameters.

[0102] Optionally, the sub-cluster controller 402 is further configured to:

[0103] Each sub-cluster controller sequentially adjusts the type and number of replicas corresponding to the second state set on the sub-cluster according to the second resource allocation parameter.

[0104] Optionally, the system 40 further includes:

[0105] The sub-cluster controller updates the state in the second state set to a completed state when tuning of the second state set on the sub-cluster is completed.

[0106] Optionally, the system 40 further includes:

[0107] The main cluster controller monitors the second state sets corresponding to the multiple sub-clusters, and synchronizes the second state sets to the first resource allocation parameters corresponding to the first state set.

[0108] The specific details of each module in the above cluster management system have been described in detail in the corresponding cluster management method, so they will not be repeated here.

[0109] It should be noted that although several modules or units of the device for action execution are mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be concretized in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be concretized.

[0110] Furthermore, although the steps of the method of the present disclosure are described in a particular order in the accompanying drawings, this does not require or imply that the steps must be performed in this particular order, or that all steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.

[0111] In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.

[0112] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods, or program products. Therefore, various aspects of the present disclosure may be implemented in the following forms: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, which may be collectively referred to herein as "circuits," "modules," or "systems."

[0113] Refer to the following Figure 5 hereinafter, an electronic device 500 according to this embodiment of the present disclosure is described. Figure 5 The electronic device 500 shown is merely an example and should not limit the functions and scope of use of the embodiments of the present disclosure.

[0114] like Figure 5 As shown, electronic device 500 is implemented as a general-purpose computing device. Components of electronic device 500 may include, but are not limited to, the aforementioned at least one processing unit 510, the aforementioned at least one storage unit 520, a bus 530 connecting various system components (including storage unit 520 and processing unit 510), and a display unit 540.

[0115] The storage unit stores program codes, which can be executed by the processing unit 510, so that the processing unit 510 performs the steps according to various exemplary embodiments of the present disclosure described in the above “Exemplary Method” section of this specification. For example, the processing unit 510 can perform the following steps: Figure 1In step S101, in response to a first state set and a target resource delivery policy created by a user in a main cluster, the main cluster controller creates first resource allocation parameters and initial replica number allocation information corresponding to the first state set; in step S102, when it is detected that no cluster information is allocated to the initial replica number allocation information, the main cluster controller schedules and fills the initial replica number allocation information according to the target resource delivery policy and the first resource allocation parameter to obtain the target replica number allocation information; in step S103, the main cluster controller creates second state sets corresponding to multiple subclusters and second resource allocation parameters corresponding to each subcluster according to the target resource delivery policy; in step S104, each subcluster is traversed, and the subcluster controller tunes the replicas allocated to the subcluster according to the target replica number allocation information, the second state set, and the corresponding second resource allocation parameter, until each subcluster completes replica allocation according to the target resource delivery policy.

[0116] The storage unit 520 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 5201 and / or a cache memory unit 5202 , and may further include a read-only memory unit (ROM) 5203 .

[0117] The storage unit 520 may also include a program / utility 5204 having a set (at least one) of program modules 5205, such program modules 5205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0118] Bus 530 may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0119] The electronic device 500 can also communicate with one or more external devices 700 (e.g., a keyboard, a pointing device, a Bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 500, and / or any device that enables the electronic device 500 to communicate with one or more other computing devices (e.g., a router, a modem, etc.). Such communication can occur via an input / output (I / O) interface 550. Furthermore, the electronic device 500 can communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network such as the Internet) via a network adapter 560. As shown, the network adapter 560 communicates with other modules of the electronic device 500 via a bus 530. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the electronic device 500, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0120] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes a number of instructions to enable a computing device (which can be a personal computer, a server, a terminal system, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.

[0121] In exemplary embodiments of the present disclosure, a computer-readable storage medium is also provided, on which is stored a program product capable of implementing the aforementioned methods of this specification. In some possible implementations, various aspects of the present disclosure may also be implemented in the form of a program product comprising program code. When the program product is executed on a terminal device, the program code is configured to cause the terminal device to execute the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of the present disclosure.

[0122] According to an embodiment of the present disclosure, a program product for implementing the above-mentioned method can be implemented in a portable compact disc read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device.

[0123] The program product may be implemented in any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, system or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable 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 thereof.

[0124] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium that can transmit, propagate, or transfer a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0125] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0126] The program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, and the like, as well as conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a stand-alone software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0127] Furthermore, the figures above are merely illustrative of the processes included in the methods according to exemplary embodiments of the present disclosure and are not intended to be limiting. It is readily understood that the processes illustrated in the figures above do not indicate or limit the temporal order of these processes. Furthermore, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.

[0128] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow from the general principles of the present disclosure and include common knowledge or customary techniques in the art not invented herein. The specification and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the claims.

Claims

1. A cluster management method, characterized in that: The method comprises: In response to a first state set and a target resource delivery policy created by a user in the primary cluster, the primary cluster controller creates first resource allocation parameters and initial replica number allocation information corresponding to the first state set; the first resource allocation parameters include replica number information, replica allocation information, and a target sequence number; When it is detected that the initial replica number allocation information does not allocate cluster information, the main cluster controller determines allocation correspondence information between multiple subclusters and multiple replicas based on the target resource delivery policy, the replica number information, and the replica allocation information; and fills the allocation correspondence information and the target sequence number into the initial replica number allocation information to obtain target replica number allocation information. The main cluster controller creates, according to the target resource delivery policy, second state sets corresponding to the multiple subclusters and second resource allocation parameters corresponding to each subcluster; The subcluster controller determines the target sequence number corresponding to each subcluster based on the target replica number allocation information. In the order indicated by the target sequence number, each subcluster controller sequentially adjusts the replica type and replica quantity corresponding to the second state set on the subcluster based on the second resource allocation parameter until each subcluster completes replica allocation according to the target resource delivery strategy.

2. The method according to claim 1, characterized in that The target resource delivery strategy includes a replica configuration weight. The main cluster controller creates a second state set corresponding to each of the plurality of subclusters and a second resource allocation parameter corresponding to each subcluster according to the target resource delivery strategy, including: The main cluster controller creates the second state set and the second resource allocation parameter corresponding to each sub-cluster according to the replica configuration weight.

3. The method according to claim 1, characterized in that The method further comprises: When tuning of the second state set is completed on the sub-cluster, the state in the second state set is updated to a completed state.

4. The method according to any one of claims 1 to 3, characterized in that The method further comprises: The main cluster controller monitors the second state sets corresponding to the multiple sub-clusters, and synchronizes the second state sets to the first resource allocation parameters corresponding to the first state set.

5. A cluster management system, characterized in that: The system comprises: The main cluster controller, in response to a first state set and a target resource delivery policy created by a user in the main cluster, creates first resource allocation parameters and initial replica number allocation information corresponding to the first state set; the first resource allocation parameters include replica number information, replica allocation information, and a target sequence number; when it is detected that the initial replica number allocation information does not allocate cluster information, the main cluster controller determines allocation correspondence information between multiple subclusters and multiple replicas according to the target resource delivery policy, the replica number information, and the replica allocation information; fills the allocation correspondence information and the target sequence number into the initial replica number allocation information to obtain the target replica number allocation information; and creates second state sets corresponding to the multiple subclusters and second resource allocation parameters corresponding to each subcluster according to the target resource delivery policy; The subcluster controller determines the target sequence number corresponding to each subcluster based on the target replica number allocation information. In the order indicated by the target sequence number, each subcluster controller sequentially adjusts the replica type and replica quantity corresponding to the second state set on the subcluster based on the second resource allocation parameter until each subcluster completes replica allocation according to the target resource delivery policy.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the cluster management method according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Multi-cluster exception processing method and device

    CN112463535A

  • Assembling detailed user replica placement views in distributed computing environment

    US8589560B1