Quality of service control method and apparatus, computer device, and readable storage medium
By obtaining the target client's traffic status and bucket traffic usage, the service quality is adaptively adjusted, solving the problem of low processing efficiency caused by cluster anomalies in traditional distributed object storage technology, achieving load balancing and on-demand resource allocation, and improving the processing efficiency and responsiveness of the storage cluster.
Patent Information
- Application Number
- CN202411699282.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-10-14
- Estimated Expiration
- 2044-11-26
AI Technical Summary
Traditional distributed object storage technology can only perform global adjustments when a cluster is abnormal, resulting in low processing efficiency and an inability to effectively coordinate service quality adjustments between multiple storage gateways.
By obtaining the target client's traffic status and bucket traffic usage, the service quality is adaptively adjusted, the service quality control granularity is refined, and the local traffic threshold is dynamically adjusted to achieve load balancing and on-demand resource allocation.
It improves the processing efficiency and responsiveness of the storage cluster, ensures that client business requests are not affected by cluster anomalies, and implements flexible service quality control.
Smart Images

Figure CN119583576B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data storage, and particularly relates to a service quality control method and device, computer equipment, computer readable storage medium and computer program product. BACKGROUND
[0002] With the development of storage technology, distributed object storage technology stores data on multiple storage nodes to achieve high availability, high performance and scalability.
[0003] However, in the traditional distributed object storage technology, a storage gateway is used to process read and write requests sent by a client, and the load balancing function of the storage gateway ensures that the service of each storage bucket is basically consistent. When an exception occurs in the cluster and data needs to be rebalanced, the service quality can only be adjusted globally, and the processing efficiency is low. SUMMARY
[0004] Therefore, it is necessary to provide a service quality control method, device, computer equipment, computer readable storage medium and computer program product to adaptively adjust the service quality and ensure the processing efficiency.
[0005] In a first aspect, the present application provides a service quality control method, which comprises:
[0006] obtaining the traffic of a target client; the traffic of the target client is the data traffic under the original service quality;
[0007] obtaining the traffic state of the target client and the storage bucket traffic usage based on the traffic of the target client; the traffic state indicates the numerical interval in which the traffic of the target client is located, the target client manages the traffic through a storage bucket, and the storage bucket traffic usage indicates the traffic usage of the statistical value of the traffic of the client managed by the storage bucket relative to the target threshold value;
[0008] determining the local traffic threshold corresponding to the target client according to the threshold adjustment mode adapted to the traffic state and the storage bucket traffic usage;
[0009] The local traffic threshold corresponding to the target client is used to control the traffic of the target client, and the local traffic threshold represents the adjusted service quality of the target client.
[0010] In one embodiment, before the traffic state of the target client and the storage bucket traffic usage are obtained based on the traffic of the target client, the method further comprises:
[0011] In the service end of each storage bucket, the address identifier corresponding to each service end is compared, and an address identifier comparison result is obtained.
[0012] According to the address identifier comparison result, a main service end in each service end is determined.
[0013] The target client's traffic state and the storage bucket traffic usage are obtained based on the target client's traffic, including:
[0014] The target client's traffic is sent to the main service end; the main service end is configured to determine the target client's traffic state and the storage bucket traffic usage based on the target client's traffic.
[0015] In one embodiment, the target client's traffic state and the storage bucket traffic usage are obtained based on the target client's traffic, including:
[0016] The target client's traffic in a period is compared with an original local traffic threshold value; if greater, the target client's traffic state is determined to be a congestion state; if less, the target client's traffic state is determined to be a non-congestion state.
[0017] In the case that the target client's traffic in a period is less than a preset threshold value, the target client's traffic state is determined to be a non-active state; the preset threshold value is less than the original local traffic threshold value.
[0018] The traffic of the storage bucket managed clients in the same period is accumulated to obtain a traffic statistical value of the storage bucket; based on the ratio of the traffic statistical value to the target threshold value, the storage bucket traffic usage is determined.
[0019] In one embodiment, the target client's local traffic threshold value is determined according to the threshold value adjustment mode adapted to the traffic state and the storage bucket traffic usage, including:
[0020] In the case that the traffic state is a congestion state, the traffic difference between the target threshold value and the non-rate limiting traffic of the storage bucket is determined; the non-rate limiting traffic is the traffic of the clients in the congestion state managed by the storage bucket and does not belong to the congestion state.
[0021] According to the number of clients in the congestion state managed by the storage bucket, the traffic difference is allocated to obtain the target client's local traffic threshold value.
[0022] In the case that the traffic state is a non-congestion state, the target client's local traffic threshold value is obtained according to the threshold value adjustment mode adapted to the storage bucket traffic usage.
[0023] In one embodiment, the method further comprises:
[0024] When the traffic state is an inactive state, the target threshold is allocated according to the number of inactive clients managed by the storage bucket to obtain a local traffic threshold of the target client.
[0025] In one embodiment, obtaining the local traffic threshold of the target client according to a threshold adjustment method adapted to the storage bucket traffic usage includes:
[0026] If the traffic usage rate of the storage bucket is greater than the traffic usage rate threshold, lowering the original local traffic threshold of the target client according to the traffic usage rate of the storage bucket to obtain the local traffic threshold of the target client;
[0027] If the traffic usage rate of the storage bucket is less than the traffic usage rate threshold, the original local traffic threshold of the target client is increased according to the traffic usage rate of the storage bucket to obtain the local traffic threshold of the target client.
[0028] In one embodiment, when the local traffic threshold corresponding to the target client is increased, the traffic token of the target client increases the number of tokens at a preset interval until the number of traffic tokens of the target client matches the local traffic threshold.
[0029] In one embodiment, the target client includes a first target client and a second target client, and the priority of the first target client is higher than the priority of the second target client;
[0030] a local traffic threshold corresponding to the first target client, used to allocate the traffic token of the storage bucket as a first traffic token; the first traffic token is used to perform traffic control on the first target client;
[0031] The local traffic threshold corresponding to the second target client is used to allocate the unallocated traffic token as the second traffic token when there is an unallocated traffic token other than the first traffic token in the traffic token of the storage bucket; the second traffic token is used to perform traffic control on the second target client.
[0032] In a second aspect, the present application further provides a service quality control device, the device comprising:
[0033] An acquisition module, configured to acquire the traffic of a target client; the traffic of the target client is the data traffic under the original quality of service;
[0034] a conversion module configured to obtain, based on the traffic of the target client, a traffic status of the target client and a traffic usage rate of a storage bucket; the traffic status indicates a numerical range in which the traffic of the target client is located, the target client performs traffic management through a storage bucket, and the traffic usage rate of the bucket indicates traffic usage of traffic statistics of the client managed by the storage bucket relative to a target threshold;
[0035] An adjustment module is used to determine the local traffic threshold corresponding to the target client based on a threshold adjustment method adapted to the traffic status and the storage bucket traffic usage rate; the local traffic threshold corresponding to the target client is used to perform traffic control on the target client; the local traffic threshold represents the adjusted service quality of the target client.
[0036] In a third aspect, the present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of quality of service control in any of the above embodiments when executing the computer program.
[0037] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of quality of service control in any of the above embodiments.
[0038] In a fifth aspect, the present application further provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of quality of service control in any of the above embodiments.
[0039] The above-mentioned service quality control method, apparatus, computer equipment, computer-readable storage medium and computer program product obtain the traffic status of the target client and the bucket traffic usage rate based on the traffic of the target client, so that the service quality control granularity of the bucket can be refined, and the threshold adjustment method of the service quality can be flexibly used based on the target client. Moreover, since the bucket traffic usage rate is the ratio between the traffic statistics of the bucket and the target threshold, the threshold adjustment method can take into account the global data processing capacity within the bucket and the target client itself; and then control the traffic of the target client according to the local traffic threshold corresponding to the target client. Therefore, adaptive negotiation and dynamic adjustment of local traffic thresholds can form a load balancing, and can assist customers in business management and control, and can also better allocate resources on demand, so that the cluster can efficiently process and respond to customer application requests. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments of the present application or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying any creative work.
[0041] Figure 1 A diagram of an application environment of a service quality control method in one embodiment;
[0042] Figure 2 1 is a flow chart of a method for controlling quality of service in one embodiment;
[0043] Figure 3 1 is a flow chart of a method for controlling quality of service with priority in one embodiment;
[0044] Figure 4 1 is a flow chart of a method for controlling quality of service in one embodiment;
[0045] Figure 5 A schematic diagram of the process of server-side screening and data conversion in one embodiment;
[0046] Figure 6 A schematic diagram of a flow chart for calculating traffic status and bucket traffic usage in one embodiment;
[0047] Figure 7 A schematic diagram of a specific process for calculating traffic status and bucket traffic usage in one embodiment;
[0048] Figure 8 A schematic diagram of a flow chart of local traffic threshold calculation in one embodiment;
[0049] Figure 9 A schematic diagram of a flow chart for calculating the traffic usage rate of a storage bucket in one embodiment;
[0050] Figure 10 Schematic diagram of a local traffic threshold in an inactive state in one embodiment;
[0051] Figure 11 A schematic diagram of a local flow threshold that does not exceed a local flow threshold in one embodiment;
[0052] Figure 12 A schematic diagram of a local traffic threshold adaptively adjusted in one embodiment;
[0053] Figure 13 A schematic diagram of a local flow threshold value in a flow limiting state in one embodiment;
[0054] Figure 14A schematic diagram of a local flow threshold in a blocked state in one embodiment;
[0055] Figure 15 is a structural block diagram of a service quality control device in one embodiment;
[0056] Figure 16 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0057] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0058] Distributed object storage technology is a storage solution that achieves high availability, performance, and scalability by distributing data across multiple storage nodes. Distributed object storage technology includes distributed object storage (DOS), which provides massive data storage services and supports product specifications that can store tens or even hundreds of billions of objects. It is suitable for storing unstructured data such as images, text, audio, and video. In current mainstream video surveillance and big video storage applications, customers are placing increasingly high demands on storage service QoS, which not only addresses storage performance and specifications, but also poses challenges in storage efficiency and adaptive service control.
[0059] A traditional distributed object storage gateway cluster uses a storage gateway to process object read and write requests sent by clients, enabling access to data objects in storage buckets. The load balancing function of the storage gateway ensures that the storage gateway's service for storage bucket requests is essentially the same. When an anomaly occurs in the cluster and data needs to be rebalanced, the only option is to globally adjust the front-end business priority or the back-end data recovery priority. If multiple storage gateways access different storage buckets to handle services of different priorities, the token bucket mechanism can be used to set different thresholds for each gateway, changing the efficiency of each storage gateway's data reading and writing. From the perspective of the cluster, the quality of service of the storage bucket remains unchanged. Therefore, how to coordinate the QoS between multiple storage gateways to adjust the read and write service quality received by different storage buckets so that customers' normal business requests are not affected by cluster anomalies is a task that needs to be solved.
[0060] Optionally, a distributed object storage cluster can be deployed based on the object storage interface gateway (RADOS GateWay, RGW). The gateway can be deployed on a separate server and implemented by running one or more radosgw processes, or it can be deployed on the same node as the data processing service. However, in order to avoid resource competition, the radosgw process is usually chosen for implementation. The customer's actual business connects to the storage cluster through the gateway, and then performs data processing such as reading and / or writing data on the objects in the bucket. Each gateway can connect to one or more different buckets, and identify and distinguish the target buckets of the business flow through other fields such as the bucket ID. Each bucket can also accept multiple different gateways to perform different types of data reading and writing.
[0061] After cluster deployment is complete, the corresponding network bandwidth resources are essentially fixed. If a created bucket receives too many read and write requests, the corresponding network resources will be used up, impacting the performance of data read and write operations for buckets with relatively high service priorities within the cluster. Furthermore, when network congestion or a cluster failure causes data recovery to occupy more bandwidth, the services of all buckets in the cluster will be affected. Therefore, this embodiment implements adaptive adjustments such as coordination and interaction between multiple gateways by setting the quality of service for the buckets, enabling better on-demand allocation of execution resources.
[0062] The service quality control method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown, computer devices form a distributed network through a network, and each computer device can be a gateway or a control device of a gateway. This embodiment can be executed by a gateway, or can be implemented by forming a cluster of gateways or threads within the gateway.
[0063] Quality of Service (QoS) refers to the technology that provides different service levels for different types of traffic flows. Through QoS control, traffic flows that are sensitive to bandwidth, input / output operations per second (IOPS), and latency can be given higher priority, ensuring that the service meets users' needs for normal, high-performance usage. Optionally, configurable QoS information can include four types of traffic information: read / write bandwidth and read / write operations per second.
[0064] Optionally, in a distributed storage cluster, the basic storage unit for data storage is a bucket, which can store various types of data, including images, audio, video, etc.
[0065] Optionally, the components of the storage bucket include a quality of service client (QoS-Client, QC) and a quality of service server (QoS-Serve, QS); the quality of service client and the quality of service server can both be threads, for example, the quality of service client can be an object storage interface gateway, and the object storage interface gateway is the interface for the distributed object storage to provide object storage services to the outside world.
[0066] Optionally, the service quality client is the execution entity for performing traffic statistics on the gateway; optionally, the service quality client is used to transmit the traffic situation of the node gateway, the gateway status, and the user-set bucket service quality to the bucket server to perform traffic statistics on the bucket.
[0067] Optionally, the server is used to summarize the traffic statistics and status information reported by all QCs in each cycle, and calculate the bucket traffic usage rate; the bucket traffic usage rate can be the difference between the total data traffic of the bucket in the cycle and the target threshold, and the difference value can be a ratio or a percentage, and the difference value can also be the result obtained by adjusting the difference or ratio between the total traffic and the target threshold.
[0068] Optionally, the QoS client can also manage traffic flow through traffic buckets, namely traffic token buckets. Traffic buckets are virtual buckets that manage traffic flow based on the current QoS client's traffic information. They are used to periodically deliver traffic tokens to the QoS client to prevent sudden traffic surges from exhausting the allocated traffic tokens in a short period of time, causing performance jitter.
[0069] Optionally, the main QoS server is globally unique and is elected by the gateway on each node, and the QoS client is the RGW gateway on each node. After the cluster deployment is completed and resources such as storage pools and buckets are created, the QoS client begins to read and / or write objects in the corresponding bucket. The QoS client is responsible for counting the traffic information of the current gateway and reporting the gateway traffic, gateway status, bucket target threshold, etc. to the main QoS server every 5 seconds. The main QoS server aggregates the traffic information of the QoS client, combines whether the gateway is blocked, whether it is limited, and the non-limited traffic of the gateway to calculate the percentage of the total traffic and the bucket target threshold, and then sends the calculated total traffic and bucket traffic usage, the number of inactive gateways, the number of blocked gateways, and other information to each QoS client for update.
[0070] The QoS client calculates its local traffic threshold based on the traffic status of the previous cycle's traffic reported to the primary QoS server and the percentage received from the primary QoS server. The client then updates its traffic bucket information. The traffic bucket assigns a traffic "token" to the corresponding QoS client. The QoS client that receives the token can proceed with its service, while other QoS clients must wait. Each QoS client's local traffic threshold is updated based on the total traffic reported during the current cycle and its current status.
[0071] In an exemplary embodiment, Figure 2 As shown, a service quality control method is provided, which is applied to Figure 1 The computer device in the embodiment is used as an example to illustrate the method, which includes the following steps 202 to 206. Among them:
[0072] Step 202: Obtain the traffic of the target client; the traffic of the target client is the data traffic under the original quality of service.
[0073] The traffic of the target client is data traffic processed by the target client, and the target client is a client controlled by quality of service. Optionally, the traffic of the target client can be data reading traffic through the target client, or data storage traffic through the target client.
[0074] Original Quality of Service (QoS) is a client-level QoS that indicates the degree of traffic restriction for a target client. The original QoS applies to the target client's original local traffic threshold. After traffic is restricted based on the original local traffic threshold, the target client's traffic is the traffic at the original QoS. Before executing steps 204 and 206, traffic control for the target client is based on the original QoS. After step 206, traffic control for the target client is implemented using the adjusted service instructions.
[0075] Optionally, when a network anomaly occurs in the target client or the storage bucket to which the target client belongs, step 206 is not performed, and flow control is continued with the original quality of service.
[0076] In one optional embodiment, obtaining the target client's traffic includes: during the target client's service execution, monitoring the traffic of at least one of data reading and data storage operations via a monitoring thread corresponding to the target client to obtain the traffic of the operation. Thus, the target client's traffic can be at least one of read and write performance, allowing data reading performance and data writing performance to be independently regulated to further refine service quality control and increase flexibility.
[0077] In an optional embodiment, obtaining the target client's traffic includes: monitoring the target client's traffic at a predetermined interval or frequency to obtain the target client's traffic. This forms a traffic monitoring cycle, allowing the target client's traffic to be adjusted based on the applicability of the monitoring cycle, thereby further improving flexibility. The results of the cycle feedback ensure that the adjusted service quality is more suitable for the target client's traffic needs in real time.
[0078] Step 204, based on the traffic of the target client, obtain the traffic status of the target client and the bucket traffic usage rate; the traffic status indicates the numerical range of the traffic of the target client, the target client manages the traffic through the bucket, and the bucket traffic usage rate indicates the traffic usage of the traffic statistics of the client managed by the bucket relative to the target threshold.
[0079] Traffic status is qualitative data related to the target client's traffic, indicating the nature of the target client's traffic. Traffic status is traffic information from the target client's perspective. Optionally, traffic status is a type of traffic information within the current gateway.
[0080] Optionally, the traffic state represents the numerical range of the target client's traffic under the original service quality, thereby enabling more detailed traffic control based on the original service quality. Optionally, the traffic state includes but is not limited to active and inactive states, and blocked and non-blocking states. A client with read and write requests is in an active state, while a gateway without read and write requests is in an inactive state. When the client's traffic exceeds the local original threshold, the gateway where the client is located is in a blocked state, otherwise it is in a non-blocking state.
[0081] Optionally, the traffic status can be used to classify the target client's traffic to form different control methods. Optionally, if the target client's current traffic does not exceed the target client's original local traffic threshold, it is non-limited traffic; if the target client's current traffic exceeds the target client's original local traffic threshold, it is limited traffic. The threshold adjustment methods for non-limited traffic and limited traffic are different.
[0082] Bucket traffic usage is quantitative data related to the traffic managed by the bucket where the target client resides, indicating the bucket's overall traffic usage. Bucket traffic usage provides traffic information from the bucket's perspective. Bucket traffic usage is defined relative to the target threshold. Therefore, the execution conditions of the threshold adjustment method can be adjusted based on the target threshold, allowing for more detailed and adaptable adjustments to the original local traffic threshold.
[0083] The bucket traffic usage rate indicates the traffic usage of the traffic statistics of the clients managed by the bucket relative to the target threshold. Optionally, the bucket traffic usage rate is the ratio of the traffic statistics to the target threshold, or the processed result of the difference.
[0084] The target threshold is the traffic threshold used for traffic management in a bucket. A target threshold is set for a specific bucket through a command. A bucket's target threshold must be greater than or equal to the client's local traffic threshold to reflect bucket-level traffic information. Optionally, target thresholds can be set for different items. For example, target thresholds can be set for read / write IOPS, read / write bandwidth, and other items. You can set a single target threshold or multiple targets simultaneously.
[0085] Traffic statistics are traffic statistics for the clients managed by the bucket. A bucket can manage multiple clients, including the target client. Optionally, traffic statistics can be the cumulative traffic value for each client managed by the bucket within the same period, or the cumulative traffic value for a subset of clients managed by the bucket within the same period.
[0086] In an optional embodiment, based on the traffic of the target client, the traffic status of the target client and the bucket traffic usage rate are obtained, including: sending the traffic of the target client to a server for service quality control, and the server determining the traffic status of the target client based on the traffic of the target client; the server obtaining the bucket traffic usage rate based on the traffic of the target client and the traffic of clients belonging to the same bucket as the target client; and then the server sending the traffic status of the target client and the bucket traffic usage rate to the target client.
[0087] In an optional embodiment, based on the traffic of the target client, the traffic status of the target client and the traffic usage of the bucket are obtained, including: when the target client acts as a server, based on the traffic of the target client, determining the traffic status of the target client; obtaining the traffic of other clients from other clients that manage data in the bucket; and determining the traffic usage of the bucket based on the data traffic managed by the bucket and the target threshold.
[0088] Step 206, determine the local traffic threshold corresponding to the target client based on the threshold adjustment method adapted to the traffic status and bucket traffic usage; wherein, the local traffic threshold corresponding to the target client is used to control the traffic of the target client; the local traffic threshold represents the adjusted service quality of the target client.
[0089] The threshold adjustment mode is a calculation mode for adjusting the adaptive change of the quality of service. Since the traffic state is client-level data, which is equivalent to local data, and the bucket traffic usage is bucket-level data, which is equivalent to global data, the threshold adjustment mode is an adaptive change based on local data and global data.
[0090] The local traffic threshold is an adjusted local traffic threshold, which is used to control the traffic of the target client after adjustment. Since the target client is used for traffic control, the local traffic threshold represents the adjusted quality of service of the target client, so that the quality of service of the target client is quantified. Optionally, under different adjustment modes, the local traffic threshold can be re-determined, or can be obtained based on the original local traffic threshold adjustment.
[0091] In an optional embodiment, determining the local traffic threshold corresponding to the target client according to the threshold adjustment mode adapted to the traffic state and the bucket traffic usage comprises: obtaining the threshold adjustment mode according to the mapping of the traffic state and the bucket traffic usage; determining the local traffic threshold corresponding to the target client according to the data required by the threshold adjustment mode and the function of the threshold adjustment mode.
[0092] In an optional embodiment, determining the local traffic threshold corresponding to the target client according to the threshold adjustment mode adapted to the traffic state and the bucket traffic usage comprises: determining whether to use the bucket traffic usage to determine the threshold adjustment mode according to the traffic state; if yes, determining the threshold adjustment mode based on the bucket traffic usage, and determining the local traffic threshold corresponding to the target client through the threshold adjustment mode; if no, determining the threshold adjustment mode based on the traffic state, and determining the local traffic threshold corresponding to the target client through the threshold adjustment mode. Thus, since the traffic state is qualitative data and local data, the processing efficiency is relatively high, and therefore, the condition is first determined through the traffic state, and then the corresponding threshold adjustment mode is selected, which can guarantee that the selection efficiency is relatively high, so as to improve the speed of adaptive adjustment.
[0093] In an exemplary embodiment, as Figure 3As shown, the target clients are QC-1, QC-2 and QC-N respectively; QC-1, QC-2 and QC-N perform traffic statistics of service read and write respectively, and report traffic information and state information to the corresponding server QS; the server aggregates the traffic information to obtain the storage bucket traffic usage, and feeds back the corresponding storage bucket traffic usage to QC-1, QC-2 and QC-N. QC-1, QC-2 and QC-N respectively exist their own traffic channels to distribute traffic tokens, and process read and write tasks through their own traffic tokens. In the case that the priority of QC-N is low, no traffic token is allocated to QC-N until the service processing of QC-1 or QC-2 with higher priority is completed.
[0094] In the above quality of service control method, the traffic state of the target client and the storage bucket traffic usage are obtained based on the traffic of the target client, so that the quality of service control granularity of the storage bucket is refined, the threshold adjustment mode of the quality of service can be flexibly used based on the target client, for example, the quality of service strategy is dynamically adjusted based on factors such as importance of objects, access frequency, data processing priority, etc. Moreover, since the storage bucket traffic usage is the ratio between the traffic statistics value of the storage bucket and the target threshold, the threshold adjustment mode can take into account the global within the storage bucket and the data processing capability of the target client itself; and then the target client is controlled according to the local traffic threshold corresponding to the target client. Thus, adaptive negotiation and dynamic adjustment of the local traffic threshold can form a kind of load balancing, and can assist the customer to well manage the business, and can better allocate resources on demand, so that the cluster can efficiently process and respond to the application request of the customer.
[0095] In an exemplary embodiment, as shown in Figure 4 Before obtaining the traffic state of the target client and the storage bucket traffic usage based on the traffic of the target client, the method includes steps 402 to 404, and correspondingly, obtaining the traffic state of the target client and the storage bucket traffic usage based on the traffic of the target client includes step 406. Wherein:
[0096] Step 402, in the server of each storage bucket, comparing the address identifier corresponding value of each server to obtain the address identifier comparison result.
[0097] The server is a component of the storage bucket, which can be a thread, a process or another computer device different from the computer device 102. Optionally, the server is a quality of service server set for one or more storage buckets, which can aggregate the traffic information of the quality of service client, and determine the traffic state of the target client in combination with whether the target client is blocked, whether the target client is throttled, and the non-throttled traffic of the target client.
[0098] The address identifier of the server can be used to identify the server in order to call the server. Optionally, when the server is a thread, process, or computer device, the address identifier may include an IP address; and when the server is a thread or process, the address identifier may include an IP address and may also include a thread identifier or a process identifier.
[0099] Alternatively, the server's address identifier value can be the server's address identifier itself. If distributed gateways are centralized in the same area, the server's address identifier value can also be the value of a specific network segment. In this case, the address identifier value is relatively small, making the comparison process faster. For example, if a server's IP address is 192.168.46.55, the value of the network segment 55 can be used as the server's address identifier value.
[0100] The address identifier comparison result is a sorting result of the numerical values corresponding to the address identifiers. Optionally, the maximum value, the minimum value, or the size sequence of the numerical values corresponding to the address identifiers can be determined through the address identifier comparison result.
[0101] Step 404: Determine the master server among the servers based on the comparison result of the address identifiers.
[0102] A master server is a server selected from the server pool. It determines the traffic status and bucket traffic usage for each client, including the target client. The servers of other clients maintain communication and information synchronization with the master server, allowing it to be re-determined as the master server in the event of a master server anomaly.
[0103] Optionally, if the cluster has only one storage bucket for a gateway node, no additional election is required, and the server contained in the storage bucket of this node is directly defaulted as the primary server, and step 202 is executed. Optionally, if the cluster has multiple gateway nodes and the primary server fails, the server on the gateway node with the second smallest IP address will take over the information of the failed server and continue to perform the service quality control statistics task, and step 202 is executed.
[0104] In an optional embodiment, in the server of each storage bucket, the values corresponding to the address identifiers of each server are compared to obtain an address identifier comparison result, including: the client begins to elect a server for the storage bucket; multiple gateway processes on the same node select the gateway process with the smallest process number to vote, and obtain the address identifier with the smallest process number; within each storage bucket, the address identifier with the smallest process number is used as the server of each storage bucket; the IP addresses of the gateways where each storage bucket is located are compared to obtain the server with the smallest IP address in each storage bucket;
[0105] Correspondingly, according to the comparison result of the address identifiers, a master server among the servers is determined, including: taking the server with the smallest IP address as the master server among the servers.
[0106] Step 406: Send the traffic of the target client to the main server; the main server is used to determine the traffic status of the target client and the traffic usage rate of the bucket based on the traffic of the target client.
[0107] Optionally, the main server is used to compare the traffic of the target client within the period with the original local traffic threshold; if it is greater, the traffic state of the target client is determined to be a blocking state; if it is less than, the traffic state of the target client is determined to be a non-blocking state.
[0108] Optionally, the main server is configured to determine that the traffic state of the target client is an inactive state when the traffic of the target client within a period is less than a preset threshold.
[0109] Optionally, the main server is used to accumulate the traffic of the clients managed by the bucket in the same period to obtain the traffic statistics of the bucket; and determine the traffic usage of the bucket based on the ratio of the traffic statistics to the target threshold.
[0110] Optionally, when the traffic status and bucket traffic usage of the target client are determined by the main server, the traffic status and bucket traffic usage of the target client can be fed back to the gateway or node where the target client is located, so that the target client obtains its own traffic status and bucket traffic usage, and then continues to execute steps 204 and 206.
[0111] In an exemplary embodiment, Figure 5 As shown in the figure, the client is the QC and the server is the QS. Accordingly, a gateway node may be configured with one or more gateway processes, each with a different process ID. After the gateway node starts, the gateway acting as the QC will begin a QS election and voting process. Multiple gateway processes on the same node select the gateway with the lowest process ID for voting, and by default, this node will be the primary QS. When gateway processes on other nodes start, they will also first vote for themselves, then exchange votes with gateways other than this node. If a gateway with a lower IP address is found, it will vote for the gateway with the lower IP address, and this process continues until the gateway with the lowest IP address is selected as the primary QS. The QSs on other nodes maintain communication and information synchronization with the primary QS. If the gateway cluster has only one gateway node, no additional election is required; this node is the default primary QS. If the cluster has multiple gateway nodes and the primary QS fails, the QS on the gateway with the next lowest IP address will take over the failed QS's information and continue to perform QoS tasks.
[0112] In this embodiment, the master server is selected from each server by the numerical value corresponding to the address identifier. When the original master server is abnormal, a new master server can be selected efficiently and accurately to ensure the stability of the cluster where each bucket is located. Moreover, the data of different buckets can be aggregated to the same master server, so that this master server and other servers perform different tasks. Therefore, its operation stability is relatively high, and it can run the corresponding tasks in a targeted manner. In this case, the traffic status and storage bucket traffic usage rate are determined by the master server, and then the target client obtains its own traffic status and storage bucket traffic usage rate, which can ensure processing efficiency and stability.
[0113] In an exemplary embodiment, Figure 6 As shown, based on the traffic of the target client, obtaining the traffic status of the target client and the traffic usage rate of the bucket includes at least one of steps 602 and 604, and step 606, wherein:
[0114] Step 602, compare the target client's traffic within the period with the original local traffic threshold; if greater, determine the target client's traffic state is blocked; if less, determine the target client's traffic state is non-blocked.
[0115] The original local traffic threshold is the traffic threshold assigned to the target client under the original quality of service. When the target client's traffic exceeds the original local traffic threshold, the target client's traffic is placed in a blocking state with a relatively large traffic limit. When the target client's traffic falls below the original local traffic threshold, the target client's traffic is placed in a non-blocking state with a relatively small traffic limit.
[0116] The local traffic threshold for a target client in a blocked state and other clients in a blocked state is determined based on the unrestricted traffic, the target threshold, and the corresponding threshold adjustment method. Conversely, the local traffic threshold for a target client in a non-blocked state is determined based on the traffic usage of the target client's bucket and the corresponding threshold adjustment method.
[0117] In an optional embodiment, comparing the target client's traffic flow within a period with the original local traffic threshold includes comparing the target client's traffic flow value within the same period with the original local traffic threshold. Thus, performing a comparison for each period helps improve flexibility and accuracy.
[0118] In an alternative embodiment, the comparing the traffic of the target client in the period with the original local traffic threshold comprises: comparing the traffic of the target client in multiple periods with the original local traffic threshold; wherein the traffic of the target client is counted separately in each period. Thus, by comparing separately in multiple periods, it helps to reduce the same resource and improve processing efficiency.
[0119] In an alternative embodiment, the determining the traffic state of the target client as the congestion state comprises: determining the value corresponding to the traffic state field of the target client as the value used to represent the congestion state.
[0120] In an alternative embodiment, the determining the traffic state of the target client as the congestion state comprises: recording the identification of the target client into a table used to represent the congestion state.
[0121] In an alternative embodiment, the determining the traffic state of the target client as the non-congestion state comprises: recording the identification of the target client into a table used to represent the non-congestion state.
[0122] Step 604, in the case that the traffic of the target client in the period is less than the preset threshold, determining the traffic state of the target client as the non-active state; the preset threshold is less than the original local traffic threshold.
[0123] The preset threshold is a preset reference value used to determine whether the target client exists traffic transmission. Alternatively, in the case that the traffic of the target client in the period is less than the preset threshold, the traffic of the target client can be regarded as 0, and at this time, the traffic state of the target client is the non-active state.
[0124] The target client in the non-active state can determine its corresponding local traffic threshold based on the number of clients in each non-active state, the target threshold and the corresponding adjustment mode.
[0125] In an alternative embodiment, the determining the traffic state of the target client as the non-active state comprises: recording the identification of the target client into a table used to represent the non-active state.
[0126] In an alternative embodiment, the determining the traffic state of the target client as the non-active state comprises: determining the value corresponding to the traffic state field of the target client as the value used to represent the non-active state.
[0127] Step 606, accumulating the traffic of the clients managed by the storage bucket in the same period to obtain a traffic statistical value of the storage bucket; determining the storage bucket traffic usage rate based on the ratio of the traffic statistical value to the target threshold.
[0128] In an alternative embodiment, the traffic of the clients managed by the bucket in the same period is accumulated to obtain the traffic statistical value of the bucket, comprising: for the bucket for managing the target client, the traffic of each client managed by the bucket in the same period is accumulated by the server to obtain the traffic statistical value of the bucket in the period. Thus, the server manages the bucket to which the server belongs.
[0129] In an alternative embodiment, the traffic of the clients managed by the bucket in the same period is accumulated to obtain the traffic statistical value of the bucket, comprising: for the bucket for managing the target client, the traffic of each client managed by the bucket in the same period is accumulated by the server to obtain the traffic statistical value of the bucket in the period. Thus, the server manages the bucket to which the server belongs.
[0130] In an exemplary embodiment, as shown in Figure 7 If all the clients have not started to execute read-write requests after the cluster deployment is completed, each client belongs to an inactive state, and the initial value of the local traffic threshold corresponding to each client is the target threshold of the bucket / the total number of clients. If the cluster has read and written for a period of time, and then the user sets the target threshold of a certain bucket, all the clients statistically average the traffic according to the period 5s, and report the statistical value to the master server. When the server first receives the reporting information of the client, the state record of each client in the gateway node is determined, the reported traffic is accumulated, and whether the gateway node is active, whether the traffic is blocked, and the non-throttling traffic of the gateway are statistically determined. The judgment rule is: if the traffic reported by the client is 0, it means that the gateway has not accepted read-write in the last period and is in an inactive state, the count is accumulated, otherwise the gateway is in an active state; if the traffic reported by the client is greater than the current local traffic threshold of the client, it means that the traffic exceeds the limit, the gateway will be marked as a blocked state, and the count will also be accumulated; if the traffic reported by the client does not exceed the local traffic threshold, it will not be throttled, and the server accumulates the reported traffic as non-throttling information for statistics.
[0131] Then the master server calculates the total traffic value and the percentage of the target threshold of the bucket, and then returns the total traffic value, the percentage value, the number of currently inactive gateways, the number of traffic blocked gateways, and other information to each client. The client calculates the local traffic threshold according to the returned information and the state of the last reporting of the gateway.
[0132] In this embodiment, when traffic is in a blocked or unblocked state, the threshold adjustment method is dynamically selected based on whether the traffic exceeds the original local traffic threshold, ensuring that the traffic within the period reaches the corresponding maximum value. In the case of an inactive state, the threshold adjustment method is dynamically selected based on the relatively low traffic state. Traffic statistics are accumulated within the same period, and the bucket traffic usage rate is determined based on the corresponding ratio, which helps improve processing efficiency and more effectively manage large-scale clients.
[0133] In an exemplary embodiment, Figure 8 As shown, the local traffic threshold corresponding to the target client is determined based on the threshold adjustment method adapted to the traffic status and bucket traffic usage, including:
[0134] Step 802 , when the traffic state is a blocking state, determine the traffic difference between the target threshold and the non-limited traffic of the bucket; the non-limited traffic is the traffic of the client that is not in the blocking state and is traffic-managed through the bucket.
[0135] In an optional embodiment, determining the flow difference between the target threshold and the non-limited flow of the storage bucket includes: calculating a difference between the target threshold and the non-limited flow of the same storage bucket in the same period, and using the difference as the flow difference.
[0136] In an optional embodiment, determining the flow difference between the target threshold and the non-limited flow of the bucket includes: determining the difference between the target threshold and the non-limited flow of the bucket; determining an absolute value of the difference; and using the absolute value as the flow difference.
[0137] Step 804 : Allocate the traffic difference according to the number of clients in the blocked state managed by the bucket to obtain a local traffic threshold of the target client.
[0138] The number of clients is the number of clients in the Blocked state that are managed by the same bucket as the target client in the Blocked state.
[0139] In an optional embodiment, the traffic difference is allocated according to the number of clients in a blocked state managed by the storage bucket to obtain the local traffic threshold of the target client, including: dividing the traffic difference by the number of clients in a blocked state managed by the storage bucket to obtain the local traffic threshold of the target client.
[0140] In an optional embodiment, the local traffic threshold of the target client is obtained by distributing the traffic difference according to the number of clients in the blocked state managed by the storage bucket, comprising: determining the priority of the client in the blocked state managed by the storage bucket; and distributing the traffic tokens adapted by the traffic difference according to the priority of the client to obtain the local traffic threshold of the target client.
[0141] In step 806, the local traffic threshold of the target client is obtained according to the threshold adjustment mode adapted by the storage bucket traffic usage rate in the case of the traffic state being the non-blocked state.
[0142] In an optional embodiment, the local traffic threshold of the target client is obtained according to the threshold adjustment mode adapted by the storage bucket traffic usage rate, comprising: mapping the storage bucket traffic usage rate to obtain the local traffic threshold of the target client.
[0143] In this embodiment, the traffic state is first judged to form a qualitative judgment, and the storage bucket traffic usage rate is determined for adjustment in the case of being unable to use the traffic state to form a quantitative adjustment, thereby the processing efficiency can be guaranteed. In the case of the target client being in the blocked state, the traffic difference is allocated to the client in the blocked state, which can realize the traffic adaptation of the target client in the blocked state while avoiding the influence on the client in the non-blocked state.
[0144] In an optional embodiment, the method further comprises: in the case of the traffic state being the non-active state, distributing the target threshold according to the number of clients in the non-active state managed by the storage bucket to obtain the local traffic threshold of the target client.
[0145] In an optional embodiment, the local traffic threshold of the target client is obtained by distributing the target threshold according to the number of clients in the non-active state managed by the storage bucket, comprising: for the storage bucket for data management of the target client, the target threshold is mean processed by the number of clients in the non-active state managed by the storage bucket to obtain a mean result; and the mean result is taken as the local traffic threshold of the target client.
[0146] In an optional embodiment, the local traffic threshold of the target client is obtained by distributing the target threshold according to the number of clients in the non-active state managed by the storage bucket, comprising: the service end of the storage bucket for data management of the target client divides the target threshold of the storage bucket by the number of clients in the non-active state managed by the storage bucket to obtain a ratio result; and the ratio result is taken as the local traffic threshold of the target client.
[0147] In the embodiment, when the traffic state of the target client is the non-active state, the target threshold is allocated using the number of clients in the non-active state, so that the local traffic threshold of the non-active state in this period is relatively high, and the target client in the non-active state can provide higher traffic when processing data. Since the target client in the non-active state has relatively less traffic in the last period, even if the local traffic threshold allocated to the target client is relatively high, the influence on the threshold of the storage bucket is relatively small, and the overall processing efficiency of the storage bucket will not be affected.
[0148] In an optional embodiment, the local traffic threshold of the target client is obtained according to the threshold adjustment mode adapted to the storage bucket traffic usage, including: if the storage bucket traffic usage is greater than the traffic usage threshold, the original local traffic threshold of the target client is adjusted downward according to the storage bucket traffic usage to obtain the local traffic threshold of the target client; if the storage bucket traffic usage is less than the traffic usage threshold, the original local traffic threshold of the target client is adjusted upward according to the storage bucket traffic usage to obtain the local traffic threshold of the target client.
[0149] The traffic usage threshold is a usage standard of the storage bucket traffic. In the case that the storage bucket traffic usage is greater than the traffic usage threshold, the data traffic used by the client of the storage bucket exceeds the expected traffic usage threshold; and in the case that the storage bucket traffic usage is less than the traffic usage threshold, the data traffic used by the client of the storage bucket is lower than the expected traffic usage threshold.
[0150] Optionally, the traffic usage threshold is 100% or 1; optionally, if the storage bucket traffic usage is greater than 1, the original local traffic threshold of the target client is divided by the storage bucket traffic usage to obtain the local traffic threshold of the target client, so as to adjust the original local traffic threshold downward; if the storage bucket traffic usage is less than 1, the original local traffic threshold of the target client is divided by the storage bucket traffic usage to obtain the local traffic threshold of the target client, so as to adjust the original local traffic threshold upward.
[0151] Optionally, from the perspective of the period, the original local traffic threshold is the local traffic threshold of the last period; on this basis, since the storage bucket traffic usage can be greater than 100% or less than 100%, it can be decreased or increased by percentage, and the expression is as follows:
[0152] The current local traffic threshold = the local traffic threshold of the last period / Ratio; wherein, Ratio is the storage bucket traffic usage.
[0153] In this embodiment, the bucket traffic usage rate is used to determine the adjustment method of the original local traffic threshold and to adjust the original local traffic threshold. As a result, the amount of data used for processing is relatively small, which helps improve processing efficiency.
[0154] In an optional embodiment, when the local traffic threshold corresponding to the target client is increased, the traffic token of the target client increases the number of tokens at a preset interval until the number of traffic tokens of the target client matches the local traffic threshold.
[0155] The preset interval is used to slow down the increase of traffic tokens for the target client to avoid a sudden increase in traffic that causes the target client's allocated traffic to be exhausted in a short period of time and causes performance jitter. Optionally, the preset interval can be a time length, a number of cycles, or other data.
[0156] The token count is the number of traffic tokens added to the target client at each preset interval. The token count can be determined based on a local traffic threshold to improve processing efficiency.
[0157] For example, after obtaining the local traffic threshold of the target client, traffic is delivered to the traffic bucket of the target client at intervals of 10 ms, and the amount delivered each time is the local traffic threshold / 1000.
[0158] In an optional embodiment, the traffic token of the target client increases the number of tokens at a preset interval until the number of traffic tokens of the target client matches the local traffic threshold, which means that the process of the computer device delivers the number of tokens to the traffic bucket of the target client at a preset interval until the number of traffic tokens contained in the traffic bucket of the target client matches the local traffic threshold, and then stops delivering the number of tokens.
[0159] In this embodiment, when the local traffic threshold is increased, in order to prevent a sudden increase in traffic from exhausting the traffic allocated to the target client in a short period of time and causing performance jitter, the number of traffic tokens is gradually increased at preset intervals until the number of traffic tokens of the target client matches the local traffic threshold. This allows the actual traffic threshold of the target client to match the increased local traffic threshold. Thus, by adaptively adjusting the local traffic threshold, performance jitter can be avoided for the target client.
[0160] In an optional embodiment, the target client includes a first target client and a second target client, and the priority of the first target client is higher than the priority of the second target client;
[0161] The local traffic threshold corresponding to the first target client, used for allocating the traffic token of the storage bucket as a first traffic token; the first traffic token, used for performing traffic control on the first target client;
[0162] The local traffic threshold corresponding to the second target client, used for allocating the unallocated traffic token as a second traffic token when the traffic token of the storage bucket has unallocated traffic tokens other than the first traffic token; the second traffic token, used for performing traffic control on the second target client.
[0163] The first traffic token is a traffic token allocated prior to the second traffic token, so when the first target client has exhausted the traffic token of the storage bucket, there is no unallocated traffic token, and at this time, there is no second traffic token, and the second target client has no corresponding traffic.
[0164] In the embodiment, by setting the quality of service of the storage bucket, the first target client and the second target client with different priorities are formed, and the network resource allocation can be dynamically adjusted according to the priorities of different objects or requests. The flexibility can ensure that the key tasks are processed in priority, and the network resources are fully utilized, and the overall efficiency of the system is optimized.
[0165] In one example embodiment, as shown in Figure 9 The client is QC, the corresponding server is QS, the storage bucket traffic usage is a percentage value, the storage bucket traffic usage is Ratio, the traffic usage threshold is 100%, the original local traffic threshold is the local traffic threshold of the last period, and the local traffic threshold of the target client is calculated as shown in Figure 9
[0166] When QC receives the percentage value, the number of non-active QCs, the number of blocked QCs, and the non-throttled traffic returned by QS, the target QC calculates the local traffic threshold of the target QC, and the calculation method is as follows:
[0167] If the target QC is in a non-active state, the local traffic threshold is the storage bucket target threshold / non-active gateway number.
[0168] If the traffic reported by the target QC does not exceed the original local traffic threshold in the last period, it indicates that the target QC is not throttled.
[0169] If Ratio >= 100%, the local traffic threshold of QC is decreased by the percentage based on the local traffic threshold of the last period, i.e., the local traffic threshold of the current period = the local traffic threshold of the last period / Ratio.
[0170] If Ratio<=100%, the local traffic threshold of QC is increased by percentage based on the local traffic threshold of the last period, i.e. the local traffic threshold of the current period = the local traffic threshold of the last period / Ratio, and the obtained local traffic threshold cannot exceed the target threshold of the bucket. Alternatively, if the local traffic threshold is greater than the target threshold, it is adjusted to the target threshold.
[0171] In the last period, if the traffic reported by the target QC exceeds the local traffic threshold of the last period, the target QC is throttled, the blocking state is recorded, and the local traffic threshold of the current period = (the target threshold of the storage bucket - the non-throttled traffic) / the number of blocking gateways.
[0172] In addition, in order to avoid the performance jitter caused by the fact that the traffic tokens allocated by QC are exhausted in a short time due to traffic burst, the target QC delivers traffic to the target QC at an interval of 10ms through the corresponding traffic token bucket, and the delivery amount each time is the local traffic threshold corresponding to the target QC / 1000.
[0173] In a specific embodiment, after the cluster deployment is completed, three gateway nodes are connected, one RGW gateway process is started on each gateway node, there are a total of 3 QCs, which are QC-1, QC-2 and QC-3, and the first gateway node is the master QS after election.
[0174] After creating a storage bucket, the write bandwidth set by the storage bucket is 300MB / s, according to the above process, in the initial state, each QC is in an inactive state, and the corresponding local traffic threshold is 300 / 3=100MB / s; as shown in Figure 10
[0175] Then, it is detected that the user uses two gateway QC-1 and QC-2 to connect the storage bucket for reading and writing, and QC-3 is temporarily not used. It is assumed that the current write bandwidth traffic of QC-1 is 110MB / s, and the current write bandwidth traffic of QC-2 is 90MB / s. After 5s, the statistics and calculation percentage are reported to the QS for statistics and calculation, and the QC receives the returned calculation result and updates the threshold.
[0176] The actual traffic of QC-1 is 110MB / s, which exceeds the corresponding local traffic threshold 100MB / s and is throttled, and the reported state is blocked, and the reported traffic is 100MB / s.
[0177] The actual traffic of QC-2 is 90MB / s, which does not exceed the corresponding local traffic threshold 100MB / s and is not throttled, the reported state is non-blocking, and the reported traffic is the actual 90MB / s, and the non-throttled traffic is recorded as 90MB / s.
[0178] QC-3 is not enabled, the actual traffic is 0, and is not throttled, but the reported traffic state is inactive.
[0179] After receiving the reported information, QS calculates the total traffic as 100 + 90 = 190 MB / s and the percentage as 190 / 300, which is less than 100%. The number of blocked gateways is 1, the number of inactive gateways is 1, and the non-limited traffic is 90 MB / s. This information is then returned to QC.
[0180] QC-1 updates the corresponding local traffic threshold. Because it is limited and blocked, the corresponding local traffic threshold = (bucket target threshold - non-limited traffic) / number of blocked gateways = (300-90) / 1 = 210MB / s.
[0181] QC-2 updates the corresponding local traffic threshold. Since it is not limited, the state is non-blocking, and Rati0 is less than 100%, the corresponding local traffic threshold = the local traffic threshold corresponding to the previous cycle / Ratio = 90 / 190 / 300 = 142 MB / s.
[0182] QC-3 updates the corresponding local traffic threshold: Because QC-3 is not started, the reported traffic is 0 and the status is inactive. The corresponding local traffic threshold = bucket target threshold / number of inactive gateways = 300 / 1 = 300 MB / s.
[0183] After the first update, the local flow threshold of each QC is as follows: Figure 11 shown.
[0184] Next, the local traffic threshold is updated for the second time. QC1 and QC-2 continue to maintain the current write bandwidth for write operations, and QC-3 continues without increasing the traffic.
[0185] The last reported traffic for QC-1 was 100 MB / s. This time, because the actual traffic did not exceed the corresponding local traffic threshold of 210 MB / s, it was not limited and the reported status was non-blocking. Therefore, the reported traffic this time was 110 MB / s.
[0186] The last reported traffic of QC-2 was 90 MB / s. This time, because the actual traffic did not exceed the corresponding local traffic threshold of 142 MB / s, it was not limited and the reported status was non-blocking. Therefore, the reported traffic this time is still 90 MB / s.
[0187] QC-3 is not enabled, the actual traffic is 0, it is not limited, and the reported status is inactive.
[0188] After receiving the reported information, QS calculates the total traffic as 110 + 90 = 200 MB / s, and the calculated percentage is Ratio = 200 / 300, which is less than 100%. The corresponding local traffic threshold of the non-blocking QC needs to be increased, with the blocked gateway being 0 and the inactive gateway being 1. The non-limited traffic is 110 + 90 = 200 MB / s; QS returns the corresponding information to the three QCs.
[0189] Then, QC-1 updates the corresponding local traffic threshold, which is not limited, with a ratio of <100%, and a corresponding local traffic threshold of 110 / (200 / 300) = 150 MB / s; QC-2 updates the corresponding local traffic threshold, which is not limited, with a ratio of <100%, and a corresponding local traffic threshold of 90 / (200 / 300) = 135 MB / s; QC-3 updates the corresponding local traffic threshold, which is not limited, and a corresponding local traffic threshold of 300 / 1 = 300 MB / s.
[0190] From the second adjustment, we can see that even if the flow of each QC remains unchanged, the corresponding local flow threshold will change. Figure 12 shown.
[0191] Then, the third update of the local traffic threshold is performed. QC-3 is enabled, and the write bandwidth of QC-1 is increased to 210 MB / s, and the write bandwidth of QC-2 is increased to 110 MB / s.
[0192] The last reported traffic of QC-1 was 110 MB / s. Because the traffic increased to 210 MB / s, it exceeded the corresponding local traffic threshold of 150 MB / s. Therefore, it was throttled. The current reporting status was blocked and the reported traffic was 150 MB / s.
[0193] The last reported traffic of QC-2 was 90 MB / s. Because the traffic increased to 110 MB / s, it did not exceed the corresponding local traffic threshold of 135 MB / s. Therefore, it was not limited. The current reporting status is non-blocking, and the reported traffic is 110 MB / s.
[0194] After QC-3 is enabled, the last traffic was 0, and this time it is reported as 100MB / s, but it is not limited.
[0195] After receiving the reported information, the QS calculates the total traffic as 150 + 110 + 100 = 360 MB / s. The calculated percentage is Ratio = 360 / 300, which is greater than 100%. The corresponding local traffic threshold of the non-blocking QC is lowered to 1 for blocked gateways and 0 for inactive gateways. The non-limited traffic is 110 + 100 = 210 MB / s. This information is then returned to the QC.
[0196] QC-1 updates the corresponding local traffic threshold and is throttled, Ratio > 100%, corresponding local traffic threshold = (300-210) / 1 = 90MB / s;
[0197] QC-2 updates the corresponding local traffic threshold and is not throttled, but Ratio > 100%, corresponding local traffic threshold = 135 / 360 / 300 = 112.5MB / s;
[0198] QC-3 updates the corresponding local traffic threshold and is not throttled, but Ratio > 100%, corresponding local traffic threshold = 300 / 360 / 300 = 250MB / s, the third update process is as shown in Figure 13
[0199] Further, the fourth update of the local traffic threshold is performed, and all QCs continue to maintain the existing traffic to continue the write operation:
[0200] QC-1 last reported traffic is 150MB / s, because the traffic continues to be 210MB / s, which exceeds the corresponding local traffic threshold 90MB / s this time, so it is throttled, this time the reporting state is blocked, and the reported traffic is 90MB / s.
[0201] QC-2 last reported traffic is 110MB / s, because the traffic continues to be 110MB / s, which does not exceed the corresponding local traffic threshold 110MB / s this time, so it is not throttled, this time the reporting state is not blocked, and the reported traffic is still 110MB / s.
[0202] After enabling QC-3, the last reported traffic is 100MB / s, and since the traffic has not changed, it does not exceed the corresponding local traffic threshold 250MB / s, and is not throttled, this time the reporting state is not blocked, and this time the reporting is 100MB / s.
[0203] The QS receives the reporting information, calculates the total traffic as 90+110+100 = 300MB / s, calculates the percentage as Ratio = 300 / 300, the ratio is equal to 100%, the corresponding local traffic threshold of the non-blocked QC is to be reduced, the blocked gateway is 1, the non-active gateway is 0, and the non-throttled traffic is 110+100 = 210MB / s. And return to the QC.
[0204] QC-1 updates the corresponding local traffic threshold, at this time, QC-1 is throttled, Ratio = 100%, corresponding local traffic threshold = (300-210) / 1 = 90MB / s.
[0205] QC-2 updates the corresponding local traffic threshold, at this time, QC-2 is not throttled, but Ratio = 100%, local threshold
[0206] =112.5 / 300 / 300=112.5MB / s.
[0207] QC-3 updates the corresponding local traffic threshold. At this time, QC-3 is not limited, but Ratio = 100%, and the corresponding local traffic threshold = 250 / 300 / 300 = 250 MB / s.
[0208] It can be seen that after the fourth update, even if the traffic of the QC itself remains unchanged or changes repeatedly, the traffic reported by all QCs is 300MB / s and the bucket target threshold is exactly the same as 300MB / s. The process of the fourth update is as follows: Figure 14 shown.
[0209] In addition, the test description under abnormal circumstances: If the gateway node corresponding to QC-2 has a network abnormality or a node restart, process restart or other failures, the QC-2 reporting process will be abnormal, which may cause the QS message return timeout. QC-2 will continue to use the corresponding local traffic threshold of the current cycle. When the business traffic on QC-2 stabilizes, the traffic will not fluctuate repeatedly.
[0210] If the gateway node where the main QS is located has a network anomaly or the node is restarted, the traffic corresponding to QC-1 changes, and the status also changes. The QS on QC-2 becomes the main QS, and new statistics and calculations are restarted.
[0211] If a new gateway node is connected to the cluster during the business reading and writing process, the QC and the number of QCs corresponding to the gateway node will also increase. The newly added QC needs to reallocate the corresponding local traffic threshold. For the already stable business traffic, there will be a brief fluctuation, but it will soon stabilize.
[0212] Therefore, this example provides a distributed object storage bucket QoS control method that can effectively solve the service quality problem of multiple gateways and multiple storage buckets in distributed object storage, helping customers to better manage business and allocate resources. When network resources are fixed, when the client sends read and write requests to a storage bucket in the cluster through one or more object gateways, it occupies a higher total business bandwidth, causing the business in the higher priority storage buckets connected by other gateways to increase latency due to insufficient bandwidth, affecting business execution. In order to complete higher priority storage bucket business better and faster, you can limit the QoS of other buckets or improve the QoS of the current bucket. The corresponding multiple gateways will automatically coordinate in a short time to allocate bandwidth or IOPS to high priority bucket business.
[0213] Furthermore, the device supports simultaneous configuration of a bucket's read and write bandwidth and read and write IOPS. The object gateway distinguishes and adjusts the corresponding traffic based on the bucket ID and other fields. This ensures that when an object gateway processing a request experiences an anomaly, the bucket's QoS will not experience prolonged jitter due to changes in the gateway topology. Once the gateway traffic stabilizes, the bucket's read and write request traffic also stabilizes. The message notification mechanism helps operations personnel better understand the customer's current network resource allocation and business priorities, assisting customers in addressing resource constraints in a timely manner.
[0214] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed 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 portion of steps or stages in other steps.
[0215] Based on the same inventive concept, embodiments of the present application also provide a service quality control device for implementing the aforementioned service quality control method. The solution provided by this device is similar to the solution described in the aforementioned method. Therefore, the specific limitations in one or more of the following embodiments of the service quality control device can be found in the limitations of the service quality control method above and will not be repeated here.
[0216] In an exemplary embodiment, Figure 15 As shown, a service quality control device is provided, comprising:
[0217] The acquisition module 1502 is configured to acquire the traffic of the target client; the traffic of the target client is the data traffic under the original quality of service;
[0218] The conversion module 1504 is configured to obtain a traffic status of the target client and a traffic usage rate of a storage bucket based on the traffic of the target client; the traffic status indicates a numerical range of the traffic of the target client, the traffic of the target client is managed through a storage bucket, and the traffic usage rate of the bucket indicates the traffic usage of the traffic statistics of the client managed by the storage bucket relative to a target threshold;
[0219] Adjustment module 1506 is used to determine the local traffic threshold corresponding to the target client based on a threshold adjustment method adapted to the traffic status and the bucket traffic usage rate; the local traffic threshold corresponding to the target client is used to perform traffic control on the target client; the local traffic threshold represents the adjusted service quality of the target client.
[0220] In one embodiment, the conversion module 1504 is configured to:
[0221] In the server of each storage bucket, the values corresponding to the address identifiers of each server are compared to obtain an address identifier comparison result;
[0222] Determining a master server among the servers according to the comparison result of the address identifiers;
[0223] The traffic of the target client is sent to the main server; the main server is used to determine the traffic status of the target client and the bucket traffic usage rate based on the traffic of the target client.
[0224] In one embodiment, the conversion module 1504 is configured to:
[0225] Compare the traffic of the target client in the period with the original local traffic threshold; if it is greater than, determine that the traffic state of the target client is a blocking state; if it is less than, determine that the traffic state of the target client is a non-blocking state;
[0226] When the traffic of the target client in the period is less than a preset threshold, determining that the traffic state of the target client is an inactive state; the preset threshold is less than the original local traffic threshold;
[0227] The traffic of the clients managed by the bucket in the same period is accumulated to obtain the traffic statistics value of the bucket; and the traffic usage rate of the bucket is determined based on the ratio of the traffic statistics value to the target threshold.
[0228] In one embodiment, the adjustment module 1506 is configured to:
[0229] When the traffic state is a blocking state, determining a traffic difference between the target threshold and a non-limited traffic of the storage bucket; the non-limited traffic is traffic of a client that is not in a blocking state and is traffic-managed through the storage bucket;
[0230] Allocating the traffic difference according to the number of clients in the blocked state managed by the storage bucket to obtain a local traffic threshold of the target client;
[0231] When the traffic state is a non-blocking state, the local traffic threshold of the target client is obtained according to a threshold adjustment method adapted to the bucket traffic usage.
[0232] In one embodiment, the adjustment module 1506 is configured to:
[0233] When the traffic state is an inactive state, the target threshold is allocated according to the number of inactive clients managed by the storage bucket to obtain a local traffic threshold of the target client.
[0234] In one embodiment, the adjustment module 1506 is configured to:
[0235] If the traffic usage rate of the storage bucket is greater than the traffic usage rate threshold, lowering the original local traffic threshold of the target client according to the traffic usage rate of the storage bucket to obtain the local traffic threshold of the target client;
[0236] If the traffic usage rate of the storage bucket is less than the traffic usage rate threshold, the original local traffic threshold of the target client is increased according to the traffic usage rate of the storage bucket to obtain the local traffic threshold of the target client.
[0237] In one embodiment, when the local traffic threshold corresponding to the target client is increased, the traffic token of the target client increases the number of tokens at a preset interval until the number of traffic tokens of the target client matches the local traffic threshold.
[0238] In one embodiment, the target client includes a first target client and a second target client, and the priority of the first target client is higher than the priority of the second target client;
[0239] a local traffic threshold corresponding to the first target client, used to allocate the traffic token of the storage bucket as a first traffic token; the first traffic token is used to perform traffic control on the first target client;
[0240] The local traffic threshold corresponding to the second target client is used to allocate the unallocated traffic token as the second traffic token when there is an unallocated traffic token other than the first traffic token in the traffic token of the storage bucket; the second traffic token is used to perform traffic control on the second target client.
[0241] Each module in the above-mentioned service quality control device can be implemented in whole or in part through 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 the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.
[0242] 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. Figure 16 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O) and a communication interface. The processor, memory and 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 computer program in the non-volatile storage medium. 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 service quality control method is implemented.
[0243] Those skilled in the art will understand that Figure 16 The 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 shown in the figure, or combine certain components, or have a different component arrangement.
[0244] In one embodiment, a computer device is further provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps in the above method embodiments when executing the computer program.
[0245] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0246] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0247] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant regulations.
[0248] It can be understood by those skilled in the art that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing related hardware through a computer program. 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 above-mentioned embodiments of each method. In the embodiments provided in the present application, any reference to memory, database or other medium can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (Resistive Random Access Memory, ReRAM), magnetoresistive random access memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric memory (Ferroelectric Random Access Memory, FRAM), phase change memory (Phase Change Memory, PCM), graphene memory, etc. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, etc. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (Artificial Intelligence, AI) processor, etc., without being limited thereto.
[0249] Any technical features in the above embodiments can be combined, and for the sake of brevity, not all possible combinations are described above, however, any combination of these technical features is deemed to be within the scope of the present application.
[0250] The above embodiments only express several implementation manners of the present application, and the description is relatively specific and detailed, but it should not be understood as a limitation on the patent scope of the present application. It should be pointed out that, for ordinary skilled persons in the art, several modifications 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 should be subject to the appended claims.
Claims
1. A method for controlling quality of service, characterized in that: The method comprises: Obtaining the traffic of the target client; the traffic of the target client is the data traffic under the original service quality; Based on the traffic of the target client, the traffic status of the target client and the traffic usage rate of the bucket are obtained; the traffic status indicates the numerical range of the traffic of the target client, the target client performs traffic management through the bucket, and the traffic usage rate of the bucket indicates the traffic usage of the traffic statistics of the client managed by the bucket relative to the target threshold; Determining a local traffic threshold corresponding to the target client according to a threshold adjustment method adapted to the traffic state and the storage bucket traffic usage rate; The local traffic threshold corresponding to the target client is used to perform traffic control on the target client; the local traffic threshold represents the adjusted service quality of the target client.
2. The method according to claim 1, characterized in that Before obtaining the traffic status of the target client and the traffic usage rate of the storage bucket based on the traffic of the target client, the method further includes: In the server of each storage bucket, the values corresponding to the address identifiers of each server are compared to obtain an address identifier comparison result; Determining a master server among the servers according to the comparison result of the address identifiers; The acquiring, based on the traffic of the target client, the traffic status of the target client and the traffic usage rate of the storage bucket includes: The traffic of the target client is sent to the main server; the main server is used to determine the traffic status of the target client and the bucket traffic usage rate based on the traffic of the target client.
3. The method according to claim 1, characterized in that The acquiring, based on the traffic of the target client, the traffic status of the target client and the traffic usage rate of the storage bucket includes: Compare the traffic of the target client in the period with the original local traffic threshold; if it is greater than, determine that the traffic state of the target client is a blocking state; if it is less than, determine that the traffic state of the target client is a non-blocking state; When the traffic of the target client in the period is less than a preset threshold, determining that the traffic state of the target client is an inactive state; the preset threshold is less than the original local traffic threshold; The traffic of the clients managed by the bucket in the same period is accumulated to obtain the traffic statistics value of the bucket; and the traffic usage rate of the bucket is determined based on the ratio of the traffic statistics value to the target threshold.
4. The method according to claim 1, wherein The determining, according to a threshold adjustment method adapted to the traffic state and the bucket traffic usage, a local traffic threshold corresponding to the target client includes: When the traffic state is a blocking state, determining a traffic difference between the target threshold and a non-limited traffic of the storage bucket; the non-limited traffic is traffic of a client that is not in a blocking state and is traffic-managed through the storage bucket; Allocating the traffic difference according to the number of clients in the blocked state managed by the storage bucket to obtain a local traffic threshold of the target client; When the traffic state is a non-blocking state, the local traffic threshold of the target client is obtained according to a threshold adjustment method adapted to the bucket traffic usage.
5. The method according to claim 4, characterized in that The method further comprises: When the traffic state is an inactive state, the target threshold is allocated according to the number of inactive clients managed by the storage bucket to obtain a local traffic threshold of the target client.
6. The method according to claim 4, characterized in that The obtaining of the local traffic threshold of the target client according to the threshold adjustment method adapted to the traffic usage of the storage bucket includes: If the traffic usage rate of the storage bucket is greater than the traffic usage rate threshold, lowering the original local traffic threshold of the target client according to the traffic usage rate of the storage bucket to obtain the local traffic threshold of the target client; If the traffic usage rate of the storage bucket is less than the traffic usage rate threshold, the original local traffic threshold of the target client is increased according to the traffic usage rate of the storage bucket to obtain the local traffic threshold of the target client.
7. The method according to claim 1, characterized in that In the case that the local traffic threshold corresponding to the target client is increased, the traffic token of the target client increases in number of tokens according to a preset interval until the number of traffic tokens of the target client matches the local traffic threshold.
8. The method according to claim 1, characterized in that The target client includes a first target client and a second target client, and the priority of the first target client is higher than the priority of the second target client; a local traffic threshold corresponding to the first target client, used to allocate the traffic token of the storage bucket as a first traffic token; The first traffic token is used to perform traffic control on the first target client; The local traffic threshold corresponding to the second target client is used to allocate the unallocated traffic token as the second traffic token when there is an unallocated traffic token other than the first traffic token in the traffic token of the storage bucket; The second traffic token is used to perform traffic control on the second target client.
9. A service quality control device, characterized in that: The device comprises: An acquisition module, configured to acquire the traffic of a target client; the traffic of the target client is the data traffic under the original quality of service; a conversion module configured to obtain, based on the traffic of the target client, a traffic status of the target client and a traffic usage rate of a storage bucket; the traffic status indicates a numerical range in which the traffic of the target client is located, the target client performs traffic management through a storage bucket, and the traffic usage rate of the bucket indicates traffic usage of traffic statistics of the client managed by the storage bucket relative to a target threshold; An adjustment module is used to determine the local traffic threshold corresponding to the target client based on a threshold adjustment method adapted to the traffic status and the storage bucket traffic usage rate; the local traffic threshold corresponding to the target client is used to perform traffic control on the target client; the local traffic threshold represents the adjusted service quality of the target client.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Flow control method and system, server and storage medium
CN110198275A
Flow limiting threshold setting method of service node and server equipment
CN111767142A