Flow control method, device and system
The flow control method dynamically adjusts overload levels and thresholds to manage cluster management system load, reducing bottlenecks and improving stability by selectively rejecting requests.
Patent Information
- Application Number
- CN202311278566.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-06-28
- Filing Date
- 2023-09-28
- Publication Date
- 2024-12-31
AI Technical Summary
Cluster management systems experience overloading, leading to CPU and memory bottlenecks, resulting in slow responses and increased load due to request retries, affecting system stability.
A flow control method that dynamically adjusts overload levels and thresholds based on actual load parameters, allowing for adaptive rejection or response of requests to maintain system stability.
Reduces load on overloaded cluster management systems by selectively rejecting requests, ensuring efficient resource utilization and maintaining system stability.
Smart Images

Figure CN119232652A_ABST
Abstract
Description
[0001] This application claims the priority of the Chinese patent application filed with the China Patent Office on June 28, 2023, with application number 202310777246.9 and application name “A large-scale cluster dynamic flow control back pressure method”, all contents of which are incorporated by reference in this application. Technical Field
[0002] The present application relates to the field of cloud computing technology, and in particular to a flow control method, device and system. Background Art
[0003] With the development of cloud native technology, more and more users use cluster management systems to manage tens of thousands of machines across availability zones. Cluster management systems can be used to schedule, deploy, manage, and expand user applications, accelerating the progress of user applications from development to production. Cluster management systems can provide over-provisioning, process-level resource isolation, etc., which can improve the utilization rate of cluster resources. Cluster management systems can also shield users from hardware details and hardware failures, and provide fault migration capabilities, which can minimize failure time and improve user experience. As the business scale of cluster management systems grows, the cluster management system may be overloaded. When the cluster management system is overloaded, the cluster management system's central processing unit, memory and other resources reach bottlenecks, making the cluster management system respond slowly, which may cause a large number of request retries or system internal retries, increasing the load on the cluster management system and affecting the stability of the cluster management system. Summary of the invention
[0004] The present application provides a flow control method, device and system for improving the stability of a cluster management system.
[0005] In the first aspect, the present application provides a flow control method, which can be applied to a first computing device, or a component (such as a processor, chip, chip system, circuit or other, etc.) configured in the first computing device, or a software module. The first computing device can be, for example, a server, a cloud server, etc., without limitation. Taking the first computing device as the execution subject as an example, the method includes: the first computing device obtains the overload level and flow control threshold of the cluster management system, the overload level and the flow control threshold are determined according to the load parameters of the cluster management system, and the flow control threshold is the maximum number of requests allowed to access the cluster management system; determine the flow control strategy according to the overload level and the flow control threshold; receive a first request, the first request is used to access the cluster management system; according to the flow control strategy, reject or respond to the first request.
[0006] In the above embodiment, the overload level of the cluster management system is determined according to the load parameters of the cluster management system, which can reflect the actual load of the cluster management system. Compared with the scheme of setting the flow control threshold in advance, the embodiment of the present application can dynamically and adaptively adjust the overload level and flow control threshold based on the actual load of the cluster management system, and can avoid the problem of increasing the load of the cluster management system due to unreasonable setting of the flow control threshold in advance. The embodiment of the present application performs flow control on the cluster management system according to the flow control strategy, which can reduce the load of the cluster management system when the cluster management system is overloaded and improve the stability of the cluster management system.
[0007] In one possible implementation, if the overload level is the first level, the number of requests for access to the cluster management system is less than the flow control threshold, and the flow control strategy is to respond to the requests for access to the cluster management system; or, if the overload level is not the first level, the number of requests for access to the cluster management system is greater than or equal to the flow control threshold, and the flow control strategy is to reject some or all requests for access to the cluster management system.
[0008] Through the above implementation, the cluster management system is not overloaded and can respond to requests to access the cluster management system; if the cluster management system is overloaded, some or all of the requests of the cluster management system can be rejected, thereby reducing the load of the cluster management system.
[0009] In a possible implementation, the flow control strategy for rejecting some requests for accessing the cluster management system may specifically be: the flow control strategy is to respond to the first type of request, and reject the first proportion of requests in the second type of request; or the flow control strategy is to respond to the third type of request, reject the second proportion of requests in the fourth type of request, and reject the first proportion of requests in the second type of request. Wherein, the first type of request, the second type of request, the third type of request and the fourth type of request are all requests for accessing the cluster management system, the first type of request, the third type of request and the fourth type of request are all internal requests of the cluster management system, the priority of the third type of request is higher than the priority of the fourth type of request, the second type of request is a request from a user, and the first proportion and the second proportion are determined according to the overload level of the cluster management system.
[0010] The request to access the cluster management system may be a request from the user, or it may be an internal request of the cluster management system, such as a request for interaction between the internal management component of the cluster management system and the application interface service, a heartbeat report, or a scheduling request. These internal requests can be used for self-maintenance of the cluster management system to maintain the normal operation of the cluster management system. When the number of requests to access the cluster management system is greater than or equal to the flow control threshold, rejecting these internal requests may increase the load of the cluster management system and cause the processing capacity of the cluster management system to decrease. Through the above implementation method, when the number of requests to access the cluster management system is greater than or equal to the flow control threshold, the internal request of the cluster management system can be responded to, or the high-priority internal request of the cluster management system can be responded to, so that the self-maintenance of the cluster management system can be maintained, and the problem of reduced processing capacity of the cluster management system due to rejection of these internal requests can be avoided, thereby improving the stability of the cluster management system.
[0011] In one possible implementation, the first computing device rejects or responds to the first request according to the flow control threshold and the flow control policy. Specifically, if the first request is the first type request or the third type request, the first computing device responds to the first request; or if the first request is the second type request or the fourth type request, the first computing device responds to or rejects the first request.
[0012] In one possible implementation, the first computing device may also receive multiple second requests; if each of the multiple second requests is the second type request, requests with the first proportion among the multiple second requests are rejected according to the traffic control policy; or, if each of the multiple second requests is the fourth type request, requests with the second proportion among the multiple second requests are rejected according to the traffic control policy.
[0013] In a possible implementation, the first computing device obtains the overload level and flow control threshold of the cluster management system in a specific manner: the first computing device obtains the load parameters of the cluster management system; and determines the overload level and the flow control threshold according to the load parameters. Optionally, the first computing device determines the overload level and the flow control threshold according to the load parameters in a specific manner: the first computing device predicts the future load condition of the cluster management system according to the load parameters; and determines the overload level and the flow control threshold according to the load parameters and the future load condition of the cluster management system.
[0014] The first computing device takes into account the future load conditions of the cluster management system when determining the overload level and the flow control threshold. This not only allows the cluster management system to be expanded or reduced in capacity based on the future load conditions, but also allows the overload level and the flow control threshold to be reasonably adjusted to reflect the load conditions of the cluster management system.
[0015] In another possible implementation, the first computing device obtains the overload level and flow control threshold of the cluster management system in a specific manner: the first computing device receives the overload level and the flow control threshold. For example, the first computing device receives the overload level and the flow control threshold from the second computing device. In this way, the first computing device can determine the overload level and the flow control threshold by itself, or it can be determined by other computing devices, and the implementation manner is flexible.
[0016] In one possible implementation, the load parameter may include one or more of the following: CPU usage, memory usage, network input / output port usage, disk input / output port usage, resource pressure information of the cluster management system, query rate per second of the cluster management system, application program interface latency, or the number of requests to access the cluster management system.
[0017] In the second aspect, the present application provides another flow control method, which can be applied to a second computing device, or a component (such as a processor, chip, chip system, circuit or other, etc.) configured in the second computing device, or a software module. The second computing device can be, for example, a server, a cloud server, etc., without limitation. Taking the second computing device as the execution subject as an example, the method includes: the second computing device obtains the load parameters of the cluster management system; determines the overload level and flow control threshold of the cluster management system according to the load parameters, and the flow control threshold is the maximum number of requests allowed to access the cluster management system; sends the overload level and the flow control threshold to the cluster management system, so that the cluster management system determines the flow control strategy according to the overload level and the flow control threshold, and rejects or responds to the request to access the cluster management system according to the flow control strategy.
[0018] The second computing device sending the overload level and the flow control threshold to the cluster management system can be replaced by the second computing device sending the overload level and the flow control threshold to the first computing device. The first computing device is deployed in the cluster management system and can be understood as a controller of the cluster management system, etc., without limitation.
[0019] In one possible implementation, the second computing device determines the overload level and the flow control threshold of the cluster management system according to the load parameters. Specifically, the second computing device predicts the future load condition of the cluster management system according to the load parameters; and determines the overload level and the flow control threshold according to the load parameters and the future load condition of the cluster management system.
[0020] In one possible implementation, the load parameters may include one or more of the following: CPU usage, memory usage, network input / output port usage, disk input / output port usage, resource pressure information of the cluster management system, query rate per second of the cluster management system, application program interface latency, or the number of requests to access the cluster management system.
[0021] In a third aspect, the present application provides a flow control device, the flow control device comprising a plurality of functional modules; the plurality of functional modules interact with each other to implement the method described in the first aspect or the second aspect and each possible implementation thereof. The plurality of functional modules may be implemented based on software, hardware, or a combination of software and hardware, and the plurality of functional modules may be arbitrarily combined or divided based on specific implementations.
[0022] In a fourth aspect, the present application provides a flow control system, comprising an apparatus (or computing device) for executing the method described in the above-mentioned first aspect and its various possible implementations, and / or an apparatus (or computing device) for executing the method described in the above-mentioned second aspect and its various possible implementations.
[0023] In a fifth aspect, the present application provides a computing device comprising a memory and at least one processor, wherein the at least one processor calls a program code stored in the memory to execute the method described in the first aspect or the second aspect and its various possible implementation methods.
[0024] In a sixth aspect, the present application also provides a computing device cluster, comprising at least one computing device, each computing device comprising at least one processor and a memory, the processor of the at least one computing device being used to execute the method described in the first aspect or the second aspect and its various possible implementation methods.
[0025] In the seventh aspect, the present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a computing device, the computing device executes the method described in the first aspect or the second aspect and its various possible implementation methods.
[0026] In an eighth aspect, the present application also provides a computer program product, which includes: a computer program (also referred to as code, or instructions), which, when executed by a computing device, enables the computing device to execute the method described in the first aspect or the second aspect and its various possible implementation methods.
[0027] In a ninth aspect, the present application further provides a chip, wherein the chip is used to read a computer program stored in a memory and execute the method described in the first aspect or the second aspect and its various possible implementation methods.
[0028] In the tenth aspect, the present application also provides a chip system, which includes a processor for supporting a computing device to implement the method described in the above-mentioned first aspect or second aspect and its various possible implementation methods.
[0029] In a possible design, the chip system also includes a memory, and the memory is used to store the necessary programs and data of the computing device. The chip system can be composed of a chip, or can include a chip and other discrete devices.
[0030] For the beneficial effects of any of the second to tenth aspects and their possible designs, please refer to the beneficial effects of the first aspect and its various possible designs, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 It is a structural diagram of a cluster management system;
[0032] Figure 2 A schematic diagram of the structure of a cluster management system provided in an embodiment of the present application;
[0033] Figure 3 A schematic diagram of an overload assessment service provided in an embodiment of the present application;
[0034] Figure 4 A flow chart of a flow control method provided in an embodiment of the present application;
[0035] Figure 5 A flow chart of another flow control method provided in an embodiment of the present application;
[0036] Figure 6 A flow chart of another process control method provided in an embodiment of the present application;
[0037] Figure 7 A schematic diagram of the structure of a K8S provided in an embodiment of the present application;
[0038] Figure 8 A schematic diagram of the structure of a K8S API server provided in an embodiment of the present application;
[0039] Fig. 9 A schematic diagram of the structure of a flow control device provided in an embodiment of the present application;
[0040] Fig.10 A schematic diagram of the structure of a computing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0041] The embodiments of the present application will be presented around a system including multiple devices, components, modules, etc. It should be understood that the system may include other devices, components, modules, etc. not mentioned, or may only include some of the devices, components, or modules, etc. mentioned in the embodiments.
[0042] The embodiments of the present application provide a flow control method, device and system for improving the stability of a cluster management system. The method and device described in the present application are based on the same technical concept. Since the method and device solve the problem in a similar way, the implementation of the device and the method can refer to each other, and the repeated parts will not be repeated.
[0043] The term "at least one" in the embodiments of the present application refers to one or more, and "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, wherein any one of a, b, c, ab, ac, bc, or abc can include a single a, a single b, a single c, and can also include multiple a, multiple b, and multiple c.
[0044] Furthermore, unless otherwise specified, ordinal numbers such as "first" and "second" mentioned in the embodiments of the present application are used to distinguish multiple objects, and are not used to limit the order, timing, priority or importance of multiple objects. For example, the first computing device and the second computing device are only used to distinguish different computing devices, and do not indicate the difference in the content, priority or importance of the two computing devices.
[0045] In addition, the terms "including" and "having" in the embodiments, claims and drawings of the present application are not exclusive. For example, a process, method, system, product or device including a series of steps or modules / units is not limited to the listed steps or modules, and may also include steps or modules / units that are not listed.
[0046] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.
[0047] Figure 1 FIG. 1 shows a schematic diagram of the structure of a cluster management system. Figure 1 As shown, the cluster management system can implement management functions for the working node cluster through the management cluster, such as business management, operating system deployment, status monitoring and other management functions. Exemplarily, the management cluster may include an application programming interface server (API server), a controller and a scheduler. The API server can serve as the external interface of the cluster management system, and the client and the working node cluster can access the cluster management system through the API server. The API server can also serve as the internal interface of the cluster management system, and the controller and scheduler in the cluster management system can interact through the API server. For example, the cluster management system can provide its own API internally and externally through a cloud gateway (such as a cloud native gateway), Figure 1 Not shown. Exemplarily, the controller may obtain a request to access the cluster management system through the API server and respond to the request. Exemplarily, the scheduler may schedule the worker nodes in the worker node cluster through the API server. In the embodiment of the present application, the cluster management system may be, for example, kubernetes (abbreviated as K8S) or openStack, etc., without limitation.
[0048] Among them, the working node cluster may include one or more working nodes. Figure 1 In the example, multiple working nodes are taken. Working nodes can be physical machines or virtual machines (VMs), without limitation. For example, working nodes can respond to the scheduling of the scheduler to run container sets, etc. The client can include an application (application, APP) corresponding to the cluster management system, such as a cluster management platform, without limitation. Users can access the cluster management system by operating the APP corresponding to the cluster management system, such as sending a request to the cluster management system through the API server.
[0049] In a possible implementation, data in the cluster management system may be stored in a storage cluster. The storage cluster may include one or more storage nodes. Figure 1 In the example, multiple storage nodes are used. The embodiment of the present application does not limit the specific implementation form of the storage node.
[0050] It should be noted that the embodiments of the present application do not limit the specific division method of the cluster management system. For example, the cluster management system may also include a node management component for implementing the management of working nodes, etc. For another example, at the hardware level, the cluster management system may be implemented by one or more computing devices. The computing device may be an electronic device with computing capabilities such as a server or a cloud server. It is understandable that the embodiments of the present application do not impose any restrictions on the specific type of computing device. For another example, at the component level, the cluster management system may include a central processing unit (CPU), memory, disk input and output (IO) ports, and network IO ports, etc., without limitation.
[0051] At present, with the growth of the business scale of the cluster management system, the cluster management system may be overloaded. Cluster management system overload means that the load of the cluster management system exceeds the maximum processing capacity of the cluster management system. When the cluster management system is overloaded, the CPU, memory and other resources of the cluster management system reach bottlenecks, making the cluster management system respond slowly, which may cause a large number of request retries or system internal retries, increasing the load of the cluster management system and affecting the stability of the cluster management system.
[0052] In view of this, the embodiments of the present application provide a flow control method, device and system, which can adaptively perform flow control according to the load condition of the cluster management system itself, without the need for management personnel to set flow control thresholds in advance, and can improve the stability of the cluster management system.
[0053] Next, a cluster management system provided by an embodiment of the present application is introduced.
[0054] Figure 2 FIG. 1 shows a schematic diagram of the structure of a cluster management system provided by an embodiment of the present application. Figure 2 As shown, the cluster management system can manage the working node cluster through the management cluster. For details, please refer to Figure 1The relevant content will not be repeated here. The client can send a user request to the API server through the cloud native gateway to access the cluster management system. The controller, node management component or scheduler in the management cluster can send a system request (or internal request) to the API server through the cloud native gateway to perform self-maintenance of the cluster management system. The internal request may include, but is not limited to: an access request to the API server itself, a request for system component master election, a request related to health detection, a heartbeat report request for a node, or other system management requests (for example, a request for a controller to create an application, or a request for a node to report the application status, etc.).
[0055] In an embodiment of the present application, the cluster management system may provide an overload estimate service (OES). The overload estimate service may be deployed in a management cluster, for example, by a controller in the management cluster to improve the overload estimate service, without limitation. Exemplarily, the cluster management system may include a collection module and an evaluation module. The collection module and the evaluation module may be used to provide an overload estimate service.
[0056] The acquisition module can be used to collect (or obtain) the load parameters of the cluster management system. Further, the acquisition module can also be used to send the load parameters to the evaluation module. For example, the acquisition module can monitor one or more components in the cluster management system to obtain the load parameters of the cluster management system. One or more components can be, for example, a CPU, a memory, or an IO port, etc., without limitation. Exemplarily, the load parameter may include but is not limited to one or more of the following: CPU usage, memory usage, IO port usage, resource pressure information of the cluster management system, queries per second (QPS) of the cluster management system, API latency, or the number of requests to access the cluster management system. Among them, the IO port may include a network IO port, or include a disk IO port, or include a network IO port and a disk IO port, without limitation. The resource pressure information may be, for example, pressure sallinformation (PSI), without limitation. The number of requests to access the cluster management system may indicate the backlog of the request queue. For example, if the number of requests to access the cluster management system does not exceed a set threshold, the request queue is normal. On the contrary, if the number of requests to access the cluster management system exceeds a set threshold, the request queue is seriously backlogged. The request for accessing the cluster management may be, for example, a request for accessing the cluster management system in the cache, which is not restricted.
[0057] The evaluation module can be used to obtain the load parameters of the cluster management system from the acquisition module, and determine the overload level and flow control threshold of the cluster management system according to the load parameters. Furthermore, the evaluation module can also be used to send the overload level and the flow control threshold to the API server through the cloud native gateway.
[0058] Among them, the overload level can be used to indicate the overload degree of the cluster management system. For example, the larger the overload level, the greater the overload degree of the cluster management system, and vice versa, the smaller the overload level, the smaller the overload degree of the cluster management system or the cluster management system is not overloaded. For example, the overload level is recorded as 0, 1, 2, 3, and 4. When the overload level is 0, the cluster management system is not overloaded (or the cluster management system operates normally), when the overload level is 1, 2, 3 or 4, the cluster management system is overloaded, and when the overload level is 4, the overload degree of the cluster management system is the largest. For another example, the larger the overload level, the smaller the load degree of the cluster management system or the cluster management system is not overloaded, and vice versa, the smaller the overload level, the greater the overload degree of the cluster management system. For example, the overload level is recorded as 0, 1, 2, 3, and 4. When the overload level is 4, the cluster management system is not overloaded, when the overload level is 0, 1, 2 or 3, the cluster management system is overloaded, and when the overload level is 0, the overload degree of the cluster management system is the largest. In the embodiment of the present application, the overload level when the cluster management system is not overloaded is recorded as the first level. In other words, if the overload level is the first level, the cluster management system is overloaded, and if the overload level is not the first level, the cluster management system is overloaded. The flow control threshold is the maximum number of requests allowed to access the cluster management system.
[0059] Exemplarily, the evaluation module can use different evaluation algorithms for different load parameters to obtain multiple overload levels and multiple flow control thresholds. For example, for load parameters such as CPU usage or memory usage, the evaluation module can determine the overload level and flow control threshold according to an adaptive algorithm based on the system load state (for example, a window access limit (WAL) algorithm, etc., without restriction). For example, for load parameters such as resource pressure information or API latency, the evaluation module can determine the overload level and flow control threshold according to an adaptive flow control algorithm based on business health, such as determining the health of the cluster management system according to load parameters such as resource pressure information or API latency, and determining the overload level and flow control threshold according to the health. For example, for load parameters such as request queue backlog, the evaluation module can determine the overload level and flow control threshold according to an adaptive algorithm based on buffer queue congestion detection.
[0060] Furthermore, the evaluation module may determine the final overload level (or global overload level) based on the multiple overload levels, and determine the final flow control threshold (or global flow control threshold) based on the multiple flow control thresholds. For example, the evaluation module may determine the final overload level based on the weight values corresponding to the multiple overload levels; or, when the smaller the overload level, the greater the degree of overload of the cluster management system, the minimum overload level among the multiple overload levels may be determined as the final overload level without restriction. For example, the evaluation module may determine the final flow control threshold based on the weight values corresponding to the multiple flow control thresholds; or, the maximum value or minimum value among the multiple flow control thresholds may be determined as the final flow control threshold without restriction.
[0061] In a possible implementation, the evaluation module may include a prediction submodule and an evaluation submodule, such as Figure 3 The prediction submodule and the evaluation submodule can be used to implement the function of the evaluation module.
[0062] The prediction submodule can be used to obtain the load parameters of the cluster management system from the acquisition module, and predict the future load conditions of the cluster management system based on the load parameters. Furthermore, the prediction submodule can also be used to send the future load conditions of the cluster management system to the evaluation submodule. For example, the prediction submodule can predict the future load conditions of the cluster management system based on the historical load conditions of the cluster management system or a neural network model, such as the system traffic conditions for a set period of time in the future. For example, the prediction submodule can predict the future load conditions of the cluster management system through a time series algorithm. The time series algorithm can be, for example, a prophet algorithm or an autoregressive integrated moving average (ARIMA) algorithm. It should be understood that the embodiments of the present application do not limit the specific implementation method for predicting the future load conditions of the cluster management system.
[0063] The evaluation submodule can be used to obtain the load parameters of the cluster management system from the acquisition module, obtain the future load conditions of the cluster management system from the prediction submodule, and determine the overload level and the flow control threshold value according to the load parameters and the future load conditions of the cluster management system. For example, the prediction submodule uses different evaluation algorithms for different load parameters to obtain multiple overload levels and multiple flow control thresholds, determines the final overload level according to the future load conditions of the cluster management system and the multiple overload levels, and determines the final flow control threshold value according to the future load conditions of the cluster management system and the multiple flow control thresholds. Among them, the use of different evaluation algorithms for different load parameters can be specifically referred to the above content, which will not be repeated. For example, if the overload level indicates that the overload degree of the cluster management system is large and the future load of the cluster management system is large, then the evaluation submodule can determine to expand the management plane components (such as controllers, schedulers, etc.) of the cluster management system, and adaptively adjust the overload level (such as increasing the overload level when the overload degree of the cluster management system is larger when the overload degree is smaller) and / or the flow control threshold value (such as increasing the flow control threshold value, etc.), so that the overload degree of the cluster management system can be alleviated by increasing the resources of the cluster management system, thereby improving the stability of the cluster management system. For another example, if the overload level indicates that the cluster management is not overloaded and the future load of the cluster management system is small, the evaluation submodule can determine to scale down the management plane components of the cluster management system (such as controllers, schedulers, etc.) and adaptively adjust the flow control threshold (such as reducing the flow control threshold, etc.). This can improve resource utilization without affecting the normal operation of the cluster management system.
[0064] Furthermore, after receiving the overload level and flow control threshold, the API server can perform flow control on the cluster management system according to the overload level and flow control threshold. Alternatively, the API server can also send the overload level and flow control threshold to other components (for example, controllers, etc., without limitation), and the other components can perform flow control on the cluster management system according to the overload level and flow control threshold. The embodiments of the present application do not limit the deployment of the execution entity for flow control. Among them, flow control on the cluster management system can also be replaced by: service fuse on the cluster management system.
[0065] For ease of understanding, the execution subject of the flow control of the cluster management system is referred to as the first computing device in the following text. It should be understood that the execution subject of the flow control of the cluster management system can also be a computing device cluster. The first computing device can be deployed in Figure 2 In the management cluster in the illustrated embodiment, for example, the first computing device is an API server, or a controller, etc., without limitation.
[0066] Based on the same technical concept as the above embodiment, the embodiment of the present application provides a flow control method. The method can be applied to a first computing device, or a component (such as a processor, chip, chip system, circuit or other, etc.) configured in the first computing device, or a software module. The following takes the first computing device as an example of the execution subject.
[0067] Figure 4 FIG. 1 is a flow chart of a flow control method provided by an embodiment of the present application. Figure 4 As shown, the method may include the following contents.
[0068] S41: The first computing device obtains the overload level and flow control threshold of the cluster management system.
[0069] The overload level and flow control threshold are determined according to the load parameters of the cluster management system. Among them, the overload level can be used to indicate the degree of overload of the cluster management system. The flow control threshold is the maximum number of requests allowed to access the cluster management system. The load parameters may include but are not limited to one or more of the following: CPU utilization, memory utilization, IO port utilization, resource pressure information of the cluster management system, QPS of the cluster management system, API latency, or the number of requests to access the cluster management system. For a specific description, please refer to the relevant content of the aforementioned embodiment and will not be repeated here.
[0070] Exemplarily, the first computing device may determine the overload level and the flow control threshold value according to the load parameters of the cluster management system. For example, the first computing device may determine the future load condition of the cluster management system according to the load parameters, and determine the overload level and the flow control threshold value according to the future load condition and the load parameters of the cluster management system.
[0071] The specific implementation process of S41 can be found in Figure 2 The relevant contents in the illustrated embodiment will not be repeated here.
[0072] S42: The first computing device determines a flow control strategy according to the overload level and the flow control threshold.
[0073] The first computing device may determine a flow control strategy based on the overload level and the flow control threshold. For example, the first computing device may determine a flow control measurement based on the overload level, the flow control threshold, and the number of requests to access the cluster management system. As an example, if the overload level is the first level, the number of requests to access the cluster management system is less than the flow control threshold, which means that the cluster management system is not overloaded. In this case, the flow control strategy may be to respond to the request to access the cluster management system. In other words, there is no need to perform service fuse on the cluster management system. As another example, if the overload level is not the first level, the number of requests to access the cluster management system is greater than or equal to the flow control threshold, which means that the cluster management system is overloaded. In this case, the flow control strategy may be to reject some or all requests to access the cluster management system (or to perform service fuse on some or all requests to access the cluster management system).
[0074] The request to access the cluster management system may be a request from a user, or it may be an internal request of the cluster management system itself, for example, an access request from the API server itself, a request for system component master election, a request related to health detection, a heartbeat reporting request of a node, or other system management requests. These internal requests can be used for self-maintenance of the cluster management system to maintain the normal operation of the cluster management system. When the number of requests to access the cluster management system is greater than or equal to the flow control threshold, rejecting these internal requests may increase the load on the cluster management system, resulting in a decrease in the processing capacity of the cluster management system. Therefore, in an embodiment of the present application, the first computing device can classify requests to access the cluster management system and determine flow control strategies for different types of requests.
[0075] As an example, requests for accessing a cluster management system can be divided into first type requests and second type requests. Among them, both first type requests and second type requests are requests for accessing the cluster management system. The first type request is an internal request of the cluster management system, and the second type request is a request from a user. Furthermore, if the overload level is not the first level, the number of requests for accessing the cluster management system is greater than or equal to the flow control threshold, and the flow control strategy may be to respond to the first type request, and to reject some or all of the second type requests (for example, rejecting the first percentage of requests in the second type requests). In this example, when the cluster management system is overloaded, service fuses are performed on requests from users, and there is no need to fuse the internal requests of the cluster management system. This can avoid the problem of reduced processing power of the cluster management system due to the inability of the cluster management system to self-maintain due to the fusing of the internal requests of the cluster management system, and can improve the stability of the cluster management system.
[0076] In another example, requests for accessing the cluster management system can be divided into second type requests, third type requests, and fourth type requests. Among them, the second type requests, the third type requests, and the fourth type requests are all requests for accessing the cluster management system. The second type request is a request from a user. The third type request and the fourth type request are both internal systems of the cluster management system. The priority of the third type request is higher than the priority of the fourth type request. Further, if the overload level is not the first level, the number of requests for accessing the cluster management system is greater than or equal to the flow control threshold, and the flow control strategy can be to respond to the third type request, reject some or all of the fourth type requests (for example, reject the second proportion of requests in the fourth type request), and reject some or all of the second type requests (for example, reject the first proportion of requests in the second type request). In this example, when the cluster management system is overloaded, the service fuse can be performed on the internal requests with lower priority in the cluster management system, which can reduce the impact on the self-maintenance of the cluster management system, reduce the load of the cluster management system, and improve the stability of the cluster management system.
[0077] It should be noted that the embodiments of the present application do not limit the division of requests for accessing the cluster management system. For example, the internal requests of the cluster management system can also be divided into third type requests, fourth type requests and fifth type requests. Among them, the priority of the third type request is higher than the priority of the fourth type request. The priority of the fourth type request is higher than the priority of the fifth type request. Accordingly, if the overload level is not the first level, the number of requests for accessing the cluster management system is greater than or equal to the flow control threshold, and the flow control strategy can be to respond to the third type request, reject some or all of the fourth type requests (for example, reject the second proportion of requests in the fourth type request), reject some or all of the fifth type requests (for example, reject the third proportion of requests in the fifth type request), and reject some or all of the second type requests (for example, reject the first proportion of requests in the second type request).
[0078] Among them, the first proportion, the second proportion and the third proportion are all determined according to the overload level. The proportion can also be called the fuse proportion. The proportion may be different for different overload levels. For example, when the overload level is greater, the overload degree of the cluster management system is greater, and the overload level is greater, the proportion may be greater. For another example, when the overload degree of the cluster management system is greater, the overload level is smaller, and the overload degree of the cluster management system is greater, the overload level is smaller, and the proportion may be greater. The above-mentioned proportions may be determined based on historical data, or may be pre-defined, or may be set by the user, without restriction. Under the same overload level, the proportions corresponding to different types of requests may be the same or different.
[0079] It should be noted that the second proportion can be 0, which means that the cluster management system can also respond to the fourth type of request when the cluster management system is overloaded. For example, when the overload level is large (the smaller the overload level, the greater the overload degree of the cluster management system), the second proportion can be 0. Similarly, the third proportion can be 0, which means that the cluster management system can also respond to the fifth type of request when the cluster management system is overloaded. For example, when the overload level is small (the larger the overload level, the greater the overload degree of the cluster management system), the third proportion can be 0.
[0080] For example, the third type of request may be an exemption request, denoted as Exempt, which may include internal requests such as the APIserver's own access request, the system component master election request, and health detection-related requests. The fourth type of request may be a system high priority request, denoted as SystemHigh, which may include internal requests with higher priority such as the node's heartbeat reporting request. The fifth type of request may be a system low priority request, denoted as SystemLow, which may include internal requests with lower priority such as the controller's request to create an application and the node's request to report the application status. The second type of request is denoted as UserWorkload, such as a request from a user.
[0081] Exemplarily, Table 1 shows a schematic diagram of the flow control strategy. As shown in Table 1, the overload level is 4, the cluster management system is not overloaded, and the flow control strategy can be to respond to the request to access the cluster management system, that is, no service fuse is performed. The overload level is 3, the cluster management system is overloaded, and the flow control strategy can be to respond to Exempt, SystemHigh, and SystemLow (that is, to respond to the internal request of the cluster management system), and to reject 25% of the UserWorkload (that is, to respond to 75% of the UserWorkload). The overload level is 2, the cluster management system is overloaded, and the flow control strategy can be to respond to Exempt, SystemHigh, and SystemLow (that is, to respond to the internal request of the cluster management system), and to reject 50% of the UserWorkload (that is, to respond to 50% of the UserWorkload). The overload level is 1, the cluster management system is overloaded, and the flow control strategy can be to respond to Exempt, SystemHigh, and SystemLow (that is, to respond to the internal request of the cluster management system), and to reject 75% of the UserWorkload (that is, to respond to 25% of the UserWorkload). The overload level is 0, the cluster management system is overloaded, and the flow control strategy can be to respond to Exempt, SystemHigh and SystemLow (ie, respond to the internal request of the cluster management system), and reject all UserWorkload. It should be understood that the data in Table 1 is an example, and the embodiments of the present application are not limited thereto.
[0082] Table 1
[0083]
[0084]
[0085] For example, Table 2 shows another example of a flow control strategy. As shown in Table 1, the overload level is 4, the cluster management system is not overloaded, and the flow control strategy can be to respond to requests to access the cluster management system, that is, no service fuse is performed. The overload level is 3, the cluster management system is overloaded, and the flow control strategy can be to respond to Exempt, SystemHigh, and SystemLow (that is, to respond to internal requests of the cluster management system), and to reject 25% of the UserWorkload (that is, to respond to 75% of the UserWorkload). The overload level is 2, the cluster management system is overloaded, and the flow control strategy may be to respond to Exempt and SystemHigh, reject 25% of SystemLow (that is, respond to 75% of SystemLow, and reject 50% of UserWorkload (that is, respond to 50% of UserWorkload). The overload level is 1, the cluster management system is overloaded, and the flow control strategy may be to respond to Exempt and SystemHigh, reject 50% of SystemLow (that is, respond to 50% of SystemLow, and reject 75% of UserWorkload (that is, respond to 25% of UserWorkload). The overload level is 0, the cluster management system is overloaded, and the flow control strategy may be to respond to Exempt and SystemHigh, reject 75% of SystemLow (that is, respond to 25% of SystemLow, and reject all UserWorkload. It should be understood that the data in Table 2 are taken as an example, and the embodiments of the present application are not limited thereto.
[0086] Table 2
[0087] Overload level Fuse Type 1 The proportion of circuit breaker type 1 Fuse Type 2 The percentage of circuit breaker type 2 0 UserWorkload 100% SystemLow 75% 1 UserWorkload 75% SystemLow 50% 2 UserWorkload 50% SystemLow 25% 3 UserWorkload 25% SystemLow 0 4 UserWorkload 0 SystemLow 0
[0088] It should be noted that the specific implementation form of the flow control strategy in the embodiment of the present application is not limited to this. For example, different cluster management systems can divide requests differently and formulate corresponding flow control strategies.
[0089] Optionally, the method may further include S43 and S44, that is, S43 and S44 are optional steps. Figure 4Indicated by dotted lines. For example, the controller in the cluster management system can execute the aforementioned S41 and S42; further, the controller configures the flow control policy to the API server, so that the API server can perform flow control or service fuse based on the flow control policy, that is, execute the contents of S43 and S44. For another example, the API server can execute the aforementioned S41 and S42; further, the API server can perform flow control or service fuse based on the flow control policy, that is, execute the contents of S43 and S44.
[0090] S43: The first computing device receives the first request.
[0091] The first request is used to access the cluster management system. For example, the first request may be a request from a user, or may be an internal request of the cluster management system, without limitation. The internal request may refer to the above content, which will not be described in detail.
[0092] S44: The first computing device rejects or responds to the first request according to the traffic control policy.
[0093] In one example, if the overload level is the first level, the request for accessing the cluster management system is less than the flow control threshold, and the flow control policy is to respond to the request for accessing the cluster management system, then the first computing device can respond to the first request. In another example, if the overload level is not the first level, the request for accessing the cluster management system is greater than or equal to the flow control threshold, and the flow control policy is to reject some or all requests for accessing the cluster management system, then the first computing device can respond to or reject the first request. For example, the first request is a first type request, or a third type request, and the first computing device can respond to the first request. For another example, the first request is a second type request or a fourth type request, and the first computing device can respond to or reject the first request. Among them, the first type request, the second type request, the third type request, and the fourth type request can refer to the aforementioned content and will not be repeated.
[0094] It should be noted that responding to the first request can be understood as: the API server receives the first request and forwards the first request to other relevant components of the cluster management system for processing. Rejecting the first request can be understood as: the API server refuses to receive the first request; or it can also be understood as: the API server discards or deletes the first request; or it can also be understood as: the API server does not process the first request, such as forwarding it to other relevant components of the cluster management system.
[0095] In one possible implementation, the first computing device may also receive multiple second requests. If each of the multiple second requests is a second type request, the first computing device rejects requests of a first proportion among the multiple second requests according to the flow control policy. For example, if the overload level is 1, the first computing device may reject 75% of the requests among the multiple second requests. If each of the multiple second requests is a fourth type request, the first computing device rejects requests of a second proportion among the multiple second requests according to the flow control policy. For example, if the overload level is 1, the first computing device may reject 25% of the requests among the multiple second requests.
[0096] It should be noted that the rejected second request among multiple second requests in the embodiment of the present application may be determined according to the receiving time, or may be determined according to the priority, without limitation. For example, the number of second requests is 10, which are recorded in the order of receiving time as: request 1, request 2, request 3, request 4, request 5, request 6, request 7, request 8, request 9, and request 10. If 50% of the second requests need to be fused, then request 1, request 2, request 3, request 4, and request 5 may be responded to, and request 6, request 7, request 8, request 9, and request 10 may be rejected.
[0097] In the above embodiment, the overload assessment service may be provided by the cluster management system. In another possible implementation, the overload assessment service may not be provided by the cluster management system, that is, the computing device or computing device cluster used to implement the overload assessment service may be deployed independently without restriction. For ease of understanding, the computing device providing the overload assessment service is referred to as the second computing device below. In other words, the second computing device may be deployed in the cluster management system, or it may be deployed independently. Accordingly, the second computing device includes an acquisition module and an evaluation module, please refer to the foregoing content for details, and no further description is given. In S41, the first computing device obtains the overload level and flow control threshold of the cluster management system as follows: the first computing device receives the overload level and flow control threshold, such as receiving the overload level and flow control threshold from the second computing device. Based on this technical concept, the embodiment of the present application provides another flow control method. The method can be applied to the second computing device, or a component (such as a processor, a chip, a chip system, a circuit or other, etc.) configured in the second computing device, or a software module. The following takes the second computing device as the execution subject as an example.
[0098] Figure 5 FIG. 2 shows a flow chart of another flow control method provided by an embodiment of the present application. Figure 5 As shown, the method may include the following contents.
[0099] S51: The second computing device obtains a load parameter of the cluster management system.
[0100] The load parameter may include but is not limited to one or more of the following: CPU usage, memory usage, IO port usage, resource pressure information of the cluster management system, QPS of the cluster management system, API latency, or the number of requests to access the cluster management system. Exemplarily, the cluster management system may authorize the second computing device so that the second computing device can obtain the load parameters of the cluster management system, such as real-time monitoring of the load parameters of the cluster management system. The specific implementation process of S51 can be referred to Figure 2 The relevant contents in the illustrated embodiment will not be repeated here.
[0101] S52: The second computing device determines an overload level and a flow control threshold of the cluster management system according to the load parameter.
[0102] The overload level may be used to indicate the degree of overload of the cluster management system. The flow control threshold is the maximum number of requests allowed to access the cluster management system. Exemplarily, the first computing device may determine the overload level and the flow control threshold based on the load parameters of the cluster management system. For example, the first computing device may determine the future load of the cluster management system based on the load parameters, and determine the overload level and the flow control threshold based on the future load of the cluster management system and the load parameters. The specific implementation process of S52 may refer to Figure 2 The relevant contents in the illustrated embodiment will not be repeated here.
[0103] S53: The second computing device sends the overload level and the flow control threshold to the cluster management system. Correspondingly, the cluster management system receives the overload level and the flow control threshold from the second computing device.
[0104] For example, the second computing device sends the overload level and the flow control threshold to the first computing device. Correspondingly, the first computing device receives the overload level and the flow control threshold from the second computing device.
[0105] Exemplarily, the second computing device may send the overload level and flow control threshold to the cluster management system through the cloud native gateway; accordingly, the cluster management system receives the overload level and flow control threshold from the second computing device through the cloud native gateway, so that the cluster management system (or the first computing device in the cluster management system) determines the flow control strategy according to the overload level and flow control threshold, and rejects or responds to the request to access the cluster management system according to the flow control strategy. For details, please refer to Figure 4 The relevant contents of the illustrated embodiment will not be described in detail.
[0106] It should be noted that the cluster management system can subscribe to the overload level and flow control threshold from the second computing device, and accordingly, the second computing device sends the overload level and flow control threshold to the cluster management system in response to the subscription; or, the second computing device can also periodically or non-periodically actively send the overload level and flow control threshold to the cluster management system. The embodiment of the present application does not limit the triggering conditions for the second computing device to send the overload level and flow control threshold to the cluster management system.
[0107] Based on the same technical concept as the above embodiments, the present application provides another flow control method. The method can be applied to a first computing device, or a component (such as a processor, chip, chip system, circuit or other, etc.) configured in the first computing device, or a software module.
[0108] Figure 6 FIG. 2 shows a flow chart of another flow control method provided in an embodiment of the present application. Figure 6 As shown, the method may include the following contents.
[0109] S61: The first computing device obtains a load parameter of the cluster management system.
[0110] The load parameter may include but is not limited to one or more of the following: CPU usage, memory usage, IO port usage, resource pressure information of the cluster management system, QPS of the cluster management system, API latency, or the number of requests to access the cluster management system. For a specific description, please refer to the relevant content of the aforementioned S41 or S51, which will not be repeated here.
[0111] S62: The first computing device determines an overload level and a flow control threshold of the cluster management system according to the load parameters.
[0112] The overload level may be used to indicate the degree of overload of the cluster management system. The flow control threshold is the maximum number of requests allowed to access the cluster management system. Exemplarily, the first computing device may determine the overload level and the flow control threshold based on the load parameters of the cluster management system. For example, the first computing device may determine the future load of the cluster management system based on the load parameters, and determine the overload level and the flow control threshold based on the future load of the cluster management system and the load parameters. The specific implementation process of S62 may refer to Figure 2 The relevant contents in the illustrated embodiment will not be repeated here.
[0113] S63: The first computing device determines whether the overload level changes.
[0114] The first computing device may determine whether the current overload level has changed. If the overload level has changed, the first computing device may execute the content of S64. If the overload level has not changed, the first computing device may execute the content of S61 and perform flow control based on the determined flow control strategy.
[0115] S64: The first computing device determines a flow control strategy according to the overload level and the flow control threshold.
[0116] In S64, the overload level changes, and the first computing device can update the flow control strategy according to the changed overload level and flow control threshold; or reconfigure the flow control threshold according to the changed overload level and flow control threshold, without limitation. The specific implementation process of S64 can refer to the content of S42, which will not be repeated here.
[0117] S65: The first computing device receives the first request.
[0118] The first request is used to access the cluster management system. For example, the first request may be a request from a user, or may be an internal request of the cluster management system, without limitation. The internal request may refer to the above content, which will not be described in detail.
[0119] S66: The first computing device determines whether to reject the first request according to the traffic control policy.
[0120] If the first computing device determines to respond to the first request according to the flow control policy, then the content of S67 is executed. Alternatively, if the first computing device determines to reject the first request according to the flow control policy, then the content of S68 is executed.
[0121] S67: The first computing device responds to the first request.
[0122] S68: The first computing device rejects the first request.
[0123] The specific implementation process of S66 to S68 can refer to the content of S44, which will not be repeated here.
[0124] Based on Figure 2 The same technical concept as the embodiment shown, the embodiment of the present application provides a schematic diagram of the structure of K8S. Figure 7 As shown, K8S may include one or more of the following components: master, controller, Kubelet, KubeProxy, or scheduler, etc., without limitation. It should be understood that the number of each component can be one or more, without limitation. In the embodiment of the present application, each master of K8S can deploy OES, and the relevant description of OES can refer to Figure 2 The relevant content will not be repeated here.
[0125] Requests to access K8S may include internal requests of K8S, or user requests, or both internal requests of K8S and user requests. Among them, internal requests of K8S may include, but are not limited to: exemption requests (such as exempt), leader election heartbeat requests (such as leader-election), node management component heartbeat and status reporting requests (such as node-high), system requests (such as requests other than heartbeat and status reporting on the node management component, which are recorded as system), management component requests other than leader election heartbeat requests (such as business creation requests, etc., which are recorded as workload-high), system plug-in requests (such as workload-low), requests for processing traffic (such as interactive kubectl commands run by non-privileged users, which are recorded as global-default), or requests other than the aforementioned requests (which may be recorded as catch-all). User requests may be, for example, user requests for a list of resources, recorded as user-list, or requests corresponding to user operations (user operator), without limitation.
[0126] Exemplarily, Table 3 shows a schematic diagram of the type classification of requests for accessing K8S. As shown in Table 1, exempt and leader-election can be Exempt, node-high can be SystemHigh, system and workload-high can be SystemLow, workload-low, global-default, catch-all and user-list can be UserWorkload. Among them, please refer to the above content for the description of Exempt, SystemHigh, SystemLow and UserWorkload, which will not be repeated here. It should be understood that the various data in Table 3 are taken as an example and are not limited to this.
[0127] Table 3
[0128] Request to access K8S Fuse Type exempt Exempt Leader-election Exempt node-high SystemHigh system SystemLow workload-high SystemLow workload-low UserWorkload global-default UserWorkload catch-all UserWorkload user-list UserWorkload
[0129] Optionally, the cloud provider can also obtain the overload level through the cloud native gateway and expand or reduce the master capacity according to the overload level.
[0130] For example, Figure 8 A schematic diagram of the structure of a Kube-API server is shown. Figure 8As shown, in ①, the OES listening component (such as OES Reflector) can subscribe to the overload level and flow control threshold from OES. In ②, OESReflector sends the overload level and flow control threshold to the configuration controller (ConfigController). Further, ConfigController determines the flow control policy based on the overload level and flow control threshold, and applies the flow control policy. In ③, ConfigController configures the flow control policy in the fuse (Fuse) component. In ④, the flow classification component (such as FlowSchema) receives the user request, and in ⑤, queues and caches the user request. In ⑥, the queue set (QueueSet) component rejects or responds to the user request according to the flow control policy in Fuse. Figure 8 The specific implementation process of each step can refer to the aforementioned embodiments and will not be repeated here.
[0131] Based on Figure 4 or Figure 6 The same technical concept as the embodiment shown in the figure, the embodiment of the present application provides a flow control device. Fig. 9 As shown, the flow control device includes a policy determination module and a flow control module. The policy determination module can be used to execute the content of the aforementioned S42, or execute the content of the aforementioned S63 and S64. The flow control module can be used to execute the content of the aforementioned S44, or execute the content of the aforementioned S66 to S68. In a possible implementation, the flow control device may also include a transceiver module ( Figure 8 In one possible implementation, the flow control device may further include a collection module and an evaluation module ( Figure 8 ), which is used to provide overload assessment services, such as executing the contents of S41, S61 or S62. For details, please refer to Figure 2 , Figure 3 , Figure 7 or Figure 8 The acquisition module and the evaluation module in the illustrated embodiment will not be described in detail.
[0132] Based on Figure 5 The same technical concept as the embodiment shown in the figure, the embodiment of the present application provides another flow control device. The flow control device is used to provide overload assessment services, including a collection module and an assessment module, such as executing S51 to S52, for details, please refer to Figure 2 , Figure 3 , Figure 7 or Figure 8The acquisition module and the evaluation module in the illustrated embodiment are not described in detail. Optionally, the flow control device may further include a transceiver module for implementing a receiving function and a sending function, such as sending an overload level and a flow control threshold.
[0133] It can be understood that the above-mentioned multiple functional modules can be implemented based on software, hardware or a combination of software and hardware, and the multiple functional modules can be arbitrarily combined or divided based on specific implementations.
[0134] Based on the above embodiments, the present application also provides a computing device 1000. Fig.10 As shown, the computing device 1000 includes: a processor 1001, a memory 1002 and a bus 1003. Optionally, the computing device 1000 may also include a communication interface 1004 ( Fig.10 The computing device 1000 can implement the functions of the first computing device or the second computing device in the above-mentioned embodiments. The processor 1001, the memory 1002 and the communication interface 1004 communicate through the bus 1003. The computing device 1000 can be a server or a terminal device. It should be understood that the embodiments of the present application do not limit the number of processors and memories in the computing device 1000.
[0135] The processor 1001 may include any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).
[0136] The memory 1002 may include a volatile memory, such as a random access memory (RAM). The processor 1002 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD) or a solid state drive (SSD). The memory 1002 stores executable program code, and the processor 1001 executes the executable program code to implement Figures 4 to 6 Specifically, the memory 1002 stores a method for executing Figures 4 to 6 The instructions and immediate values of the method described in any one of the embodiments.
[0137] The bus 1003 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus 1003 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.10 The bus 1003 may include a path for transmitting information between various components of the computing device 1000 (eg, the processor 1001, the memory 1002, and the communication interface 1004).
[0138] The communication interface 1004 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the computing device 1000 and other devices or a communication network.
[0139] Based on the above embodiments, the present application also provides a flow control system, which includes a first computing device and / or a second computing device; or includes a method for implementing Figure 4 The device and / or method for implementing the embodiment shown in the figure Figure 5 The apparatus of the embodiment shown. The first computing device and the second computing device are described above and will not be described in detail.
[0140] Based on the above embodiments, the embodiments of the present application further provide a computer program product, which includes: a computer program (also referred to as code or instruction), which, when executed, enables a computing device (such as a first computing device or a second computing device) to perform the methods described in the embodiments of the present application. For the first computing device and the second computing device, please refer to the above description and will not be repeated here.
[0141] Based on the above embodiments, the embodiments of the present application further provide a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a computing device (such as a first computing device or a second computing device), the computing device executes the methods described in the embodiments of the present application. For the first computing device and the second computing device, please refer to the above description and will not be repeated here.
[0142] Based on the above embodiments, the embodiments of the present application further provide a chip, which is used to read a computer program stored in a memory to implement the methods described in the embodiments of the present application.
[0143] Based on the above embodiments, the embodiments of the present application provide a chip system, which includes a processor for supporting a computing device (such as a first computing device or a second computing device) to implement the methods described in the embodiments of the present application. In one possible design, the chip system also includes a memory, which is used to store the necessary programs and data for the computing device. The chip system can be composed of a chip, or it can include a chip and other discrete devices. Among them, please refer to the above description for the first computing device and the second computing device, and no further description will be given.
[0144] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0145] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0146] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0147] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0148] Obviously, those skilled in the art can make various changes and modifications to the embodiments of the present application without departing from the scope of the embodiments of the present application. Thus, if these modifications and variations of the embodiments of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A flow control method, characterized in that: The method comprises: Acquire an overload level and a flow control threshold of the cluster management system, wherein the overload level and the flow control threshold are determined according to a load parameter of the cluster management system, and the flow control threshold is a maximum number of requests allowed to access the cluster management system; Determining a flow control strategy according to the overload level and the flow control threshold; receiving a first request, wherein the first request is used to access the cluster management system; According to the flow control policy, the first request is rejected or responded to.
2. The method according to claim 1, characterized in that: If the overload level is the first level, the number of requests for accessing the cluster management system is less than the flow control threshold, and the flow control strategy is to respond to the requests for accessing the cluster management system; or, If the overload level is not the first level, the number of requests for accessing the cluster management system is greater than or equal to the flow control threshold, and the flow control strategy is to reject some or all of the requests for accessing the cluster management system.
3. The method according to claim 2, characterized in that The flow control strategy is to reject some requests for accessing the cluster management system, including: The flow control strategy is to respond to the first type of request and reject the first proportion of the second type of request; or, The flow control strategy is to respond to the third type of request, reject the second proportion of requests in the fourth type of request, and reject the first proportion of requests in the second type of request; Among them, the first type of request, the second type of request, the third type of request and the fourth type of request are all requests for accessing the cluster management system, the first type of request, the third type of request and the fourth type of request are all internal requests of the cluster management system, the priority of the third type of request is higher than the priority of the fourth type of request, the second type of request is a request from a user, and the first proportion and the second proportion are determined according to the overload level of the cluster management system.
4. The method according to claim 3, characterized in that The rejecting or responding to the first request according to the flow control threshold and the flow control policy includes: The first request is the first type request or the third type request, and the first request is responded to; or, The first request is the second type request or the fourth type request, and the first request is responded to or rejected.
5. The method according to claim 3 or 4, characterized in that: The method further comprises: receiving a plurality of second requests; If each of the multiple second requests is the second type request, requests with the first proportion among the multiple second requests are rejected according to the traffic control policy; or, if each of the multiple second requests is the fourth type request, requests with the second proportion among the multiple second requests are rejected according to the traffic control policy.
6. The method according to any one of claims 1 to 5, characterized in that The obtaining of the overload level and flow control threshold of the cluster management system includes: Obtaining load parameters of the cluster management system; The overload level and the flow control threshold are determined according to the load parameter.
7. The method according to claim 6, characterized in that The determining the overload level and the flow control threshold according to the load parameter includes: Predicting the future load condition of the cluster management system according to the load parameters; The overload level and the flow control threshold are determined according to the load parameter and the future load condition of the cluster management system.
8. The method according to any one of claims 1 to 5, characterized in that The obtaining of the overload level of the cluster management system includes: The overload level is received.
9. The method according to any one of claims 1 to 8, characterized in that The load parameters include one or more of the following: CPU usage, memory usage, network input / output port usage, disk input / output port usage, resource pressure information of the cluster management system, query rate per second of the cluster management system, application program interface latency, or the number of requests to access the cluster management system.
10. A flow control method, characterized in that: The method comprises: Get the load parameters of the cluster management system; Determining an overload level and a flow control threshold of the cluster management system according to the load parameter, wherein the flow control threshold is a maximum number of requests allowed to access the cluster management system; The overload level and the flow control threshold are sent to the cluster management system, so that the cluster management system determines a flow control strategy according to the overload level and the flow control threshold, and rejects or responds to a request to access the cluster management system according to the flow control strategy.
11. The method according to claim 10, characterized in that Determining the overload level and flow control threshold of the cluster management system according to the load parameter includes: Predicting the future load condition of the cluster management system according to the load parameters; The overload level and the flow control threshold are determined according to the load parameter and the future load condition of the cluster management system.
12. The method according to claim 10 or 11, characterized in that: The load parameters include one or more of the following: CPU usage, memory usage, network input / output port usage, disk input / output port usage, resource pressure information of the cluster management system, query rate per second of the cluster management system, application program interface latency, or the number of requests to access the cluster management system.
13. A process control device, characterized in that: The method comprises a module for executing the method according to any one of claims 1 to 9, or comprises a module for executing the method according to any one of claims 10 to 12.
14. A flow control system, characterized in that: The invention comprises an apparatus for executing the method according to any one of claims 1 to 9, and an apparatus for executing the method according to any one of claims 10 to 12.
15. A computing device cluster, characterized in that: comprising at least one computing device, each computing device comprising a processor and a memory; The processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster executes the method according to any one of claims 1 to 9, or executes the method according to any one of claims 10 to 12.
16. A computer-readable storage medium, characterized in that: The method comprises computer program instructions. When the computer program instructions are executed by a computing device cluster, the computing device cluster executes the method according to any one of claims 1 to 9, or executes the method according to any one of claims 10 to 12.
17. A computer program product comprising instructions, characterized in that When the instructions are executed by a computing device cluster, the computing device cluster executes the method according to any one of claims 1 to 9, or executes the method according to any one of claims 10 to 12.
Citation Information
Cited By
Data processing method and apparatus for es cluster, electronic device and storage medium
WO2026157472A1
