Flow control method, system and device
By determining the number of node tokens based on the service pressure data and service quality configuration values of the storage node, the problem of unreasonable traffic division in the traffic control of the distributed storage system in the prior art is solved, and more reasonable token allocation and flow control are achieved, thereby improving the stability and reliability of the system.
Patent Information
- Application Number
- CN202411707861.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-04-18
AI Technical Summary
In the prior art, the traffic control method of distributed storage systems has the problem of unreasonable traffic division, which leads to wasted and insufficient tokens, affecting the stability and reliability of the system.
By obtaining the service pressure data of multiple storage nodes in the storage system and the system service quality configuration values, the number of node tokens of each storage node is determined, and traffic control for business processing is performed based on these tokens. This method matches token allocation with the business pressure situation of the storage node to avoid unreasonable division caused by equal division.
It improves the rationality of token allocation, ensures the rationality of traffic division, thereby improving the stability and reliability of the storage system, and avoiding the waste and insufficient tokens.
Smart Images

Figure CN119854223A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of distributed storage technology, and in particular to a flow control method, system and device. Background Art
[0002] In a distributed storage system, each storage node receives and processes services independently. In order to avoid system overload or congestion, it is necessary to control the flow of distributed storage nodes.
[0003] Quality of Service (QoS) can achieve traffic control of storage systems through traffic division. In related technologies, when performing traffic control on distributed storage systems, the QoS configuration value is usually evenly distributed to each storage node. The distributed QoS configuration value can be converted into a token number, and each storage node processes a corresponding number of services based on the token number.
[0004] However, the flow control method in the related art has the technical problem of unreasonable flow division. Summary of the invention
[0005] Based on this, it is necessary to provide a flow control method, system and device to address the above technical problems, so that the flow division is more reasonable and the stability and reliability of the storage system can be improved.
[0006] In a first aspect, an embodiment of the present application provides a flow control method, including:
[0007] In response to a business processing request of the storage system, obtaining business pressure data of multiple storage nodes in the storage system and a system service quality configuration value of the storage system;
[0008] Determine the number of node tokens for each storage node based on the business pressure data of each storage node and the system service quality configuration value;
[0009] The flow of business processing on each storage node is controlled according to the number of tokens on each node.
[0010] In the flow control method provided by the embodiment of the present application, in response to the business processing request of the storage system, the business pressure data of multiple storage nodes in the storage system and the system service quality configuration value of the storage system are obtained, and then the number of node tokens of each storage node is determined according to the business pressure data and the system service quality configuration value of each storage node, and then the flow control of business processing of each storage node is performed according to the number of node tokens. In this method, when business processing is required, the number of tokens that can be allocated to each storage node is determined based on the business pressure data of each storage node in the storage system and the system service quality configuration value of the storage system, so as to control the flow of business processing of each storage node based on the number of node tokens of each storage node. When determining the number of node tokens of each storage node in this process, the pressure request for processing business of each storage node is referred to, which is equivalent to matching the number of node tokens of each storage node with the business pressure of each storage node, that is, the storage node with high pressure is allocated more tokens, and the storage node with low pressure is allocated less tokens, so that the token allocation is more reasonable, avoiding the waste of tokens and insufficient tokens due to equal distribution of tokens, improving the rationality of token allocation, and then making the flow division more reasonable, improving the stability and reliability of the storage system.
[0011] In one embodiment, determining the number of node tokens of each storage node according to the business pressure data of each storage node and the system service quality configuration value includes:
[0012] Convert the system service quality configuration value into the number of tokens to obtain the total number of tokens of the storage system;
[0013] The number of node tokens of each storage node is determined based on the business pressure data of each storage node and the total number of tokens.
[0014] In the flow control method provided by the embodiment of the present application, the total number of tokens of the storage system is obtained by converting the system service quality configuration value into the number of tokens, and then the number of node tokens of each storage node is determined according to the business pressure data of each storage node and the total number of tokens. In this method, in order to determine the number of node tokens of each storage node, the system service quality configuration value of the storage system is first converted into the number of tokens. In this way, the token data can be allocated according to the business pressure of each storage node to obtain the number of node tokens of each storage node, so that the number of node tokens of each storage node matches the pressure of each storage node in processing business, which improves the rationality of the token division of each storage node and lays the foundation for the rational division of traffic during business processing.
[0015] In one embodiment, determining the number of node tokens of each storage node according to the business pressure data of each storage node and the total number of tokens includes:
[0016] Obtain business processing capacity data of each storage node;
[0017] Determine the upper and lower limits of token allocation for each storage node based on the business pressure data and business processing capacity data;
[0018] The number of node tokens for each storage node is determined based on the upper limit of each token allocation, the lower limit of each token allocation and the total number of tokens.
[0019] In the flow control method provided in the embodiment of the present application, the business processing capacity data of each storage node is obtained, and then the upper limit and lower limit of token allocation of each storage node are determined according to each business pressure data and each business processing capacity data, and then the number of node tokens of each storage node is determined according to each token allocation upper limit, each token allocation lower limit and the total number of tokens. In this method, when determining the number of node tokens of each storage node, the business pressure data of each storage node is combined with the business processing capacity data of each storage node to determine the number of tokens that can be allocated to each storage node, which is equivalent to not only referring to the pressure of each storage node in processing business, but also referring to the processing capacity of each storage node when allocating tokens, further improving the rationality of token allocation, improving the rationality of traffic division, so that the processing capacity of the storage node can be fully utilized.
[0020] In one embodiment, determining the upper limit and the lower limit of token allocation of each storage node according to each service pressure data and each service processing capacity data includes:
[0021] Determine the capacity weight of each storage node based on the business processing capacity data;
[0022] According to each capability weight and each business pressure data, the upper and lower limits of token allocation for each storage node are determined.
[0023] In the embodiment of the present application, the upper limit and lower limit of token allocation of each storage node can be determined according to the mapping relationship between the capability weight, business pressure data and the upper limit and lower limit of token allocation. For example, the mapping relationship between different capability weights, different business pressure data and different upper limits and lower limits of token allocation is stored in the database. When it is necessary to determine the upper limit and lower limit of token allocation of each storage node, the corresponding upper limit and lower limit of token allocation are matched from the above mapping relationship in the database according to the capability weight of each storage node and the business pressure data of each storage node, and then the matched upper limits and lower limits of each token allocation are determined as the upper limit and lower limit of token allocation of each storage node.
[0024] In one embodiment, determining the upper limit and the lower limit of token allocation for each storage node according to each capability weight and each business pressure data includes:
[0025] For any storage node, the capacity weight and business pressure data of the storage node are obtained according to each capacity weight and each business pressure data;
[0026] If the capability weight is greater than the business pressure data, the capability weight is determined as the upper limit of token allocation, and the business pressure data is determined as the lower limit of token allocation;
[0027] If the capability weight is less than the business pressure data, the business pressure data is determined as the upper limit of token allocation, and the capability weight is determined as the lower limit of token allocation.
[0028] In the flow control method provided in the embodiment of the present application, for any storage node, the capacity weight and business pressure data of the storage node are obtained according to each capacity weight and each business pressure data. If the capacity weight is greater than the business pressure data, the capacity weight is determined as the upper limit of token allocation, and the business pressure data is determined as the lower limit of token allocation. If the capacity weight is less than the business pressure data, the business pressure data is determined as the upper limit of token allocation, and the capacity weight is determined as the lower limit of token allocation. In this method, an optional way to quickly determine the upper limit and lower limit of token allocation is provided; by comparing the capacity weight and business pressure data of each storage node, the larger data is determined as the upper limit of token allocation of each storage node, and the smaller data is determined as the lower limit of token allocation of each storage node, which provides data support for the subsequent determination of the number of node tokens of each storage node.
[0029] In one embodiment, determining the number of node tokens of each storage node according to each token allocation upper limit, each token allocation lower limit and the total number of tokens includes:
[0030] Determine the upper and lower limits of the comprehensive allocation of each storage node according to the upper and lower limits of each token allocation;
[0031] The number of node tokens of each storage node is determined based on the upper limit of each token allocation, the lower limit of each token allocation, the upper limit of the comprehensive allocation, the lower limit of the comprehensive allocation and the total number of tokens.
[0032] In the flow control method provided by the embodiment of the present application, the comprehensive allocation upper limit and the comprehensive allocation lower limit of each storage node are determined according to each token allocation upper limit and each token allocation lower limit, and then the number of node tokens of each storage node is determined according to each token allocation upper limit, each token allocation lower limit, the comprehensive allocation upper limit, the comprehensive allocation lower limit and the total number of tokens. In this method, an optional way to quickly determine the number of node tokens of each storage node is provided; by quickly determining the comprehensive allocation upper limit and the comprehensive allocation lower limit of each storage node according to the token allocation upper limit and the token allocation lower limit of each storage node, data support is provided for determining the number of node tokens of each storage node, and by combining the token allocation upper limit and the token allocation upper limit of each storage node with the comprehensive allocation upper limit and the comprehensive allocation lower limit, the number of node tokens of each storage node can be quickly and accurately determined.
[0033] In one embodiment, each storage node includes a service quality agent; obtaining service pressure data of multiple storage nodes in the storage system includes:
[0034] Send pressure data acquisition request to each service quality agent;
[0035] Receive data fed back by each service quality agent, and determine each data as business pressure data of each storage node.
[0036] In the flow control method provided in the embodiment of the present application, each storage node includes a service quality agent, which sends a pressure data acquisition request to each service quality agent, and then receives the data fed back by each service quality agent, and determines each data as the business pressure data of each storage node. In this method, by setting a service quality agent on each storage node, each service quality agent can count the business pressure data of each storage node based on the request sent by the server and feed it back to the server, providing data support for the token allocation of each storage node.
[0037] In one embodiment, each storage node includes a quality of service agent; based on the number of tokens of each node, flow control of business processing on each storage node includes:
[0038] The token number of each node is synchronized to the corresponding service quality agent, so that each service quality agent processes the business flow limit of the corresponding storage node based on the token number of each node.
[0039] In the flow control method provided in the embodiment of the present application, each storage node includes a service quality agent; the number of tokens of each node is synchronized to the corresponding service quality agent, so that each service quality agent processes the business flow limiting of the corresponding storage node based on the number of tokens of each node. In this method, after determining the number of node tokens of each storage node, the number of node tokens of each storage node is sent to the service quality agent of each storage node, and the service quality agent of each storage node processes the business flow limiting of the corresponding storage node based on the number of node tokens, which provides an optional way to quickly realize the flow control of each storage node.
[0040] In a second aspect, an embodiment of the present application further provides a flow control system, the flow control system includes a storage system, the storage system includes a plurality of storage nodes, each storage node is provided with a service quality agent, and any storage node is also provided with a service quality center;
[0041] The service quality center is used to determine the number of node tokens of each storage node according to the business pressure data of each storage node and the system service quality configuration value of the storage system, and synchronize the number of each node token to the corresponding service quality agent;
[0042] The service quality agent is used to process the business flow limit of the corresponding storage node based on the number of node tokens sent by the service quality center.
[0043] In the flow control system provided by the embodiment of the present application, the flow control system includes a storage system, the storage system includes a plurality of storage nodes, each storage node is provided with a service quality agent, and any storage node is also provided with a service quality center; the service quality center is used to determine the number of node tokens of each storage node according to the business pressure data of each storage node and the system service quality configuration value of the storage system, and synchronize the number of tokens of each node to the corresponding service quality agent; the service quality agent is used to process the business flow restriction of the corresponding storage node based on the number of node tokens sent by the service quality center. In the flow control system, it includes a storage system, the storage system includes a plurality of storage nodes, each storage node is provided with a service quality agent, and one of the storage nodes is also provided with a service quality center; the service quality center can allocate the number of tokens matching the business pressure situation of each storage node to each storage node according to the business pressure data of each storage node, and send the number of tokens of each storage node to the service quality agent of each storage node, and the service quality agent can process the business flow restriction of the corresponding storage node based on the received token number, so that the token allocation is more reasonable, thereby improving the rationality of traffic division and improving the stability and reliability of the storage system.
[0044] In a third aspect, the embodiment of the present application further provides a flow control device, comprising:
[0045] A data acquisition module, used to respond to a business processing request of the storage system and acquire business pressure data of multiple storage nodes in the storage system and a system service quality configuration value of the storage system;
[0046] A token number determination module, used to determine the number of node tokens of each storage node according to the business pressure data of each storage node and the system service quality configuration value;
[0047] The flow control module is used to control the flow of business processing on each storage node according to the number of tokens of each node.
[0048] In a fourth aspect, an embodiment of the present application further provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps in any one of the embodiments of the first aspect are implemented.
[0049] In a fifth aspect, the embodiments of the present application further provide a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps in any one of the embodiments of the first aspect are implemented.
[0050] In a sixth aspect, the embodiments of the present application further provide a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps in any one of the embodiments in the first aspect are implemented.
[0051] The flow control method, system and device provided by the embodiment of the present application respond to the business processing request of the storage system, obtain the business pressure data of multiple storage nodes in the storage system and the system service quality configuration value of the storage system, and then determine the number of node tokens of each storage node according to the business pressure data and the system service quality configuration value of each storage node, and then control the flow of business processing of each storage node according to the number of node tokens. In this method, when business processing is required, the number of tokens that can be allocated to each storage node is determined based on the business pressure data of each storage node in the storage system and the system service quality configuration value of the storage system, so as to control the flow of business processing of each storage node based on the number of node tokens of each storage node. When determining the number of node tokens of each storage node in this process, the pressure request of each storage node for processing business is referred to, which is equivalent to matching the number of node tokens of each storage node with the business pressure of each storage node, that is, the storage node with high pressure is allocated more tokens, and the storage node with low pressure is allocated less tokens, so that the token allocation is more reasonable, avoiding the waste of tokens and insufficient tokens caused by equal distribution of tokens, improving the rationality of token allocation, and thus making the flow division more reasonable, improving the stability and reliability of the storage system. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0053] Figure 1 An application environment diagram of a flow control method in an embodiment;
[0054] Figure 2 A schematic diagram of a flow chart of a flow control method in an embodiment;
[0055] Figure 3 A schematic diagram of a process for determining the number of node tokens in one embodiment;
[0056] Figure 4 A schematic diagram of a process for determining the number of node tokens in another embodiment;
[0057] Figure 5 A schematic diagram of a flow chart of determining an upper limit and a lower limit of token allocation in one embodiment;
[0058] Figure 6 A schematic diagram of a flow chart of determining an upper limit and a lower limit of token allocation in another embodiment;
[0059] Figure 7 A schematic diagram of a process for determining the number of node tokens in another embodiment;
[0060] Figure 8 A schematic diagram of a process for obtaining business pressure data in an embodiment;
[0061] Fig. 9 is a schematic diagram of a storage system in one embodiment;
[0062] Fig.10 is a flow chart of a flow control method in another embodiment;
[0063] Fig.11 A schematic diagram of the structure of a flow control device in one embodiment;
[0064] Fig.12 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0065] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0066] The technical background of the embodiments of the present application is first described below.
[0067] The data processing capacity provided by the storage system is limited. When the business pressure reaches the upper limit of the storage system's processing capacity, it is easy for the business request to not be processed in time and the response timeout occurs. As an important technology of the storage system, QoS can help users allocate storage system resources and prevent non-critical businesses from having too much impact on critical businesses. Usually, users can use QoS to set different IOPS (Input / Output Operations PerSecond) and bandwidth values to limit the maximum system resources that different businesses can consume and prevent excessive disturbance to neighbors.
[0068] In a distributed storage system, the same type of business will be distributed across multiple storage nodes for processing. The IOPS or bandwidth value set for this type of business should limit the total traffic of all storage nodes processing this type of business to not exceed the set value.
[0069] Token bucket is a common technology for implementing QoS function. It converts IOPS or bandwidth setting value into token number, periodically adds a certain number of tokens to the token bucket, and always keeps the total number of tokens in the token bucket less than or equal to the QoS setting value. When processing business requests, the corresponding number of tokens are consumed from the token bucket. If there are insufficient tokens in the token bucket, the request is rejected, so as to achieve flow control of business processing.
[0070] In the related art, each storage node in the distributed storage system can independently receive and process services, so there are differences in business pressure between storage nodes, and this difference is not fixed. As the business load changes or the storage capacity increases, the pressure difference between storage nodes will change accordingly. There are two main technical routes for QoS in the current distributed storage system. One technical route is: select one node as the central node among all storage nodes, and maintain a token bucket at the central node; each storage node that processes services sends a message to the central node to obtain a certain number of tokens; the disadvantage of this implementation method is that a large amount of inter-node communication will be generated. The more nodes there are, the greater the network overhead, and the request processing delay will also be affected by the network delay. Another technical route is to select one node as the central node, and the central node distributes the QoS configuration value to each storage node, and maintains the token bucket on the storage node; basically, the QoS configuration value is distributed to each storage node in an evenly distributed manner. This method cannot adapt to the uneven business pressure between storage nodes, resulting in token waste of storage nodes with less pressure and large processing delay of storage nodes with greater pressure.
[0071] Based on this, an embodiment of the present application provides a flow control method. When business processing is required, the number of tokens that can be allocated to each storage node is determined based on the business pressure data of each storage node in the storage system and the system service quality configuration value of the storage system, so as to control the flow of business processing on each storage node based on the number of node tokens of each storage node. When determining the number of node tokens of each storage node in this process, the pressure request of each storage node for processing the business is referred to, which is equivalent to matching the number of node tokens of each storage node with the business pressure situation of each storage node, that is, more tokens are allocated to storage nodes with high pressure, and fewer tokens are allocated to storage nodes with low pressure, so that the token allocation is more reasonable, avoiding the waste of tokens and insufficient tokens due to equal distribution of tokens, improving the rationality of token allocation, and thus making the traffic division more reasonable, thereby improving the stability and reliability of the storage system.
[0072] It should be noted that the beneficial effects brought about by the embodiments of the present application or the technical problems solved are not limited to this one, but may also include other implicit or related problems. For details, please refer to the description of the following embodiments.
[0073] The following is an explanation of the application environment of the flow control method provided in the embodiment of the present application. The flow control method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. Optionally, the server 104 can be any storage node, which acts as a central node to assign QoS configuration values to each storage node to achieve traffic control for business processing by each storage node. Among them, the terminal 102 can be but is not limited to various personal computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented with an independent server or a server cluster consisting of multiple servers.
[0074] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0075] In an exemplary embodiment, Figure 2As shown, a flow control method is provided, which is applied to Figure 1 The server 104 in the example is used as an example to illustrate, including the following steps 201 to 203. Among them:
[0076] S201 , in response to a service processing request of a storage system, obtaining service pressure data of a plurality of storage nodes in the storage system and a system service quality configuration value of the storage system.
[0077] The service processing request of the storage system refers to the request triggered when the storage system receives a service for service processing.
[0078] In one embodiment, the request is triggered according to a preset automatic program; for example, after the storage system receives a read / write task sent by the host, if the number of received read / write tasks reaches a certain threshold, the business processing request of the read / write task is automatically triggered according to a preset program. In the embodiment of the present application, the triggering method of the business request is not limited.
[0079] In another embodiment, the request is triggered by the user in the business processing application through the server interface; wherein the triggering method includes but is not limited to external input device click, voice control, touch screen trigger, etc., and the embodiment of the present application does not limit the triggering method. For example, when the user needs to update the data of the storage system, the user can trigger the business processing request for data update through the server interface.
[0080] In the embodiment of the present application, the storage system includes multiple storage nodes, each of which can independently receive and process services. The service pressure data of the storage node refers to the load of the storage node when processing data, and may include the amount of service data received.
[0081] In a storage system, quality of service can help manage and optimize the speed and efficiency of data transmission and help users control the flow of storage systems. The quality of service configuration value is the QoS configuration value. Users can use QoS to set different IOPS and bandwidth values to limit the system resources that can be consumed by the business. The system quality of service configuration value of the storage system refers to the number of input and output operations that the storage system can complete per second.
[0082] The system service quality configuration value of the storage system can be distributed to each storage node to limit the traffic of each storage node to not exceed the allocated QoS configuration value, so as to achieve traffic control for business processing by each storage node.
[0083] Based on this, it is necessary to obtain the system service quality configuration value of the storage system to provide data for the configuration value allocation of each storage node.
[0084] In one embodiment, the method for obtaining the system service quality configuration value of the storage system can be to obtain it through a configuration value setting interface. For example, when it is necessary to obtain the system service quality configuration value of the storage system, the configuration value setting interface is displayed to the user, and the user can enter the system service quality configuration value of the storage system in the configuration value setting interface, so that the server can obtain the system service quality configuration value of the storage system.
[0085] In another embodiment, the system service quality configuration value of the storage system may be obtained from a database. For example, the database stores multiple historical system service quality configuration values, and one historical system service quality configuration value may be obtained from the multiple historical system service quality configuration values as the system service quality configuration value of the storage system. The selection of the historical system service quality configuration value may be selected based on current actual needs, for example, it may be selected based on the current workload and performance requirements of the storage system.
[0086] In this embodiment, when allocating the system service quality configuration value of the storage system to each storage node, the business pressure data of each storage node is also taken into account, so as to allocate a system service quality configuration value that matches the business pressure situation to each storage system, thereby improving the rationality of allocation, that is, making the traffic division more reasonable. Based on this, in this embodiment of the application, it is necessary to obtain the business pressure data of each storage node to provide a basis for the division of the service quality configuration value.
[0087] In one embodiment, the business pressure data of multiple storage nodes in the storage system can be obtained by sending a pressure data acquisition request to each storage node. For example, when it is necessary to obtain the business pressure data of each storage node, a pressure data acquisition request can be sent to each storage node, and each storage node can send the currently received business data volume to the server when receiving the request, and then the server determines the received business data volume as the business pressure data of each storage node. Alternatively, when the server receives the business data volume fed back by each storage node, it can process each business data volume according to demand to determine the processed business data volume as the business pressure data of each storage node. For example, in order to facilitate the subsequent determination of the number of node tokens of each storage node, for any storage node, the ratio of the business data volume of the storage node to the total business data volume of each storage node can be determined as the business pressure data of the storage node.
[0088] In another embodiment, the business pressure data of multiple storage nodes in the storage system may be obtained by using a data collection tool. For example, when it is necessary to obtain the business pressure data of each storage node, the business pressure data of each storage node may be collected by using a data collection tool, so that the business pressure data of each storage node may be obtained.
[0089] S202, determining the number of node tokens of each storage node according to the business pressure data of each storage node and the system service quality configuration value.
[0090] In the embodiment of the present application, when allocating the system service quality configuration value of the storage system to each storage node, the system service quality configuration value is converted into the number of tokens, so as to allocate the tokens to each storage node, thereby realizing the flow control of business processing. Among them, the tokens exist in the token bucket, and when processing the business request, the corresponding number of tokens are consumed from the token bucket. If there are not enough tokens in the token bucket, the request is rejected, thereby realizing the flow control of business processing.
[0091] Exemplarily, after obtaining the business pressure data of each storage node and the system service quality configuration value of the storage system, the system service quality configuration value of the storage system can be converted into the number of tokens, and then the number of tokens of each storage node can be determined based on the business pressure data and the number of tokens of each storage node. Naturally, the number of tokens of each storage node is the number of node tokens.
[0092] S203, performing flow control of business processing on each storage node according to the number of tokens of each node.
[0093] Based on the number of node tokens of each storage node determined above, the flow of business processing of each storage node can be controlled.
[0094] Exemplarily, the node token number of each storage node is sent to each storage node. For any storage node, when processing a business, the storage node consumes a token from the token bucket for each business request processed, and refuses to execute the request until all the allocated tokens are consumed, thereby achieving flow control of business processing.
[0095] In the flow control method provided by the embodiment of the present application, in response to the business processing request of the storage system, the business pressure data of multiple storage nodes in the storage system and the system service quality configuration value of the storage system are obtained, and then the number of node tokens of each storage node is determined according to the business pressure data and the system service quality configuration value of each storage node, and then the flow control of business processing of each storage node is performed according to the number of node tokens. In this method, when business processing is required, the number of tokens that can be allocated to each storage node is determined based on the business pressure data of each storage node in the storage system and the system service quality configuration value of the storage system, so as to control the flow of business processing of each storage node based on the number of node tokens of each storage node. When determining the number of node tokens of each storage node in this process, the pressure request for processing business of each storage node is referred to, which is equivalent to matching the number of node tokens of each storage node with the business pressure of each storage node, that is, the storage node with high pressure is allocated more tokens, and the storage node with low pressure is allocated less tokens, so that the token allocation is more reasonable, avoiding the waste of tokens and insufficient tokens due to equal distribution of tokens, improving the rationality of token allocation, and then making the flow division more reasonable, improving the stability and reliability of the storage system.
[0096] Based on the above embodiment, an embodiment is provided to illustrate the process of determining the number of node tokens of each storage node according to the business pressure data of each storage node and the system service quality configuration value.
[0097] In an exemplary embodiment, Figure 3 As shown, according to the business pressure data of each storage node and the system service quality configuration value, the number of node tokens of each storage node is determined, including:
[0098] S301, converting the system service quality configuration value into the number of tokens to obtain the total number of tokens of the storage system.
[0099] In an embodiment of the present application, when determining the number of node tokens of each storage node, the system service quality configuration value of the storage system is first converted into the number of tokens to provide data support for determining the number of tokens of the storage node.
[0100] Exemplarily, the method of converting the system service quality configuration value into the number of tokens can be to use a service quality policy or algorithm to process the system service quality configuration value of the storage system to obtain the converted number of tokens, and the number of tokens obtained by the conversion is the total number of tokens of the storage system.
[0101] S302, determining the number of node tokens of each storage node according to the business pressure data of each storage node and the total number of tokens.
[0102] After the total number of tokens of the storage system is obtained, the number of tokens that can be allocated to each storage node is determined according to the business pressure data of each storage node and the total number of tokens. The number of allocated tokens is the node token number of each storage node.
[0103] Exemplarily, the total number of tokens can be allocated according to the ratio of the business pressure data of each storage node to obtain the number of node tokens of each storage node. For example, there are three storage nodes, the ratio of the business pressure data of each storage node is 3:1:2, and the total number of tokens is 12. Then, according to the ratio of the business pressure data of each storage node, the total number of tokens is allocated, and the number of node tokens of each storage node obtained is 6, 2, and 4 respectively.
[0104] In the flow control method provided by the embodiment of the present application, the total number of tokens of the storage system is obtained by converting the system service quality configuration value into the number of tokens, and then the number of node tokens of each storage node is determined according to the business pressure data of each storage node and the total number of tokens. In this method, in order to determine the number of node tokens of each storage node, the system service quality configuration value of the storage system is first converted into the number of tokens. In this way, the token data can be allocated according to the business pressure of each storage node to obtain the number of node tokens of each storage node, so that the number of node tokens of each storage node matches the pressure of each storage node in processing business, which improves the rationality of the token division of each storage node and lays the foundation for the rational division of traffic during business processing.
[0105] Based on the above embodiment, an embodiment is provided for the process of determining the number of node tokens of each storage node according to the business pressure data of each storage node and the total number of tokens.
[0106] In an exemplary embodiment, Figure 4 As shown, according to the business pressure data of each storage node and the total number of tokens, the number of node tokens of each storage node is determined, including:
[0107] S401, obtaining service processing capability data of each storage node.
[0108] In the embodiment of the present application, when determining the number of node tokens of each storage node, in addition to considering the pressure of each storage node in processing business, the business processing capacity of each storage node is also considered. Among them, the business processing capacity data refers to the efficiency and speed of the storage node in processing read and write operations, data transmission and processing large amounts of data, and may include the number of input and output operations processed by the storage node per second, the amount of data transmitted per second, etc.
[0109] Exemplarily, a method for obtaining the business processing capability data of each storage node may be to send a capability data acquisition request to each storage node respectively. After receiving the capability data acquisition request, each storage node feeds back the processing capability of each storage node to the server respectively. In this way, the server obtains the processing capability of each storage node and determines the processing capability of each storage node as the business processing capability data of each storage node.
[0110] S402: Determine the upper limit and the lower limit of token allocation of each storage node according to each business pressure data and each business processing capacity data.
[0111] Based on the business processing capacity data of each storage node obtained above, combined with the business pressure data of each storage node, the upper limit and lower limit of token allocation of each storage node can be determined.
[0112] Exemplarily, according to each business pressure data and each business processing capacity data, the upper and lower limits of token allocation for each storage node may be determined by obtaining the mapping relationship between the business pressure data and the business processing capacity data and the upper and lower limits of token allocation.
[0113] For example, the database stores mapping relationships between different business pressure data, different business processing capacity data, different token allocation upper limits, and different token allocation lower limits. When it is necessary to determine the token allocation upper limit and token allocation lower limit of each storage node, the corresponding token allocation upper limit and token allocation lower limit are matched from the above mapping relationship in the database according to the business pressure data and business processing capacity data of each storage node, and then the matched token allocation upper limits and token allocation lower limits are determined as the token allocation upper limit and token allocation lower limit of each storage node.
[0114] S403, determining the number of node tokens of each storage node according to the upper limit of each token allocation, the lower limit of each token allocation and the total number of tokens.
[0115] After obtaining the upper limit and lower limit of token allocation of each storage node, the number of tokens that can be allocated to each storage node is determined in combination with the total number of tokens, that is, the number of node tokens of each storage node.
[0116] Exemplarily, for any storage node, the number of node tokens of the storage node can be determined based on the upper limit of token allocation, the lower limit of token allocation and the total number of tokens of the storage node, in combination with a preset token allocation strategy.
[0117] In the flow control method provided in the embodiment of the present application, the business processing capacity data of each storage node is obtained, and then the upper limit and lower limit of token allocation of each storage node are determined according to each business pressure data and each business processing capacity data, and then the number of node tokens of each storage node is determined according to each token allocation upper limit, each token allocation lower limit and the total number of tokens. In this method, when determining the number of node tokens of each storage node, the business pressure data of each storage node is combined with the business processing capacity data of each storage node to determine the number of tokens that can be allocated to each storage node, which is equivalent to not only referring to the pressure of each storage node in processing business, but also referring to the processing capacity of each storage node when allocating tokens, further improving the rationality of token allocation, improving the rationality of traffic division, so that the processing capacity of the storage node can be fully utilized.
[0118] Based on the above embodiment, an embodiment is provided to illustrate the process of determining the upper limit and the lower limit of token allocation of each storage node according to each business pressure data and each business processing capacity data.
[0119] In an exemplary embodiment, Figure 5 As shown, according to each business pressure data and each business processing capacity data, the upper limit and lower limit of token allocation of each storage node are determined, including:
[0120] S501, determining the capacity weight of each storage node according to each service processing capacity data.
[0121] When determining the upper and lower limits of token allocation for each storage node, the business processing capacity data of each storage node is converted into a capacity weight, which is convenient for subsequent combination with the business pressure data of each storage node, and provides convenience for determining the number of node tokens for each storage node.
[0122] In an embodiment of the present application, the total processing capacity of each storage node can be determined based on the business processing capacity data of each storage node, that is, the sum of the business processing capacity data of each storage node is determined as the total processing capacity of each storage node, and then for any storage node, the ratio of the business processing capacity data of the storage node to the total processing capacity of each storage node is determined as the capacity weight of the storage node.
[0123] S502: Determine the upper limit and lower limit of token allocation for each storage node according to each capability weight and each business pressure data.
[0124] After determining the capacity weight of each storage node, the upper limit and lower limit of token allocation of each storage node are determined in combination with the business pressure data of each storage node.
[0125] In the embodiment of the present application, the upper limit and lower limit of token allocation of each storage node can be determined according to the mapping relationship between the capability weight, business pressure data and the upper limit and lower limit of token allocation. For example, the mapping relationship between different capability weights, different business pressure data and different upper limits and lower limits of token allocation is stored in the database. When it is necessary to determine the upper limit and lower limit of token allocation of each storage node, the corresponding upper limit and lower limit of token allocation are matched from the above mapping relationship in the database according to the capability weight of each storage node and the business pressure data of each storage node, and then the matched upper limits and lower limits of each token allocation are determined as the upper limit and lower limit of token allocation of each storage node.
[0126] In the flow control method provided in the embodiment of the present application, the capacity weight of each storage node is determined according to each business processing capacity data, and then the upper limit and lower limit of token allocation of each storage node are determined according to each capacity weight and each business pressure data. In this method, when determining the upper limit and lower limit of token allocation of each storage node, the business processing capacity data of each storage node is converted into the capacity weight of each storage node, so as to quickly and accurately determine the upper limit and lower limit of token allocation of each storage node according to the capacity weight of each storage node combined with the corresponding business processing capacity data, which provides an optional way to quickly determine the upper limit and lower limit of token allocation.
[0127] Based on the above embodiment, an embodiment is provided to illustrate the process of determining the upper limit and the lower limit of token allocation of each storage node according to each capability weight and each business pressure data.
[0128] In an exemplary embodiment, Figure 6 As shown, according to each capability weight and each business pressure data, the upper limit and lower limit of token allocation of each storage node are determined, including:
[0129] S601, for any storage node, according to each capability weight and each business pressure data, obtain the capability weight and business pressure data of the storage node.
[0130] For any storage node, the capacity weight and business pressure data of the storage node are obtained from the capacity weights of each storage node and the business pressure data of each storage node. The upper limit and lower limit of token allocation of the storage node are determined according to the size of the capacity weight and business pressure data of the storage node.
[0131] S602: If the capability weight is greater than the business pressure data, the capability weight is determined as the upper limit of token allocation, and the business pressure data is determined as the lower limit of token allocation.
[0132] The capacity weight of the storage node is compared with the business pressure data of the storage node. If the capacity weight is greater than the business pressure data, the capacity weight is determined as the upper limit of token allocation, and the business pressure data is determined as the lower limit of token allocation.
[0133] S603: If the capability weight is less than the business pressure data, the business pressure data is determined as the upper limit of token allocation, and the capability weight is determined as the lower limit of token allocation.
[0134] The capacity weight of the storage node is compared with the business pressure data of the storage node. If the capacity weight is less than the business pressure data, the business pressure data is determined as the upper limit of token allocation, and the capacity weight is determined as the lower limit of token allocation.
[0135] When the capacity weight of the storage node is the same as the business pressure data of the storage node, the upper limit and the lower limit of the token allocation of the storage node are also the same.
[0136] In the flow control method provided in the embodiment of the present application, for any storage node, the capacity weight and business pressure data of the storage node are obtained according to each capacity weight and each business pressure data. If the capacity weight is greater than the business pressure data, the capacity weight is determined as the upper limit of token allocation, and the business pressure data is determined as the lower limit of token allocation. If the capacity weight is less than the business pressure data, the business pressure data is determined as the upper limit of token allocation, and the capacity weight is determined as the lower limit of token allocation. In this method, an optional way to quickly determine the upper limit and lower limit of token allocation is provided; by comparing the capacity weight and business pressure data of each storage node, the larger data is determined as the upper limit of token allocation of each storage node, and the smaller data is determined as the lower limit of token allocation of each storage node, which provides data support for the subsequent determination of the number of node tokens of each storage node.
[0137] Based on the above embodiment, an embodiment is provided to illustrate the process of determining the number of node tokens of each storage node according to the upper limit of each token allocation, the lower limit of each token allocation and the total number of tokens.
[0138] In an exemplary embodiment, Figure 7 As shown, according to the upper limit of each token allocation, the lower limit of each token allocation and the total number of tokens, the number of node tokens of each storage node is determined, including:
[0139] S701, determining a comprehensive allocation upper limit and a comprehensive allocation lower limit of each storage node according to each token allocation upper limit and each token allocation lower limit.
[0140] In an embodiment of the present application, after obtaining the token allocation upper limit and token allocation lower limit of each storage node, the sum of the token allocation upper limits of each storage node is determined as the comprehensive allocation upper limit of each storage node, and the sum of the token allocation lower limits of each storage node is determined as the comprehensive allocation lower limit of each storage node.
[0141] S702, determining the number of node tokens of each storage node according to each token allocation upper limit, each token allocation lower limit, the comprehensive allocation upper limit, the comprehensive allocation lower limit and the total number of tokens.
[0142] Based on the comprehensive allocation upper limit and lower limit of each storage node obtained above, combined with the token allocation upper limit, token allocation lower limit and total token number of each storage node, the number of node tokens of each storage node is determined.
[0143] Exemplarily, the number of node tokens of each storage node can be calculated according to a preset token number calculation formula, combined with each token allocation upper limit, each token allocation lower limit, comprehensive allocation upper limit, comprehensive allocation lower limit and the total number of tokens. In an embodiment of the present application, the token number calculation formula is Token[i]=allocLow[i]+(totalToken-totalAllocLow)*(allocUp[i]-allocLow[i]) / (totalAllocUp-totalAllocLow). Among them, Token[i] is the number of node tokens of the i-th storage node; allocLow[i] is the token allocation lower limit of the i-th storage node; totalToken is the total number of tokens; totalAllocLow is the comprehensive allocation lower limit; allocUp[i] is the token allocation upper limit of the i-th storage node; totalAllocUp is the comprehensive allocation upper limit.
[0144] In the flow control method provided by the embodiment of the present application, the comprehensive allocation upper limit and the comprehensive allocation lower limit of each storage node are determined according to each token allocation upper limit and each token allocation lower limit, and then the number of node tokens of each storage node is determined according to each token allocation upper limit, each token allocation lower limit, the comprehensive allocation upper limit, the comprehensive allocation lower limit and the total number of tokens. In this method, an optional way to quickly determine the number of node tokens of each storage node is provided; by quickly determining the comprehensive allocation upper limit and the comprehensive allocation lower limit of each storage node according to the token allocation upper limit and the token allocation lower limit of each storage node, data support is provided for determining the number of node tokens of each storage node, and by combining the token allocation upper limit and the token allocation upper limit of each storage node with the comprehensive allocation upper limit and the comprehensive allocation lower limit, the number of node tokens of each storage node can be quickly and accurately determined.
[0145] Based on any of the above embodiments, an embodiment is provided to illustrate the process of obtaining the business pressure data of multiple storage nodes in the storage system.
[0146] In an exemplary embodiment, Figure 8 As shown, each storage node includes a service quality agent; business pressure data of multiple storage nodes in the storage system are obtained, including:
[0147] S801, sending a pressure data acquisition request to each service quality agent.
[0148] In the embodiment of the present application, each storage node is provided with a service quality agent, which refers to a service deployed on each storage node for processing the business flow limiting on each node.
[0149] When it is necessary to obtain the service pressure data of each storage node, a pressure data acquisition request may be sent to the service quality agent of each storage node, so that the service quality agent of each storage node may feed back the service pressure data of each storage node based on the pressure data acquisition request.
[0150] S802, receiving data fed back by each service quality agent, and determining each data as business pressure data of each storage node.
[0151] The service quality agent of each storage node can count the business pressure of each node. When receiving a request to obtain pressure data, the service quality agent of each storage node counts the business pressure of each storage node and feeds back the business pressure of each storage node to the server. The server determines the data fed back by each service quality agent as the business pressure data of each storage node.
[0152] In the flow control method provided in the embodiment of the present application, each storage node includes a service quality agent, which sends a pressure data acquisition request to each service quality agent, and then receives the data fed back by each service quality agent, and determines each data as the business pressure data of each storage node. In this method, by setting a service quality agent on each storage node, each service quality agent can count the business pressure data of each storage node based on the request sent by the server and feed it back to the server, providing data support for the token allocation of each storage node.
[0153] Based on any of the above embodiments, an embodiment is provided to illustrate the process of controlling the flow of business processing on each storage node according to the number of tokens of each node.
[0154] In an exemplary embodiment, each storage node includes a service quality agent; according to the number of tokens of each node, the flow control of business processing of each storage node includes:
[0155] The token number of each node is synchronized to the corresponding service quality agent, so that each service quality agent processes the business flow limit of the corresponding storage node based on the token number of each node.
[0156] In the embodiment of the present application, a service quality agent is set on each storage node.
[0157] After determining the number of node tokens of each storage node, the number of node tokens of each storage node may be sent to a quality of service agent of each storage node, so that each quality of service agent processes the service flow limiting of the corresponding storage node based on the number of node tokens.
[0158] For any service quality agent, when receiving the node token number of the storage node, the token bucket maintained on the storage node will be regularly increased with the number of tokens consistent with the number of node tokens. When the storage node processes a business request, it consumes the corresponding number of tokens from the token bucket until there are insufficient tokens in the token bucket, then the request is rejected, thereby achieving flow control of business processing.
[0159] In the flow control method provided in the embodiment of the present application, each storage node includes a service quality agent; the number of tokens of each node is synchronized to the corresponding service quality agent, so that each service quality agent processes the business flow limiting of the corresponding storage node based on the number of tokens of each node. In this method, after determining the number of node tokens of each storage node, the number of node tokens of each storage node is sent to the service quality agent of each storage node, and the service quality agent of each storage node processes the business flow limiting of the corresponding storage node based on the number of node tokens, which provides an optional way to quickly realize the flow control of each storage node.
[0160] In an exemplary embodiment, a flow control system is provided, the flow control system includes a storage system, the storage system includes a plurality of storage nodes, each storage node is provided with a service quality agent, and any storage node is also provided with a service quality center;
[0161] The service quality center is used to determine the number of node tokens of each storage node according to the business pressure data of each storage node and the system service quality configuration value of the storage system, and synchronize the number of each node token to the corresponding service quality agent;
[0162] The service quality agent is used to process the business flow limit of the corresponding storage node based on the number of node tokens sent by the service quality center.
[0163] Take four storage nodes as an example. Fig. 9The figure is a schematic diagram of a storage system. The flow control system includes a storage system, and the storage system includes four storage nodes, each storage node is provided with a service quality agent, and one storage node is provided with a service quality center.
[0164] In an embodiment of the present application, the service quality center can respond to the business processing request of the storage system, determine the number of node tokens of each storage node according to the business pressure data of each storage node and the system service quality configuration value of the storage system, and synchronize the number of each node token to the corresponding service quality agent. The service quality agent can process the business flow limit of the corresponding storage node based on the number of node tokens sent by the service quality center. Among them, the way in which the service quality center and the service quality agent implement the corresponding functions can refer to the introduction of the aforementioned embodiment, which will not be repeated here.
[0165] In the flow control system provided by the embodiment of the present application, the flow control system includes a storage system, the storage system includes a plurality of storage nodes, each storage node is provided with a service quality agent, and any storage node is also provided with a service quality center; the service quality center is used to determine the number of node tokens of each storage node according to the business pressure data of each storage node and the system service quality configuration value of the storage system, and synchronize the number of tokens of each node to the corresponding service quality agent; the service quality agent is used to process the business flow restriction of the corresponding storage node based on the number of node tokens sent by the service quality center. In the flow control system, it includes a storage system, the storage system includes a plurality of storage nodes, each storage node is provided with a service quality agent, and one of the storage nodes is also provided with a service quality center; the service quality center can allocate the number of tokens matching the business pressure situation of each storage node to each storage node according to the business pressure data of each storage node, and send the number of tokens of each storage node to the service quality agent of each storage node, and the service quality agent can process the business flow restriction of the corresponding storage node based on the received token number, so that the token allocation is more reasonable, thereby improving the rationality of traffic division and improving the stability and reliability of the storage system.
[0166] In addition, in an exemplary embodiment, the present application also provides a flow control method, such as Fig.10 As shown, the following steps may be included:
[0167] S901 , in response to a service processing request of a storage system, obtain service pressure data of a plurality of storage nodes in the storage system and a system service quality configuration value of the storage system.
[0168] S902: Convert the system service quality configuration value into the number of tokens to obtain the total number of tokens of the storage system.
[0169] S903: Obtain service processing capability data of each storage node.
[0170] S904: Determine the capacity weight of each storage node according to each service processing capacity data.
[0171] S905 , determining the upper limit and the lower limit of token allocation for each storage node according to each capability weight and each business pressure data.
[0172] S906: Determine the comprehensive allocation upper limit and the comprehensive allocation lower limit of each storage node according to the upper limits and lower limits of each token allocation.
[0173] S907, determining the number of node tokens of each storage node according to each token allocation upper limit, each token allocation lower limit, the comprehensive allocation upper limit, the comprehensive allocation lower limit and the total number of tokens.
[0174] The above-mentioned processes of S901-S907 can refer to the description of the above-mentioned method embodiment, and the implementation principles and technical effects thereof are similar and will not be repeated here.
[0175] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0176] Based on the same inventive concept, the embodiment of the present application also provides a flow control device for implementing the flow control method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more flow control device embodiments provided below can refer to the limitations of the flow control method above, and will not be repeated here.
[0177] In an exemplary embodiment, Fig.11 As shown, a flow control device 1 is provided, comprising: a data acquisition module 10, a token number determination module 20 and a flow control module 30, wherein:
[0178] A data acquisition module 10 is used to obtain business pressure data of multiple storage nodes in the storage system and a system service quality configuration value of the storage system in response to a business processing request of the storage system;
[0179] The token number determination module 20 is used to determine the node token number of each storage node according to the business pressure data of each storage node and the system service quality configuration value;
[0180] The flow control module 30 is used to control the flow of business processing of each storage node according to the number of tokens of each node.
[0181] In one embodiment, the token number determination module 20 is further configured to:
[0182] The system service quality configuration value is converted into the number of tokens to obtain the total number of tokens of the storage system; the number of node tokens of each storage node is determined according to the business pressure data of each storage node and the total number of tokens.
[0183] In one embodiment, the token number determination module 20 is further configured to:
[0184] Obtain the business processing capacity data of each storage node; determine the upper and lower limits of token allocation for each storage node based on the business pressure data and the business processing capacity data; determine the number of node tokens for each storage node based on the upper and lower limits of token allocation and the total number of tokens.
[0185] In one embodiment, the token number determination module 20 is further configured to:
[0186] According to each business processing capacity data, the capacity weight of each storage node is determined; according to each capacity weight and each business pressure data, the upper limit and lower limit of token allocation of each storage node are determined.
[0187] In one embodiment, the token number determination module 20 is further configured to:
[0188] For any storage node, the capacity weight and business pressure data of the storage node are obtained according to each capacity weight and each business pressure data; if the capacity weight is greater than the business pressure data, the capacity weight is determined as the upper limit of token allocation, and the business pressure data is determined as the lower limit of token allocation; if the capacity weight is less than the business pressure data, the business pressure data is determined as the upper limit of token allocation, and the capacity weight is determined as the lower limit of token allocation.
[0189] In one embodiment, the token number determination module 20 is further configured to:
[0190] According to the upper and lower limits of each token allocation, determine the comprehensive allocation upper and lower limits of each storage node; according to the upper and lower limits of each token allocation, the comprehensive allocation upper and lower limits, the comprehensive allocation upper and lower limits and the total number of tokens, determine the number of node tokens of each storage node.
[0191] In one embodiment, the data acquisition module 10 is further used for:
[0192] Send a pressure data acquisition request to each service quality agent; receive data fed back by each service quality agent, and determine each data as the business pressure data of each storage node.
[0193] In one embodiment, the flow control module 30 is further used for:
[0194] The token number of each node is synchronized to the corresponding service quality agent, so that each service quality agent processes the business flow limit of the corresponding storage node based on the token number of each node.
[0195] Each module in the above-mentioned flow control device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.
[0196] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Fig.12 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store flow control data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a flow control method is implemented.
[0197] Those skilled in the art will understand that Fig.12The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0198] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0199] In response to a business processing request of the storage system, obtaining business pressure data of multiple storage nodes in the storage system and a system service quality configuration value of the storage system;
[0200] Determine the number of node tokens for each storage node based on the business pressure data of each storage node and the system service quality configuration value;
[0201] The flow of business processing on each storage node is controlled according to the number of tokens on each node.
[0202] The implementation principles and technical effects of each step implemented by the processor in the embodiment of the present application are similar to the principles of the above-mentioned flow control method and will not be repeated here.
[0203] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0204] In response to a business processing request of the storage system, obtaining business pressure data of multiple storage nodes in the storage system and a system service quality configuration value of the storage system;
[0205] Determine the number of node tokens for each storage node based on the business pressure data of each storage node and the system service quality configuration value;
[0206] The flow of business processing on each storage node is controlled according to the number of tokens on each node.
[0207] The implementation principles and technical effects of the various steps implemented when the computer program in the embodiment of the present application is executed by the processor are similar to the principles of the above-mentioned flow control method and will not be repeated here.
[0208] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0209] In response to a business processing request of the storage system, obtaining business pressure data of multiple storage nodes in the storage system and a system service quality configuration value of the storage system;
[0210] Determine the number of node tokens for each storage node based on the business pressure data of each storage node and the system service quality configuration value;
[0211] The flow of business processing on each storage node is controlled according to the number of tokens on each node.
[0212] The implementation principles and technical effects of the various steps implemented when the computer program in the embodiment of the present application is executed by the processor are similar to the principles of the above-mentioned flow control method and will not be repeated here.
[0213] It should be noted that the personnel information (including but not limited to personnel equipment information, personnel personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the personnel or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0214] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0215] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0216] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A flow control method, characterized in that: The method comprises: In response to a service processing request of the storage system, obtaining service pressure data of a plurality of storage nodes in the storage system and a system service quality configuration value of the storage system; Determining the number of node tokens of each storage node according to the business pressure data of each storage node and the system service quality configuration value; The flow rate of business processing of each storage node is controlled according to the number of tokens of each node.
2. The method according to claim 1, characterized in that: Determining the number of node tokens of each storage node according to the business pressure data of each storage node and the system service quality configuration value includes: Convert the system service quality configuration value into the number of tokens to obtain the total number of tokens of the storage system; The number of node tokens of each storage node is determined according to the business pressure data of each storage node and the total number of tokens.
3. The method according to claim 2, characterized in that Determining the number of node tokens of each storage node according to the business pressure data of each storage node and the total number of tokens includes: Acquiring business processing capability data of each of the storage nodes; Determine the upper limit and the lower limit of token allocation of each storage node according to each of the business pressure data and each of the business processing capacity data; The number of node tokens of each storage node is determined according to each token allocation upper limit, each token allocation lower limit and the total number of tokens.
4. The method according to claim 3, characterized in that Determining the upper limit and the lower limit of token allocation of each storage node according to each of the business pressure data and each of the business processing capacity data includes: Determining a capacity weight of each storage node according to each of the business processing capacity data; According to each of the capability weights and each of the business pressure data, a token allocation upper limit and a token allocation lower limit of each of the storage nodes are determined.
5. The method according to claim 4, characterized in that Determining the upper limit and the lower limit of token allocation for each storage node according to each capability weight and each business pressure data includes: For any storage node, according to each of the capability weights and each of the business pressure data, obtain the capability weight and the business pressure data of the storage node; If the capability weight is greater than the business pressure data, the capability weight is determined as the token allocation upper limit, and the business pressure data is determined as the token allocation lower limit; If the capability weight is less than the business pressure data, the business pressure data is determined as the token allocation upper limit, and the capability weight is determined as the token allocation lower limit.
6. The method according to claim 3, characterized in that Determining the number of node tokens of each storage node according to each token allocation upper limit, each token allocation lower limit and the total number of tokens includes: Determine the comprehensive allocation upper limit and the comprehensive allocation lower limit of each storage node according to each token allocation upper limit and each token allocation lower limit; The number of node tokens of each storage node is determined according to each token allocation upper limit, each token allocation lower limit, the comprehensive allocation upper limit, the comprehensive allocation lower limit and the total number of tokens.
7. The method according to any one of claims 1 to 6, characterized in that: Each of the storage nodes includes a service quality agent; the obtaining of the service pressure data of the plurality of storage nodes in the storage system includes: Sending a pressure data acquisition request to each of the service quality agents; The data fed back by each of the service quality agents is received, and each of the data is determined as the business pressure data of each of the storage nodes.
8. The method according to any one of claims 1 to 6, characterized in that: Each storage node includes a service quality agent; the flow control of business processing of each storage node according to the number of tokens of each node includes: The number of tokens of each node is synchronized to the corresponding quality of service agent, so that each quality of service agent processes the business flow limiting of the corresponding storage node based on the number of tokens of each node.
9. A flow control system, characterized in that: The flow control system includes a storage system, the storage system includes a plurality of storage nodes, each storage node is provided with a service quality agent, and any storage node is also provided with a service quality center; The service quality center is used to determine the number of node tokens of each storage node according to the business pressure data of each storage node and the system service quality configuration value of the storage system, and synchronize the number of node tokens to the corresponding service quality agent; The service quality agent is used to process the business flow limiting of the corresponding storage node based on the number of node tokens sent by the service quality center.
10. A flow control device, characterized in that: The device comprises: A data acquisition module, configured to obtain, in response to a business processing request of the storage system, business pressure data of a plurality of storage nodes in the storage system and a system service quality configuration value of the storage system; A token number determination module, used to determine the number of node tokens of each storage node according to the business pressure data of each storage node and the system service quality configuration value; The flow control module is used to control the flow of business processing on each storage node according to the number of tokens of each node.