Capacity elastic scaling method and related device

By matching the measurement information and scaling rules of logical storage units in Kubernetes and adjusting storage capacity, the problem of waste of storage resources caused by changes in business demand is solved, and the utilization rate of storage resources and business stability are improved.

CN119225898APending Publication Date: 2024-12-31TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202310791314.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-29
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

In Kubernetes, the business's demand for storage resources varies due to peak or trough periods, resulting in a fixed persistent volume (PV) capacity that leads to low storage resource utilization and wastes storage resources.

Method used

By obtaining the measurement information of each logical storage unit and matching the associated scaling rule set, the storage capacity is adjusted according to the matching target capacity, and the capacity of the logical storage unit is elastically scaling.

Benefits of technology

It improves the utilization rate of storage resources, reduces the idleness and waste of storage resources, meets the storage resource needs of the business in different periods, and ensures business stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119225898A_ABST
    Figure CN119225898A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and provides a capacity elastic scaling method and a related device, which are used for storing the resource utilization rate, and the method comprises the following steps that: a main node respectively matches the measurement information of each logic storage unit in a cluster with a scaling rule set associated with each storage logic unit, and when the matching succeeds, the scaling rule set of each storage logic unit is matched with the measurement information of each logic storage unit; and adjusting the storage capacity of the corresponding logic storage unit according to the target capacity contained in the matched target scaling rule. According to the measurement data of the logic storage unit, the capacity of the logic storage unit is elastically expanded and contracted.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] Kubernetes is an open source platform that can realize the functions of automatic deployment, automatic expansion and contraction, and maintenance of container clusters. In Kubernetes, cluster storage resources are mainly managed in the form of persistent volumes (PV).

[0003] In the related art, the PV capacity of each business is fixed. However, some businesses have peak or trough periods in their operation. Therefore, the business's demand for storage resources is constantly changing. During peak periods, the business's resource utilization rate is higher, while during trough periods, the business's resource utilization rate is lower. Obviously, using a fixed PV capacity will lead to lower storage resource utilization and waste of storage resources. Summary of the invention

[0004] The embodiments of the present application provide a capacity elastic scaling method and related devices to rationally utilize storage resources and improve the utilization rate of storage resources.

[0005] In a first aspect, an embodiment of the present application provides a capacity elastic scaling method, including:

[0006] If measurement information of each logical storage unit in the cluster is received, a set of scaling rules associated with each storage logical unit is obtained; wherein each logical storage unit is used to provide data storage services for a slave node in the cluster, each measurement information is used to evaluate the storage state of the corresponding logical storage unit, and each scaling rule includes a state description information of a reference storage state and a target capacity;

[0007] For each scaling rule set obtained, perform the following operations:

[0008] When a target scaling rule that meets a preset condition exists in a scaling rule set, storage capacity of a logical storage unit associated with the scaling rule set is adjusted based on a target capacity included in the target scaling rule; wherein the preset condition indicates that: state description information included in a scaling rule successfully matches measurement information corresponding to the associated logical storage unit.

[0009] In a second aspect, an embodiment of the present application provides a capacity elastic expansion device, including:

[0010] A data acquisition unit, configured to acquire a set of scaling rules associated with each logical storage unit in the cluster if measurement information of each logical storage unit in the cluster is received; wherein each logical storage unit is used to provide data storage services for a slave node in the cluster, each measurement information is used to evaluate the storage state of the corresponding logical storage unit, and each scaling rule includes a state description information of a reference storage state and a target capacity;

[0011] The data detection unit is used to perform the following operations on each obtained scaling rule set:

[0012] When a target scaling rule that meets a preset condition exists in a scaling rule set, storage capacity of a logical storage unit associated with the scaling rule set is adjusted based on a target capacity included in the target scaling rule; wherein the preset condition indicates that: state description information included in a scaling rule successfully matches measurement information corresponding to the associated logical storage unit.

[0013] As a possible implementation manner, each piece of measurement information includes a measurement value of at least one evaluation indicator, and each piece of status description information includes a numerical range of the at least one evaluation indicator;

[0014] When it is determined that the state description information included in a scaling rule successfully matches the measurement information corresponding to the associated logical storage unit, the data detection unit is specifically used to:

[0015] When at least one measurement value in the measurement information corresponding to the associated logical storage unit conforms to the corresponding numerical range in the state description information, the state description information included in the scaling rule successfully matches the measurement information corresponding to the associated logical storage unit.

[0016] As a possible implementation, the at least one evaluation index includes: capacity, usage rate, write speed and usage capacity growth rate of the corresponding logical storage unit;

[0017] When it is determined that at least one measurement value in the measurement information corresponding to the associated logical storage unit meets the corresponding numerical range in the state description information, the data detection unit is specifically used to:

[0018] The capacity of the corresponding logical storage unit is within a preset capacity range;

[0019] The usage rate of the corresponding logical storage unit is within a preset usage range;

[0020] The block device write speed of the corresponding logical storage unit is within the preset write speed range;

[0021] The growth rate of the usage capacity of the corresponding logical storage unit is within a preset growth rate range.

[0022] As a possible implementation manner, when adjusting the storage capacity of the logical storage unit associated with the one scaling rule set based on the target capacity included in the target scaling rule, the data detection unit is specifically configured to:

[0023] Obtaining a preset storage capacity range of a logical storage unit associated with the one scaling rule set;

[0024] When the target capacity included in the target scaling rule is within the preset storage capacity range, the storage capacity of the logical storage unit associated with the one scaling rule set is adjusted to the target capacity.

[0025] As a possible implementation, at least one service component is running in each slave node of the cluster, and each service component is provided with data storage services by at least one storage logic unit; then the data acquisition unit is further used for:

[0026] When the at least one business component is deployed in the cluster, the scaling rule set associated with the corresponding at least one storage logic unit is registered in the master node;

[0027] When the at least one service component is uninstalled from the cluster, the scaling rule set associated with the corresponding at least one storage logic unit is deleted from the master node respectively.

[0028] As a possible implementation manner, when adjusting the storage capacity of the logical storage unit associated with the one scaling rule set based on the target capacity included in the target scaling rule, the data detection unit is specifically configured to:

[0029] The target capacity is sent to the slave node where the logical storage unit associated with the one scaling rule set is located through the resource configuration interface of the cluster, so that the slave node adjusts the storage capacity of the associated logical storage unit based on the target capacity.

[0030] As a possible implementation manner, the measurement information of each logical storage unit in the cluster is periodically reported by each slave node in the cluster;

[0031] After receiving the measurement information of each logical storage unit in the cluster, the data acquisition unit is further used to:

[0032] Storing each received measurement information in a designated storage location in the master node;

[0033] The measurement information is periodically read and deleted from the designated storage location.

[0034] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the above method.

[0035] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which includes a computer program. When the computer program is run on an electronic device, the computer program is used to enable the electronic device to execute the steps of the above method.

[0036] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a computer program, and the computer program is stored in a computer-readable storage medium. The processor of an electronic device reads and executes the computer program from the computer-readable storage medium, so that the electronic device performs the steps of the above method.

[0037] In the embodiment of the present application, the master node matches the measurement information of each logical storage unit in the cluster with the scaling rule set associated with each storage logical unit, and when the match is successful, adjusts the storage capacity of the corresponding logical storage unit according to the target capacity included in the matched target scaling rule.

[0038] In this way, by matching the measurement data of each logical storage unit (such as PV) with the associated scaling rules, the capacity elastic scaling control of the logical storage unit is realized, so as to better utilize the storage resources of the cluster, reduce the idleness and waste of storage resources, and improve the utilization rate of storage resources. In addition, compared with the scaling control for nodes, the elastic scaling control for the capacity of the logical storage unit has a higher granularity and a higher utilization rate of storage resources. In particular, when the business needs to write a large amount of data to the storage resources, or the business is in an idle or low period, the resource occupancy of the cluster PV can be modified to meet the storage resource needs of the cluster business at different times, ensure the stability of the business, improve the utilization rate of storage resources, and reduce the waste of storage resources.

[0039] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or be understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0041] Figure 1 A schematic diagram of an application scenario provided in an embodiment of the present application;

[0042] Figure 2 A schematic diagram of a flow chart of a capacity elastic scaling method provided in an embodiment of the present application;

[0043] Figure 3 A logical diagram of a measurement data reporting process provided in an embodiment of the present application;

[0044] Figure 4 A logical schematic diagram of another measurement data reporting process provided in an embodiment of the present application;

[0045] Figure 5 A schematic diagram of registering a scaling rule set provided in an embodiment of the present application;

[0046] Figure 6 A schematic diagram of deleting a scaling rule set provided in an embodiment of the present application;

[0047] Figure 7 A logical diagram of a process of matching a scaling rule with measurement information provided in an embodiment of the present application;

[0048] Figure 8 A schematic diagram of a cluster provided in an embodiment of the present application;

[0049] Fig. 9 A schematic diagram of the configuration of an elastic scaling rule data table and a storage capacity planning data table provided in an embodiment of the present application;

[0050] Fig.10 A logical diagram of a capacity elastic scaling process provided in an embodiment of the present application;

[0051] Fig.11 A schematic diagram of the structure of a capacity elastic expansion and contraction device provided in an embodiment of the present application;

[0052] Fig.12 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0053] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the technical solution of the present application, rather than all of the embodiments. Based on the embodiments recorded in the application documents, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the technical solution of the present application.

[0054] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the invention described herein can be implemented in sequences other than those illustrated or described herein.

[0055] The relevant data collection and processing in this application should be strictly in accordance with the requirements of relevant national laws and regulations when applied in examples, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope of authorization of laws and regulations and the personal information subject.

[0056] Cloud technology refers to a hosting technology that unifies hardware, software, network and other resources within a wide area network or local area network to achieve data computing, storage, processing and sharing.

[0057] Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model. It can form a resource pool, which can be used on demand and is flexible and convenient. Cloud computing technology will become an important support. The backend services of the technical network system require a large amount of computing and storage resources, such as video websites, picture websites and more portal websites. With the rapid development and application of the Internet industry, in the future, each item may have its own identification mark, which needs to be transmitted to the backend system for logical processing. Data of different levels will be processed separately. All kinds of industry data need strong system backing support, which can only be achieved through cloud computing.

[0058] Cloud computing is a computing model that distributes computing tasks on a resource pool composed of a large number of computers, allowing various application systems to obtain computing power, storage space and information services as needed. The network that provides resources is called a "cloud". From the user's perspective, the resources in the "cloud" are infinitely scalable and can be obtained at any time, used on demand, expanded at any time, and paid for by use.

[0059] As a cloud computing basic capability provider, a cloud computing resource pool (referred to as a cloud platform, generally referred to as an Infrastructure as a Service (IaaS) platform) will be established, and various types of virtual resources will be deployed in the resource pool for external customers to choose to use. The cloud computing resource pool mainly includes: computing devices (virtualized machines, including operating systems), storage devices, and network devices.

[0060] According to the logical functional division, the Platform as a Service (PaaS) layer can be deployed on the IaaS layer, and the Software as a Service (SaaS) layer can be deployed on the PaaS layer, or SaaS can be deployed directly on IaaS. PaaS is a platform for software operation, such as databases, web containers, etc. SaaS is a variety of business software, such as web portals, SMS mass senders, etc. Generally speaking, SaaS and PaaS are upper layers relative to IaaS. The capacity elastic scaling method provided in this application can be implemented based on cloud technology.

[0061] Storage resources: resources stored in block devices such as disks in a cluster.

[0062] Persistent Volume (PV): PV is an abstraction layer in Kubernetes that abstracts the underlying storage devices and provides persistent storage for applications.

[0063] In the related technology, in Kubernetes, the PV capacity of each business is fixed. However, some businesses have peak or trough periods in their operation. Therefore, the business's demand for storage resources is constantly changing. During peak periods, the business's resource utilization rate is high, while during trough periods, the business's resource utilization rate is low. Obviously, using a fixed PV capacity will lead to low storage resource utilization and waste of storage resources.

[0064] In the embodiment of the present application, the master node matches the measurement information of each logical storage unit in the cluster with the scaling rule set associated with each storage logical unit, and when the match is successful, adjusts the storage capacity of the corresponding logical storage unit according to the target capacity included in the matched target scaling rule.

[0065] In this way, by matching the measurement data of each logical storage unit (such as PV) with the associated scaling rules, elastic scaling control of the capacity of the logical storage unit can be achieved, thereby better utilizing the storage resources of the cluster, reducing the idleness and waste of storage resources, and improving the utilization of storage resources. In addition, compared with the scaling control of nodes, the elastic scaling control of the capacity of the logical storage unit has a higher granularity and a higher utilization rate of storage resources.

[0066] See also Figure 1 As shown, it is a schematic diagram of an application scenario provided in an embodiment of the present application. The application scenario includes: a master node and at least one slave node. The master node and the slave node can communicate through a network. The number of slave nodes can be m, and the value of m is a positive integer.

[0067] Among them, one or more logical storage units are deployed in each slave node, and the logical storage unit is used to provide data storage services for the slave node. The logical storage unit can be, but is not limited to, PV. Exemplarily, PV1 and PV2 provide data storage services for slave node 1, and PVn provides data storage services for slave node m, and the value of n is a positive integer.

[0068] In some embodiments, the master node and at least one slave node are nodes in a Kubernetes cluster.

[0069] In some implementations, each slave node is used to periodically report measurement information of each corresponding PV to the master node, wherein each measurement information is used to evaluate the storage status of the corresponding PV.

[0070] The master node is used to receive the measurement information of each PV reported by each slave node, and obtain the scaling rule set associated with each PV. Then, for each scaling rule set, when there is a target scaling rule that meets the preset conditions in a scaling rule set, the storage capacity of the logical storage unit associated with the scaling rule set is adjusted based on the target capacity included in the target scaling rule.

[0071] In the embodiments of the present application, both the master node and the slave node are servers. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0072] In some embodiments, the application scenario also includes a terminal. The terminal is used to receive configuration information (scaling rule set, preset storage capacity range, etc.) input by the object and transmit the configuration information to the master node. The terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited to this. The terminal and the server can be directly or indirectly connected via wired or wireless communication, and this application does not limit this.

[0073] See also Figure 2 As shown, it is a flow chart of a capacity elastic scaling method provided in an embodiment of the present application. The method is applied to the master node in the cluster. The specific process is as follows:

[0074] S201. If the master node receives measurement information of each logical storage unit in the cluster, it obtains a set of scaling rules associated with each storage logical unit; wherein each logical storage unit is used to provide data storage services for a slave node in the cluster, each measurement information is used to evaluate the storage state of the corresponding logical storage unit, and each scaling rule includes a state description information of a reference storage state and a target capacity.

[0075] In the embodiment of the present application, the logical storage unit refers to a logical unit that provides data storage services for a computing node. In a Kubernetes cluster, the logical storage unit refers to a PV. Hereinafter, only the Kubernetes cluster will be used as an example for explanation.

[0076] Each scaling rule set can contain one or more scaling rules. In this article, scaling rules can also be called elastic scaling rules, and scaling rule sets can be called elastic scaling rule sets. Each scaling rule consists of two parts: state description information and target capacity. The state description information is used to describe a reference storage state, and the target capacity is used to indicate the storage capacity of the PV under the reference storage state.

[0077] In the embodiment of the present application, the association relationship between the scaling rule set and the PV can be set in the following ways, but is not limited to:

[0078] As a possible way, the scaling rule set is set for the business component, and the scaling rule set associated with a business component can be regarded as the scaling rule set associated with each PV corresponding to the business component. Exemplarily, each measurement information may include a component identifier in addition to the PV identifier of the measured PV, and each scaling rule includes a component identifier. In this way, after obtaining the measurement information of a PV, the master node determines the scaling rule set associated with the PV based on the component identifier contained in the obtained measurement information and the component identifiers contained in each preset scaling rule. Among them, the PV identifier can be represented by but not limited to a serial number (ID), and the component identifier can be represented by but not limited to a component name or ID. There is no limitation on this and it will not be repeated here.

[0079] As another possible manner, the scaling rule set may also be set for PV, each scaling rule includes the PV identifier of the associated PV, and each measurement information includes the PV identifier of the measured PV. In this way, after obtaining measurement information of a PV, the master node determines the scaling rule set associated with the PV according to the PV identifier included in the obtained measurement information and the PV identifiers included in each preset scaling rule.

[0080] In some implementations, the status description information includes the numerical range of one or more evaluation indicators. Exemplarily, the evaluation indicators include, but are not limited to, any one or more of PV capacity, PV utilization rate, PV writing speed, and PV usage capacity growth rate.

[0081] The PV capacity indicates the upper limit of the storage capacity of the PV.

[0082] The PV usage rate indicates the usage rate of the storage space of the PV. The PV usage rate can be determined based on the storage capacity upper limit and the actual storage capacity of the PV, for example, usage rate = actual storage capacity / storage capacity upper limit.

[0083] PV write speed means: the data write speed of the block device corresponding to the PV within the first set time. The set time can be set according to business needs to achieve different granularity data evaluation, such as millisecond, second, or minute data write speed evaluation. For example, the PV write speed can be 1MB / s (megabytes per second), which means that 1MB of data is written per second in the block device corresponding to the PV.

[0084] The growth rate of PV usage capacity indicates: the growth rate of the capacity of the block device corresponding to the PV within the second set time. The second set time can be the same or different in granularity from the first set time. For example, the growth rate of PV usage capacity can be 80MB / minutes (megabytes per minute), which means that 80MB of data is added to the block device corresponding to the PV every minute.

[0085] Refer to Table 1, which is a scaling rule table provided in an embodiment of the present application. Table 1 contains scaling rules set for each component.

[0086] Table 1 Scaling rules table

[0087]

[0088] In scaling rule 1 (the first scaling rule in Table 1), the status description information includes: PV capacity is 20 GB, PV usage rate is greater than or equal to 80%, PV write speed is greater than or equal to 1 MB / s, PV usage capacity growth rate is greater than or equal to 80 MB / minutes, and the target capacity is 50 GB (that is, PV expansion is 50 GB).

[0089] In scaling rule 2 (the second scaling rule in Table 1), the status description information includes: PV capacity is 50 GB, PV usage rate is greater than or equal to 80%, PV write speed is greater than 1 MB / s, PV usage capacity growth rate is greater than or equal to 100 MB / minutes, and the target capacity is 100 GB (that is, PV expansion is 100 GB).

[0090] In scaling rule 3 (the third scaling rule in Table 1), the status description information includes: PV capacity is 50 GB, PV usage rate is less than or equal to 10%, PV write speed is less than or equal to 80 KB / s, PV usage capacity growth rate is less than or equal to 1 MB / minutes, and the target capacity is 20 GB (that is, PV is reduced to 20 GB).

[0091] In scaling rule 4 (the third scaling rule in Table 1), the status description information includes: the PV capacity is 100 GB, the PV usage rate is less than or equal to 20%, the PV write speed is less than 100 KB / s, the PV usage capacity growth rate is less than 30 MB / minutes, and the target capacity is 50 GB (that is, the PV is reduced to 50 GB).

[0092] In some implementations, one or more services are running in the cluster, each service includes one or more service components, and each service component is used to provide part or all of the functions of the corresponding service. Each service component is provided with data storage services by at least one storage logic unit.

[0093] For example, as shown in Table 1, the services running in the cluster include but are not limited to: Cloud Virtual Machine (CVM), Container Service (Tencent Cloud-native Suite, TCS), Object Storage (Cloud Storage Private, CSP), etc. Assume that the service components of CVM include: ocloud-cvm-api, etc., the service components of CSP include: ocloud-csp-auth, etc., and the service components of TCS include: ocloud-tcs-api, etc.

[0094] In the embodiment of the present application, when at least one business component is deployed in the cluster, the master node registers the scaling rule set associated with the corresponding at least one storage logic unit in the master node.

[0095] Specifically, as a possible scenario, if the scaling rule set is set for a business component, then when a business component is deployed to the cluster, the master node can register the scaling rule set corresponding to the business component locally, and use the scaling rule set corresponding to the business component as the scaling rule set associated with at least one PV corresponding to the business component.

[0096] Take the business component ocloud-cvm-api as an example, see Figure 5 As shown, the PVs corresponding to the business component ocloud-cvm-api include: PV1 and PV2 in node 1. The scaling rule set associated with the ocloud-cvm-api component includes the above-mentioned scaling rules 1 to 4. When the business component ocloud-cvm-api is deployed to the cluster, the master node registers the scaling rule set corresponding to the business component ocloud-cvm-api to the master node, and uses the scaling rule set corresponding to the business component ocloud-cvm-api as the scaling rule set associated with PV1 and PV2 respectively.

[0097] As another possible situation, if the scaling rule set is set for PV, when a business component is deployed to the cluster, the master node can directly register the scaling rule set associated with each PV corresponding to the business component locally.

[0098] Still taking the business component ocloud-cvm-api as an example, the PVs corresponding to the business component ocloud-cvm-api include: PV1 and PV2 in node 1, the scaling rule set set for PV1 (that is, the scaling rule set associated with PV1) includes the above scaling rule 1 and scaling rule 2, and the scaling rule set set for PV2 (that is, the scaling rule set associated with PV2) includes the above scaling rule 3 and scaling rule 4. When the business component ocloud-cvm-api is deployed to the cluster, the master node registers the scaling rule set associated with PV1 and the scaling rule set associated with PV2 locally.

[0099] In some implementations, when at least one service component is uninstalled from the cluster, the master node deletes the scaling rule set associated with the corresponding at least one storage logic unit.

[0100] Specifically, as a possible situation, if the scaling rule set is set for a business component, then when a business component deployment is uninstalled from the cluster, the master node may delete the scaling rule set corresponding to the business component from the local node.

[0101] Still taking the business component ocloud-cvm-api as an example, see Figure 6 As shown, the PVs corresponding to the business component ocloud-cvm-api include: PV1 and PV2 in node 1. The scaling rule set associated with the ocloud-cvm-api component includes the above-mentioned scaling rules 1) to 4). When the business component ocloud-cvm-api is uninstalled from the cluster, the scaling rule set corresponding to the business component ocloud-cvm-api will be deleted from the master node, that is, the scaling rule sets associated with PV1 and PV2 will be deleted.

[0102] As another possible situation, if the scaling rule set is set for PV, then when a business component deployment is uninstalled from the cluster, the master node can delete the scaling rule set associated with each PV corresponding to the business component from the local.

[0103] Still taking the business component ocloud-cvm-api as an example, the PVs corresponding to the business component ocloud-cvm-api include: PV1 and PV2 in node 1. When the business component ocloud-cvm-api is uninstalled from the cluster, the master node deletes the scaling rule set associated with PV1 and the scaling rule set associated with PV2.

[0104] It should be noted that in the embodiment of the present application, the scaling rule sets of each PV may be the same or different, and this is not limited.

[0105] In the above implementation, the scaling rules are written when the business components are deployed. When the business components are uninstalled, the scaling rules are deleted accordingly, thereby realizing dynamic configuration of the scaling rules and improving data configuration efficiency.

[0106] Next, the process of collecting and reporting measurement information is described.

[0107] In some implementations, a slave node may be provided with data storage services by one or more PVs. Each slave node may periodically collect measurement information of each PV in the current node according to the data collection frequency (T1), and report the collected measurement information of each PV to the master node. T1 may be set according to actual business needs, and is not limited to this and will not be described in detail here.

[0108] For example, see Figure 3 As shown, node 1 is provided with data storage services by PV1 to PVi. Node 1 periodically collects measurement information of PV1 to PVi respectively, and reports the collected measurement information of PV1 to PVi respectively to the master node.

[0109] The collected measurement information includes the measurement value of at least one evaluation indicator. That is, the slave node needs to collect the measurement value of at least one evaluation indicator for each PV. The evaluation indicators to be collected for each PV may be the same or different.

[0110] When collecting data, as a possible implementation method, a scheduled task can be set for each evaluation indicator in the slave node, and the measurement value of each PV under the evaluation indicator can be collected through the scheduled task.

[0111] Taking the measurement of four evaluation indicators as an example, the four evaluation indicators include: current PV capacity, current PV utilization rate, PV write speed and PV usage capacity growth rate. Four scheduled tasks can be set in node 1. The four scheduled tasks are used to collect the current PV capacity, current PV utilization rate, PV write speed and PV usage capacity growth rate of PV1 to PVi respectively.

[0112] As another possible implementation manner, a scheduled task may be set for one or more indicators, and the measurement values ​​of each PV under the one or more indicators may be collected through the scheduled task.

[0113] Take node 1 as an example, see Figure 3As shown, there are i PVs in node 1, and DaemonProcess (i.e., master process) is deployed in the node. The master process contains three scheduled tasks: Task 1 for collecting the current PV capacity and current PV usage rate of PV1 to PVi, Task 2 for collecting the PV writing speed of PV1 to PVi, and Task 3 for collecting the PV usage capacity growth rate of PV1 to PVi.

[0114] In an embodiment of the present application, the slave node may collect measurement values ​​for each PV based on the evaluation indicators involved in each scaling rule included in the scaling rule set associated with each PV (i.e., the evaluation indicators included in the state description information). Specifically, as a possible situation, if the evaluation indicators involved in each scaling rule associated with each PV are different (may not be completely different or may be partially different), then the slave node may measure the corresponding evaluation indicators for each PV. The evaluation indicators that need to be measured for the PV can be determined based on the evaluation indicators included in the scaling rule set associated with the PV. The evaluation indicators that need to be measured for the PV may be obtained by the slave node through the master node, or may be determined by the slave node based on the scaling rule set associated with each PV notified by the master node, and there is no limitation on this.

[0115] For example, the scaling rule set associated with PV1 includes scaling rule 1' and scaling rule 2'. The status description information in scaling rule 1' includes: PV capacity is 20G, PV utilization rate is greater than or equal to 80%, and PV write speed is greater than or equal to 1MB / s. The status description information in scaling rule 2' includes: PV capacity is 50G, current PV utilization rate is greater than or equal to 80%, and PV usage capacity growth rate is greater than or equal to 100MB / minutes. Obviously, the evaluation indicators involved in scaling rule 1' and scaling rule 2' include: PV capacity, PV utilization rate, PV write speed, and PV usage capacity growth rate. Therefore, the evaluation indicators that need to be measured for PV1 include: PV capacity, PV utilization rate, PV write speed, and PV usage capacity growth rate.

[0116] For another example, the scaling rule set associated with PV2 includes scaling rule 3' and scaling rule 4'. The status description information in scaling rule 3' includes: PV capacity is 50G, and the current PV utilization rate is less than or equal to 10%. The status description information in scaling rule 4' includes: PV capacity is 100G, and the PV utilization rate is less than or equal to 20%. Obviously, the evaluation indicators involved in scaling rule 3' and scaling rule 4' include: PV capacity and PV utilization rate. Therefore, the evaluation indicators that need to be measured for PV1 include: PV capacity and PV utilization rate.

[0117] As another possible situation, if the evaluation indicators involved in the scaling rules associated with the PVs are the same, then the slave node may measure the same evaluation indicator for each PV.

[0118] For example, as shown in Table 1, each scaling rule involves PV capacity, PV utilization rate, PV write speed, and PV usage capacity growth rate. Therefore, the evaluation indicators that need to be measured for each PV in the cluster include: PV capacity, PV utilization rate, PV write speed, and PV usage capacity growth rate.

[0119] In the embodiment of the present application, the slave node may also measure the same evaluation index for each PV directly without considering whether the evaluation indexes involved in each scaling rule are the same. The evaluation index to be measured may include all evaluation indexes involved in the scaling rule set associated with each PV.

[0120] When a slave node reports the collected measurement information to the master node, as a possible implementation method, the slave node can write the collected measurement information of each PV into the database, and the master node reads the measurement information of each PV collected by the slave node through the database. For example, node 1 stores the measurement information collected by task 1, task 2, and task 3 in the PV measurement information storage database. The master node reads the measurement information of PV1 to node i collected by node 1 through the database. As another possible implementation method, the slave node can also report the collected measurement information of each PV to the master node through a set data transmission interface. This application does not limit the reporting method of measurement information, and will not go into details.

[0121] In some implementations, a control process (DaemonProcess) may also be deployed in each slave node. The DaemonProcess may be divided into three parts: a master process, a scheduled task, and a database. The scheduled task collects the measurement values ​​(i.e., measurement information) of each evaluation indicator of each PV, and writes the collected measurement values ​​into a database for storing measurement information. The master process reads the data in the database for storing measurement information and reports it to the master node.

[0122] Still taking node 1 as an example, refer to Figure 4 As shown in the figure, a DaemonProcess (control process) is deployed in Node 1. The DaemonProcess is divided into three parts: the main process, the scheduled task, and the database. The scheduled task is used to collect the measured values ​​of the current PV capacity, current PV usage rate, PV write speed, and PV usage capacity growth rate of PV1 to PVi, and write the collected measured values ​​into the database for storing measurement information. The main process reads the data in the database for storing measurement information and reports it to the master node.

[0123] In some implementations, a PV elastic scaling controller may be deployed in the master node, and the PV elastic scaling controller may be used to handle the elastic scaling control of PVs of all nodes in the cluster, that is, both S201 and S202 may be implemented by the PV elastic scaling controller in the master node.

[0124] S202. For each acquired scaling rule set, the master node performs the following operations respectively: when a scaling rule set includes a target scaling rule that meets a preset condition, based on a target capacity included in the target scaling rule, adjusting the storage capacity of a logical storage unit associated with the scaling rule set; wherein the preset condition indicates that: state description information included in a scaling rule successfully matches measurement information corresponding to the associated logical storage unit.

[0125] Each measurement information includes at least one respective measurement value of an evaluation indicator, for example, the measurement information may include respective measurement values ​​of PV capacity, PV utilization rate, PV writing speed, and PV usage capacity growth rate.

[0126] In an embodiment of the present application, for each PV, the master node may match the measurement information corresponding to the PV with each scaling rule in the scaling rule set associated with the PV. If the match is successful, the storage capacity of the PV is adjusted based on the target capacity in the scaling rule that matches the successful match.

[0127] Specifically, when at least one measurement value in the measurement information corresponding to the associated logical storage unit meets the corresponding numerical range in the state description information, it is determined that the state description information included in a scaling rule successfully matches the measurement information corresponding to the associated logical storage unit.

[0128] The following takes the matching process of the scaling rule x of PVx and the measurement information of PVx as an example for explanation. PVx can be any PV in the cluster, and the scaling rule x can be any scaling rule in the scaling rule set associated with PVx. Assume that the scaling rule x contains the numerical ranges of P evaluation indicators.

[0129] Specifically, for each of the P evaluation indicators, the master node matches the measurement value of the evaluation indicator in the measurement information of PVx with the numerical range of the evaluation indicator in the state description information of the scaling rule x, and if the measurement value meets the numerical range, it is determined that the evaluation indicator is successfully matched. If all the P evaluation indicators are successfully matched, it is determined that the state description information included in the scaling rule x of PVx matches the measurement information of PVx successfully.

[0130] In an embodiment of the present application, the numerical range of an evaluation indicator can be used to indicate the numerical upper limit or numerical lower limit of the evaluation indicator, or can be used to indicate the numerical upper limit and numerical lower limit of the evaluation indicator, or can be used to indicate that the evaluation indicator is a specified value, without limitation.

[0131] For example, the P evaluation indicators are: capacity, usage rate, write speed, and usage capacity growth rate. When the following conditions are met, it is determined that the measurement information of PVx successfully matches the scaling rule x:

[0132] Condition 1: The capacity of PVx is within the preset capacity range.

[0133] Condition 2: The usage rate of PVx is within the preset usage range.

[0134] Condition 3: The PV writing speed of PVx is within the preset writing speed range.

[0135] Condition 4: The growth rate of the PV usage capacity of PVx is within the preset growth rate range.

[0136] Among them, the preset capacity range is the numerical range of capacity, the preset usage range is the numerical range of usage rate, the preset write speed range is the numerical range of PV write speed, and the preset growth speed range is the numerical range of PV usage capacity growth speed.

[0137] For example, if scaling rule x is scaling rule 1, see Figure 7 As shown, scaling rule 1 (the first scaling rule) includes: the numerical ranges of PV capacity, PV utilization rate, PV write speed, and PV usage capacity growth rate, wherein the preset capacity range of PV capacity is 20G, the preset usage range of PV utilization rate is greater than or equal to 80%, the preset write speed range of PV write speed is greater than or equal to 1MB / s, and the preset growth speed range of PV usage capacity growth rate is greater than or equal to 80MB / minutes. When, in the measurement information of PVx, the measured value of PV capacity is 20G, the measured value of PV utilization rate is greater than or equal to 80%, the measured value of PV write speed is greater than or equal to 1MB / s, and the measured value of PV usage capacity growth rate is greater than or equal to 80MB / minutes, the master node determines that the measurement information successfully matches the state description information included in scaling rule 1.

[0138] It should be noted that in the present application and implementation, the P evaluation indicators may also be any one or more of capacity, utilization rate, write speed and growth rate of used capacity. Adaptively, when one or more of the above conditions 1 to 4 are met, it is determined that the measurement information of PVx successfully matches the status description information contained in the scaling rule x.

[0139] For example, assume that the scaling rule set associated with node x includes scaling rule 5, scaling rule 6, and scaling rule 7. The specific contents of scaling rule 5, scaling rule 6, and scaling rule 7 are as follows:

[0140] Scaling rule 5: The status description information is that the current PV capacity is 20G, the PV usage rate is greater than or equal to 80%, the PV write speed is greater than or equal to 1MB / s, and the target capacity is 50G (that is, the PV is expanded to 50G).

[0141] Scaling rule 6: The status description information is that the current PV capacity is 50G, the PV write speed is greater than 1MB / s, the PV usage capacity growth rate is greater than or equal to 100MB / minutes, and the target capacity is 100G (that is, the PV is expanded to 100G).

[0142] Scaling rule 7: The status description information is that the PV capacity is 30 GB, the PV usage rate is less than or equal to 10%, and the target capacity is 20 GB (that is, the PV is reduced to 20 GB).

[0143] Among them, scaling rule 5 includes the numerical ranges of PV capacity, PV utilization rate, and PV write speed, scaling rule 6 includes the numerical ranges of PV capacity, PV utilization rate, and PV usage capacity growth rate, and scaling rule 7 includes the numerical ranges of PV capacity and PV utilization rate.

[0144] When, in the measurement information of node x, the measured value of PV capacity is 20G, the measured value of PV usage rate is greater than or equal to 80%, and the measured value of PV write speed is greater than or equal to 1MB / s, the master node determines that the measurement information of node x successfully matches the state description information included in scaling rule 5.

[0145] When the measured value of the PV capacity of node x is 50 GB, the measured value of the PV write speed is greater than 1 MB / s, and the measured value of the PV usage capacity growth rate is greater than or equal to 100 MB / minutes, the master node determines that the measurement information of node x successfully matches the status description information included in scaling rule 6.

[0146] When the measured value of the PV capacity in the measurement information of the node x is 30G and the measured value of the PV utilization rate is less than or equal to 10%, the master node determines that the measurement information of the node x successfully matches the state description information included in the scaling rule 7.

[0147] In the above implementation, by comparing each measurement value in the measurement information with the corresponding numerical range in the state description information, it is determined whether the measurement information successfully matches the state description information contained in the scaling rule, thereby improving the accuracy of the hits of the elastic scaling rules, thereby improving the accuracy of capacity adjustment, and further improving the efficiency of PV capacity elastic scaling. Furthermore, the capacity of the PV can be dynamically set based on evaluation indicators such as the current capacity, write speed, capacity growth rate, and utilization rate of the PV, combined with the elastic scaling rules corresponding to the PV, so as to more efficiently utilize the PV storage resources of the cluster.

[0148] In some implementations, a preset storage capacity range corresponding to each PV may be pre-set, and the master node may adjust the storage capacity of the PV according to the preset storage capacity range corresponding to the PV without exceeding the storage capacity limit. Specifically, the master node adjusts the storage capacity of a logical storage unit associated with a scaling rule set based on the target capacity included in the target scaling rule, including:

[0149] Obtaining a preset storage capacity range of a logical storage unit associated with a scaling rule set;

[0150] When the target capacity included in the target scaling rule is within the preset storage capacity range, the storage capacity of the logical storage unit associated with a scaling rule set is adjusted to the target capacity.

[0151] The preset storage capacity range of a PV may include one or more of an upper storage capacity limit and a lower storage capacity limit of the PV.

[0152] For example, the preset storage capacity range of PV1 is: the lower limit of storage capacity is 20G, and the upper limit of storage capacity is 100G. Assuming that the target capacity is 50G, the master node obtains the preset storage capacity range of PV1. At this time, the target capacity of 50G included in the target scaling rule is within the preset storage capacity range. Therefore, the storage capacity of PV1 is adjusted by 50G.

[0153] It should be noted that, in the embodiment of the present application, if the target capacity included in the target scaling rule exceeds the preset storage capacity range, the target capacity of the PV is not adjusted.

[0154] For example, the preset storage capacity range of PV1 is: the lower limit of storage capacity is 20G, and the upper limit of storage capacity is 100G. Assuming that the target capacity is 110G, the master node obtains the preset storage capacity range of PV1. At this time, the target capacity 110G included in the target scaling rule exceeds the preset storage capacity range. Therefore, the storage capacity of PV1 is not adjusted.

[0155] In an embodiment of the present application, as a possible implementation method, a corresponding preset storage capacity range can be set for a business component, and the preset storage capacity range corresponding to the business component can be used as the preset storage capacity range of each PV corresponding to the business component. For example, the storage capacity lower limit of the ocloud-cvm-api component is 20G, and the storage capacity upper limit is 100G. The PVs corresponding to the ocloud-cvm-api component include PV1 to PVi, and the storage capacity lower limits corresponding to PV1 to PVi are all 20G, and the storage capacity upper limits are all 100G. As a possible implementation method, the corresponding preset storage capacity range can also be directly set for the PV.

[0156] The preset storage capacity range of the PV may be registered in the master node at the same time as the scaling rule set associated with the PV. Exemplarily, when at least one service component is deployed in the cluster, the scaling rule set and the preset storage capacity range associated with the corresponding at least one storage logic unit are registered in the master node. When at least one service component is uninstalled from the cluster, the scaling rule set and the preset storage capacity range associated with the corresponding at least one storage logic unit are deleted from the master node.

[0157] For example, the storage capacity lower limit of the ocloud-cvm-api component is 20G, and the storage capacity upper limit is 100G. When the ocloud-cvm-api component is deployed to the cluster, the scaling rule sets and preset storage capacity ranges associated with PV1 to PVi are registered to the master node, where the scaling rule sets associated with PV1 to PVi are the scaling rule sets set for the ocloud-cvm-api component, and the preset storage capacity ranges associated with PV1 to PVi are: storage capacity lower limit 20G, storage capacity upper limit 100G. When the ocloud-cvm-api component is uninstalled from the cluster, the scaling rule sets and preset storage capacity ranges associated with PV1 to PVi are deleted from the master node.

[0158] Through the above implementation, the PV capacity is elastically scaled through the upper and lower limits of the PV storage capacity. Since the upper and lower limits of the storage capacity can be determined according to the data storage volume during business peaks and troughs during actual applications, storage resource planning can be more reasonably performed, thereby improving the utilization of storage resources and reducing the waste of storage resources.

[0159] In some implementations, when the master node adjusts the storage capacity of the PV based on the target capacity included in the target scaling rule, the master node may specifically send the target capacity to a slave node where a PV associated with a scaling rule set is located through a resource configuration interface of the cluster, so that the slave node adjusts the storage capacity of the associated PV based on the target capacity.

[0160] The resource configuration interface can use but is not limited to api-server. api-server is one of the most important core components of kubernetes, and is mainly used to provide the following functions: provide REST API interface for cluster management, including authentication and authorization, data verification, and cluster status change, etc.; provide a hub for data interaction and communication between other modules.

[0161] For example, the master node sends a target capacity of 50 GB to node 1 where PV1 is located through the REST API interface in the api-server, so that node 1 adjusts the storage capacity of PV1 based on the target capacity of 50 GB.

[0162] In some implementations, if there is no target scaling rule that meets a preset condition in a scaling rule set, the storage capacity of the PV associated with the scaling rule set may not be adjusted.

[0163] In some implementations, each slave node in the cluster may periodically report the measurement information of each PV corresponding to itself, and the master node may periodically (data acquisition frequency is T2) pull the measurement information of each PV reported by each slave node, and each time pull, obtain the scaling rule set associated with each PV, and then determine whether to adjust the storage capacity of each PV based on the scaling rule set associated with each PV.

[0164] Specifically, the measurement information of each logical storage unit in the cluster is periodically reported by each slave node in the cluster; after the master node receives the measurement information of each logical storage unit in the cluster, it can store the received measurement information in the designated storage location in the master node, and then periodically read and delete the measurement information from the designated storage location.

[0165] Through periodic data collection and data processing, the resource occupancy of cluster PV can be dynamically modified according to the actual business situation, thereby meeting the needs of cluster business at different times.

[0166] The present application is described below in conjunction with a specific embodiment.

[0167] See also Figure 8 As shown, it is a schematic diagram of a kubernetes cluster provided in an embodiment of the present application. The kubernetes cluster includes: a master node and 10 slave nodes. Among them, a PV elastic scaling controller is deployed in node 1. Node 1 includes PV1 and PV2, node 2 includes PV3, node 3 includes PV4, PV5 and PV6, and node m includes PVn.

[0168] CVM, TCS, CSP and other services are deployed in the kubernetes cluster. The service components of CVM include ocloud-cvm-api, the service components of TCS include ocloud-tcs-api, and the service components of CSP include ocloud-csp-auth.

[0169] Taking ocloud-cvm-api as an example, for ocloud-cvm-api, there are preset PV elastic scaling rule sets (i.e., scaling rule sets) and storage capacity planning data (i.e., preset storage capacity range). The PV elastic scaling rule set contains multiple scaling rules corresponding to ocloud-cvm-api, and the storage capacity planning data contains the preset storage capacity range corresponding to ocloud-cvm-api.

[0170] See also Fig. 9 As shown in the figure, when ocloud-cvm-api, ocloud-tcs-api, and ocloud-csp-auth are deployed in the kubernetes cluster, the PV elastic scaling rule sets and storage capacity planning data of ocloud-cvm-api, ocloud-tcs-api, and ocloud-csp-auth are written to the master node. Taking ocloud-cvm-api as an example, the PV elastic scaling rule set of ocloud-cvm-api is used as the scaling rule set associated with each PV corresponding to ocloud-cvm-api, and the preset storage capacity range corresponding to ocloud-cvm-api is used as the preset storage capacity range of each PV corresponding to ocloud-cvm-api.

[0171] The PV elastic scaling rule sets of ocloud-cvm-api, ocloud-tcs-api, and ocloud-csp-auth can be uniformly stored in the elastic scaling rule data table, and the PV elastic scaling rule sets of ocloud-cvm-api, ocloud-tcs-api, and ocloud-csp-auth can be uniformly stored in the storage capacity planning data table.

[0172] See also Figure 8As shown in the figure, a DaemonProcess is deployed in each slave node. The DaemonProcess is mainly divided into three parts: the main process, the scheduled task and the database. The scheduled task is used to collect the measured values ​​of the current PV capacity, current PV utilization rate, PV write speed, and PV usage capacity growth rate of each PV corresponding to the slave node. After each collection of the corresponding measurement value, the slave node DaemonProcess writes the collected measured values ​​of the current PV capacity, current PV utilization rate, PV write speed, and PV usage capacity growth rate of each PV into the database used to store the measurement information. The main process reads the data in the database and reports it to the PV elastic scaling controller.

[0173] See also Fig.10 As shown in the figure, the main process of the PV elastic scaling controller will traverse each reported measurement information in turn, and then match each measurement information with each scaling rule in the scaling rule set associated with the corresponding PV. When the match is successful, according to the target capacity in the matching scaling rule, the api-server of the kubernetes cluster sends a request to the slave node where the corresponding PV is located to adjust the storage capacity of the corresponding PV. If the rule description is not met, the corresponding PV capacity will not be modified.

[0174] Take the first measurement information as an example. In the first measurement information, the current PV capacity is 20G, the current PV utilization rate is 85%, the PV write speed is 2MB / s, and the PV usage capacity growth rate is 120MB / minutes. The PV elastic scaling controller uses the first four scaling rules in the elastic scaling rule table as the scaling rules in the scaling rule set associated with PV1 based on the component identifier pointing to node 1 and the PV identifier pointing to PV1 contained in the first measurement information. Then, the first measurement information is matched with the first four scaling rules respectively. At this time, the current PV capacity of PV1 is 20G, the value range of the current PV utilization rate is greater than or equal to 80%, the value range of the block device write speed corresponding to PV is greater than or equal to 1MB / s, and the value range of the PV usage capacity growth rate is greater than or equal to 80MB / minutes. Obviously, the first measurement information matches the first scaling rule successfully. Therefore, based on the target capacity in the first scaling rule, the storage capacity of PV1 is adjusted to 50G.

[0175] Based on the same inventive concept, the embodiment of the present application provides a capacity elastic expansion device. Fig.11 As shown, it is a schematic diagram of the structure of the capacity elastic expansion device 1100, which may include:

[0176] The data acquisition unit 1101 is configured to acquire the scaling rule sets associated with the respective logical storage units in the cluster if the respective measurement information of the respective logical storage units in the cluster is received; wherein each logical storage unit is used to provide data storage services for a slave node in the cluster, each measurement information is used to evaluate the storage state of the corresponding logical storage unit, and each scaling rule includes a state description information of a reference storage state and a target capacity;

[0177] The data detection unit 1102 is configured to perform the following operations respectively for each acquired scaling rule set:

[0178] When a target scaling rule that meets a preset condition exists in a scaling rule set, storage capacity of a logical storage unit associated with the scaling rule set is adjusted based on a target capacity included in the target scaling rule; wherein the preset condition indicates that: state description information included in a scaling rule successfully matches measurement information corresponding to the associated logical storage unit.

[0179] As a possible implementation manner, each piece of measurement information includes a measurement value of at least one evaluation indicator, and each piece of status description information includes a numerical range of the at least one evaluation indicator;

[0180] When it is determined that the state description information included in a scaling rule successfully matches the measurement information corresponding to the associated logical storage unit, the data detection unit 1102 is specifically configured to:

[0181] When at least one measurement value in the measurement information corresponding to the associated logical storage unit conforms to the corresponding numerical range in the state description information, the state description information included in the scaling rule successfully matches the measurement information corresponding to the associated logical storage unit.

[0182] As a possible implementation, the at least one evaluation index includes: capacity, usage rate, write speed and usage capacity growth rate of the corresponding logical storage unit;

[0183] When it is determined that at least one measurement value in the measurement information corresponding to the associated logical storage unit meets the corresponding numerical range in the state description information, the data detection unit 1102 is specifically used to:

[0184] The capacity of the corresponding logical storage unit is within a preset capacity range;

[0185] The usage rate of the corresponding logical storage unit is within a preset usage range;

[0186] The block device write speed of the corresponding logical storage unit is within the preset write speed range;

[0187] The growth rate of the usage capacity of the corresponding logical storage unit is within a preset growth rate range.

[0188] As a possible implementation manner, when adjusting the storage capacity of the logical storage unit associated with the one scaling rule set based on the target capacity included in the target scaling rule, the data detection unit 1102 is specifically configured to:

[0189] Obtaining a preset storage capacity range of a logical storage unit associated with the one scaling rule set;

[0190] When the target capacity included in the target scaling rule is within the preset storage capacity range, the storage capacity of the logical storage unit associated with the one scaling rule set is adjusted to the target capacity.

[0191] As a possible implementation, at least one service component is running in each slave node of the cluster, and each service component is provided with data storage services by at least one storage logic unit;

[0192] Then the data acquisition unit 1101 is further used for:

[0193] When the at least one business component is deployed in the cluster, the scaling rule set associated with the corresponding at least one storage logic unit is registered in the master node;

[0194] When the at least one service component is uninstalled from the cluster, the scaling rule set associated with the corresponding at least one storage logic unit is deleted from the master node respectively.

[0195] As a possible implementation manner, when adjusting the storage capacity of the logical storage unit associated with the one scaling rule set based on the target capacity included in the target scaling rule, the data detection unit 1102 is specifically configured to:

[0196] The target capacity is sent to the slave node where the logical storage unit associated with the one scaling rule set is located through the resource configuration interface of the cluster, so that the slave node adjusts the storage capacity of the associated logical storage unit based on the target capacity.

[0197] As a possible implementation manner, the measurement information of each logical storage unit in the cluster is periodically reported by each slave node in the cluster;

[0198] After receiving the measurement information of each logical storage unit in the cluster, the data acquisition unit 1101 is further used to:

[0199] Storing each received measurement information in a designated storage location in the master node;

[0200] The measurement information is periodically read and deleted from the designated storage location.

[0201] For the convenience of description, the above parts are divided into modules (or units) according to their functions and described separately. Of course, when implementing this application, the functions of each module (or unit) can be implemented in the same or multiple software or hardware.

[0202] Regarding the device in the above embodiment, the specific manner in which each unit executes the request has been described in detail in the embodiment of the method, and will not be elaborated here.

[0203] Those skilled in the art will appreciate that various aspects of the present application may be implemented as a system, method or program product. Therefore, various aspects of the present application may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to as "circuit", "module" or "system" herein.

[0204] Based on the same inventive concept, the embodiment of the present application also provides an electronic device. In one embodiment, the electronic device can be a server or a terminal device. Fig.12 As shown, it is a schematic diagram of the structure of a possible electronic device provided in an embodiment of the present application, Fig.12 In the embodiment, the electronic device 1200 includes: a processor 1210 and a memory 1220.

[0205] The memory 1220 stores a computer program that can be executed by the processor 1210. The processor 1210 can perform the steps of the above-mentioned capacity elastic scaling method by executing the instructions stored in the memory 1220.

[0206] The memory 1220 may be a volatile memory, such as a random-access memory (RAM); the memory 1220 may also be a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD); or the memory 1220 may be any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 1220 may also be a combination of the above memories.

[0207] The processor 1210 may include one or more central processing units (CPU) or a digital processing unit, etc. The processor 1210 is configured to implement the above-mentioned capacity elastic scaling method when executing the computer program stored in the memory 1220 .

[0208] In some embodiments, the processor 1210 and the memory 1220 may be implemented on the same chip. In some embodiments, they may also be implemented on separate chips.

[0209] The specific connection medium between the processor 1210 and the memory 1220 is not limited in the embodiment of the present application. In the embodiment of the present application, the processor 1210 and the memory 1220 are connected via a bus as an example. Fig.12 The connections between the other components are only for illustration and are not intended to be limiting. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of description, Fig.12 The diagram shows that only one thick line is used, but this does not mean that there is only one bus or only one type of bus.

[0210] Based on the same inventive concept, an embodiment of the present application provides a computer-readable storage medium, which includes a computer program. When the computer program is run on an electronic device, the computer program is used to enable the electronic device to perform the steps of the above-mentioned capacity elastic scaling method. In some possible implementations, various aspects of the capacity elastic scaling method provided by the present application can also be implemented in the form of a program product, which includes a computer program. When the program product is run on an electronic device, the computer program is used to enable the electronic device to perform the steps in the above-mentioned capacity elastic scaling method. For example, the electronic device can perform the following steps: Figure 2 Follow the steps shown in .

[0211] The program product may use 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, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a RAM, a ROM, an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (Compact Disk Read Only Memory, CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0212] The program product of the embodiment of the present application may adopt a CD-ROM and include a computer program, and can be run on an electronic device. However, the program product of the present application is not limited thereto, and in this document, a readable storage medium may be any tangible medium containing or storing a computer program, which may be used by or in combination with a command execution system, apparatus or device.

[0213] A readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, wherein a readable computer program is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A readable signal medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a computer program for use by or in conjunction with a command execution system, apparatus, or device.

[0214] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.

[0215] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A capacity elastic scaling method, characterized in that: Applied to the master node of the cluster, including: If measurement information of each logical storage unit in the cluster is received, a set of scaling rules associated with each storage logical unit is obtained; wherein each logical storage unit is used to provide data storage services for a slave node in the cluster, each measurement information is used to evaluate the storage state of the corresponding logical storage unit, and each scaling rule includes a state description information of a reference storage state and a target capacity; For each scaling rule set obtained, perform the following operations: When a target scaling rule that meets a preset condition exists in a scaling rule set, storage capacity of a logical storage unit associated with the scaling rule set is adjusted based on a target capacity included in the target scaling rule; wherein the preset condition indicates that: state description information included in a scaling rule successfully matches measurement information corresponding to the associated logical storage unit.

2. The method according to claim 1, characterized in that Each piece of measurement information includes a measurement value of at least one evaluation indicator, and each piece of status description information includes a numerical range of the at least one evaluation indicator; Determining that the state description information included in the scaling rule successfully matches the measurement information corresponding to the associated logical storage unit includes: When at least one measurement value in the measurement information corresponding to the associated logical storage unit meets the corresponding numerical range in the state description information, it is determined that the state description information included in the scaling rule successfully matches the measurement information corresponding to the associated logical storage unit.

3. The method according to claim 2, characterized in that The at least one evaluation index includes: the capacity, utilization rate, write speed and usage capacity growth rate of the corresponding logical storage unit; It is then determined that at least one measurement value in the measurement information corresponding to the associated logical storage unit conforms to the corresponding numerical range in the state description information, including: The capacity of the corresponding logical storage unit is within a preset capacity range; The usage rate of the corresponding logical storage unit is within a preset usage range; The block device write speed of the corresponding logical storage unit is within the preset write speed range; The growth rate of the usage capacity of the corresponding logical storage unit is within a preset growth rate range.

4. The method according to claim 1, 2 or 3, characterized in that: The adjusting the storage capacity of the logical storage unit associated with the one scaling rule set based on the target capacity included in the target scaling rule includes: Obtaining a preset storage capacity range of a logical storage unit associated with the one scaling rule set; When the target capacity included in the target scaling rule is within the preset storage capacity range, the storage capacity of the logical storage unit associated with the one scaling rule set is adjusted to the target capacity.

5. The method according to claim 1, 2 or 3, characterized in that: At least one service component is running in each slave node of the cluster, and each service component is provided with data storage services by at least one storage logic unit; Before receiving the measurement information of each logical storage unit in the cluster, the method further includes: When the at least one business component is deployed in the cluster, the scaling rule set associated with the corresponding at least one storage logic unit is registered in the master node; After adjusting the storage capacity of the logical storage unit associated with the one scaling rule set based on the target capacity included in the target scaling rule, the method further includes: When the at least one service component is uninstalled from the cluster, the scaling rule set associated with the corresponding at least one storage logic unit is deleted from the master node respectively.

6. The method according to claim 1, 2 or 3, characterized in that: The adjusting the storage capacity of the logical storage unit associated with the one scaling rule set based on the target capacity included in the target scaling rule includes: The target capacity is sent to the slave node where the logical storage unit associated with the one scaling rule set is located through the resource configuration interface of the cluster, so that the slave node adjusts the storage capacity of the associated logical storage unit based on the target capacity.

7. The method according to claim 1, 2 or 3, characterized in that: The measurement information of each logical storage unit in the cluster is periodically reported by each slave node in the cluster; After receiving the measurement information of each logical storage unit in the cluster, the method further includes: Storing each received measurement information in a designated storage location in the master node; The measurement information is periodically read and deleted from the designated storage location.

8. A capacity elastic expansion device, characterized in that: include: A data acquisition unit, configured to acquire a set of scaling rules associated with each logical storage unit in the cluster if measurement information of each logical storage unit in the cluster is received; wherein each logical storage unit is used to provide data storage services for a slave node in the cluster, each measurement information is used to evaluate the storage state of the corresponding logical storage unit, and each scaling rule includes a state description information of a reference storage state and a target capacity; The data detection unit is used to perform the following operations on each obtained scaling rule set: When a target scaling rule that meets a preset condition exists in a scaling rule set, storage capacity of a logical storage unit associated with the scaling rule set is adjusted based on a target capacity included in the target scaling rule; wherein the preset condition indicates that: state description information included in a scaling rule successfully matches measurement information corresponding to the associated logical storage unit.

9. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of any one of the methods of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: It comprises a computer program. When the computer program is run on an electronic device, the computer program is used to make the electronic device execute the steps of any one of the methods of claims 1 to 7.

11. A computer program product, characterized in that It includes a computer program, which is stored in a computer-readable storage medium. The processor of the electronic device reads and executes the computer program from the computer-readable storage medium, so that the electronic device executes the steps of any method described in claims 1 to 7.

Citation Information

Cited By

  • Elastic expansion and contraction method and device for storage space, medium and program product

    CN119620959A