WO2024088079A1 - Request processing method and system - Google Patents

Request processing method and system Download PDF

Info

Publication number
WO2024088079A1
WO2024088079A1 PCT/CN2023/124393 CN2023124393W WO2024088079A1 WO 2024088079 A1 WO2024088079 A1 WO 2024088079A1 CN 2023124393 W CN2023124393 W CN 2023124393W WO 2024088079 A1 WO2024088079 A1 WO 2024088079A1
Authority
WO
WIPO (PCT)
Prior art keywords
task processing
request
processing
task
node
Prior art date
Application number
PCT/CN2023/124393
Other languages
French (fr)
Chinese (zh)
Inventor
江河清
刘军
林佳梁
Original Assignee
杭州阿里云飞天信息技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 杭州阿里云飞天信息技术有限公司 filed Critical 杭州阿里云飞天信息技术有限公司
Publication of WO2024088079A1 publication Critical patent/WO2024088079A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/08Logistics, e.g. warehousing, loading or distribution; Inventory or stock management
    • G06Q10/087Inventory or stock management, e.g. order filling, procurement or balancing against orders

Definitions

  • the embodiments of this specification relate to the field of computer technology, and in particular to a request processing method.
  • a server may need to call other servers to process the request after receiving it.
  • the server distributes the request to other servers, in order to improve the request processing efficiency, it will adopt a load balancing method to distribute the corresponding request to each server according to its current processing status.
  • the server monitors the current processing status of other servers, but this method has a delay problem, resulting in the server being unable to understand the current processing status of other servers in a timely manner, thereby reducing the request processing efficiency.
  • an embodiment of this specification provides a request processing method.
  • One or more embodiments of this specification also involve a request processing system, two other request processing methods, two request processing devices, a computing device, a computer-readable storage medium and a computer program to solve the technical defects existing in the prior art.
  • a request processing method is provided, which is applied to a request processing system, the system comprising a distribution node and at least two task processing nodes, the method comprising:
  • the allocation node receives at least two pending requests and receives a task response message sent by the at least two task processing nodes, wherein the task response message carries a task processing weight;
  • the first task processing node performs task processing on the pending request in the received pending request set, updates the task processing weight according to the current processing status information during the task processing, and sends the updated task processing weight to the allocation node based on the task response message.
  • a request processing system comprising a distribution node and at least two task processing nodes, wherein:
  • the allocation node is configured to receive at least two pending requests and receive a task response message sent by the at least two task processing nodes, wherein the task response message carries a task processing weight;
  • the first task processing node is configured to perform task processing on the pending requests in the received pending request set, update the task processing weight according to the current processing status information during the task processing, and send the updated task processing weight to the allocation node based on the task response message.
  • a request processing method is provided, which is applied to a task processing node, including:
  • the updated task processing weight is sent to the allocation node based on the task response message.
  • a request processing device is provided, which is applied to a task processing node, including:
  • a first sending module is configured to generate a task response message based on the task processing weight, and send the task response message to the allocation node;
  • a receiving module configured to receive a set of pending requests determined by the allocation node for the task processing node, wherein the set of pending requests is determined by the allocation node based on the task processing weight and at least two pending requests received;
  • a processing module configured to perform task processing on the pending requests in the received pending request set, and update the task processing weight according to current processing status information during the task processing;
  • the second sending module is configured to send the updated task processing weight to the allocation node based on the task response message.
  • a request processing method is provided, which is applied to an allocation node, including:
  • a corresponding pending request set is allocated to a first task processing node among the at least two task processing nodes, wherein the first task processing node is one of the at least two task processing nodes.
  • a request processing device which is applied to an allocation node, including:
  • a receiving module is configured to receive at least two pending requests and receive at least two task processing nodes.
  • a task response message wherein the task response message carries a task processing weight;
  • the allocation module is configured to allocate a corresponding set of pending requests to a first task processing node among the at least two task processing nodes based on the task processing weight and the at least two pending requests, wherein the first task processing node is one of the at least two task processing nodes.
  • a computing device including:
  • the memory is used to store computer executable instructions
  • the processor is used to execute the computer executable instructions.
  • the steps of the above request processing method are implemented.
  • a computer-readable storage medium which stores computer-executable instructions, and when the instructions are executed by a processor, the steps of the above-mentioned request processing method are implemented.
  • a computer program is provided, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the above-mentioned request processing method.
  • a request processing method provided in an embodiment of the present specification is applied to a request processing system, wherein the system includes an allocation node and at least two task processing nodes, and the method includes: the allocation node receives at least two pending requests, and receives a task response message sent by the at least two task processing nodes, wherein the task response message carries a task processing weight; and based on the task processing weight and the at least two pending requests, allocates a corresponding set of pending requests to a first task processing node among the at least two task processing nodes, wherein the first task processing node is one of the at least two task processing nodes; the first task processing node performs task processing on the pending requests in the received set of pending requests, updates the task processing weight according to current processing status information during the task processing, and sends the updated task processing weight to the allocation node based on the task response message.
  • the task processing node of the method will actively send the task processing weight determined according to the current processing status information in the task processing process to the allocation node; and the allocation node will quickly and accurately determine the current processing status of each task processing node based on the task processing weight, avoiding delay problems; and when receiving pending requests, it will allocate the pending requests to the corresponding task processing nodes based on the current processing status of each task processing node, thereby improving request processing efficiency.
  • FIG1 is a schematic diagram of request allocation provided by an embodiment of this specification.
  • FIG2 is an application diagram of a request processing method provided by an embodiment of this specification.
  • FIG3 is a flow chart of a request processing method provided by an embodiment of this specification.
  • FIG4 is a schematic diagram of a concurrent growth rate change of an abnormal server in a request processing method provided by an embodiment of this specification
  • FIG5 is a schematic diagram of changes in the number of concurrent requests under different functions of a request processing method provided by an embodiment of this specification;
  • FIG6 is a schematic diagram of a processing process of a request processing method provided by an embodiment of this specification.
  • FIG7 is a schematic diagram of the number of concurrent requests on a single machine in a request processing method provided by an embodiment of this specification;
  • FIG8 is a flowchart of another request processing method provided by an embodiment of this specification.
  • FIG9 is a flowchart of another request processing method provided by an embodiment of this specification.
  • FIG10 is a schematic diagram of the structure of a request processing system provided by an embodiment of the present specification.
  • FIG. 11 is a structural block diagram of a computing device provided by an embodiment of the present specification.
  • first, second, etc. may be used to describe various information in one or more embodiments of this specification, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other.
  • the first may also be referred to as the second, and similarly, the second may also be referred to as the first.
  • word "if” as used herein may be interpreted as "at the time of” or "when” or "in response to determining”.
  • Service concurrency The number of instantaneous requests that the server is processing at a certain moment.
  • Request rate The total number of requests sent within a certain period of time.
  • Load balancing Select an optimal address from multiple addresses through a certain algorithm, and when the request volume reaches a certain level, the maximum utilization of all address resources can be achieved.
  • a server may need to call other servers to process the request after receiving it; and when the server distributes the request to other servers, in order to improve the efficiency of request processing, it will adopt a load balancing method to distribute the corresponding request to each server according to its current processing status.
  • a service provided by a server often needs to act as a consumer and rely on several other services to process the requests it receives, and most services that expose data management capabilities to the outside world need to rely on databases for processing.
  • FIG. 1 is a request allocation diagram for an order service provided by an embodiment of the present specification; based on part A of Figure 1, it can be seen that the order server relies on a service of the inventory server for inventory deductions, and the inventory server needs to rely on the database for data persistence. Among them, QPS is the request rate, and the ms is the response rate.
  • QPS is the request rate
  • ms is the response rate.
  • problems such as slow processing from the database and network jitter may cause the services provided by the inventory server to be blocked, resulting in a significant increase in instantaneous concurrency, which will bring extremely serious pressure to the machine and even cause the service to crash.
  • part B of Figure 1 simulates the request processing in a scenario where the database has a slow processing problem.
  • this manual provides three solutions to the problem of instantaneous concurrency growth caused by server-side blocking, namely, a direct unlimited solution, a maximum concurrency limit setting solution, and a load balancing scheduling solution from the client perspective.
  • the solution of setting the maximum concurrency limit means that when the instantaneous concurrency of the server reaches a certain amount, it will refuse to accept new requests. This solution sacrifices a certain number of successful requests to ensure the overall performance of the application. This solution will reject new requests after the limit is reached, which will bring a bad experience to users.
  • the other is to allow the concurrency to increase without any restrictions.
  • the unrestricted solution means that when the concurrency of a single service increases, the processing pool will continue to expand to meet the concurrency needs. Since there is no limit on the expansion, when the number of concurrent requests increases, it will bring certain pressure to the provider. As the pressure increases, the overall processing time of all services will also increase. When the concurrency reaches a certain level, it is likely to cause memory overflow in the process. As shown in part C of Figure 1, the maximum concurrency is set to 100. It can be seen that about 352 requests are rejected per second, which means that the overall concurrency of applications on the entire link will not be particularly high. There are two ways to limit the maximum concurrency.
  • each service has a dedicated concurrency
  • the other is that multiple services share a concurrency.
  • the exclusive concurrency method has a large limit value, it will still cause problems such as memory overflow when multiple services are blocked. If the limit value is too small, it is not suitable for some IO-intensive services.
  • exclusive concurrency is not used by default, and only support based on custom configuration is provided. Therefore, the maximum concurrency limit solution has two major disadvantages: first, it will cause the number of successful requests to decrease, which will bring a bad experience to users; second, abnormal services will also affect normal services when they are restricted, expanding the impact.
  • the third method is to perform load balancing scheduling from the client's perspective.
  • Load balancing scheduling from the client's perspective means that the consumer perceives the server's indicators such as response time, and selects the optimal server for service granularity on the consumer's single machine.
  • Common algorithms include the minimum active number algorithm and the fastest response algorithm. However, since these algorithms can only schedule traffic from the perspective of a single machine on the consumer's end, they cannot understand the actual single-machine performance of each server in a timely and efficient manner. In addition, algorithms such as the minimum active number and the fastest response rely on similar indicators such as machine configuration and response time within the cluster to be more accurate. It is easy to make misjudgments in complex colocation scenarios.
  • a request processing method is provided.
  • This specification also involves a request processing system, another request processing method, a request processing apparatus, a computing device, and a computer-readable storage medium, which are described in detail one by one in the following embodiments.
  • FIG. 2 shows an application schematic diagram of a request processing method provided according to an embodiment of the present specification.
  • the request processing method provided in the present specification adopts a dynamic weight push method, and reduces the call speed of the problematic server by weight scheduling while ensuring that the maximum number of concurrent connections does not exceed expectations. Under the premise of avoiding directly throwing an exception to cause trouble to the user, it can be ensured that the pressure of a single server will not exceed the upper limit.
  • the request processing method provided in the present specification adds a data path of the weight size returned from the server to the consumer in the call link between the order server (which can be used as the consumer) and the inventory server.
  • the inventory server can push the downgrade weight to the consumer through this data path according to the downgrade weight determined by its own load situation.
  • this new weight will be used to distribute the order request, thereby reducing the number of requests received by the server with high load or abnormality, and realizing load balancing.
  • this manual provides a request processing method that aims to perform intelligent traffic scheduling of the cluster by reversely pushing adaptive degradation weights through the server, realize service degradation isolation of abnormal single-machine nodes, prevent unlimited expansion of resource occupation, achieve rapid fault convergence, and significantly reduce the impact on users.
  • FIG. 3 shows an application flow chart of a request processing method provided according to an embodiment of this specification.
  • the request processing method is applied to a request processing system, the system includes a distribution node and at least two task processing nodes, and the method specifically includes the following steps.
  • Step 302 The allocation node receives at least two pending requests and receives a task response message sent by the at least two task processing nodes, wherein the task response message carries a task processing weight; and based on the task processing weight and the at least two pending requests, allocates a corresponding set of pending requests to a first task processing node among the at least two task processing nodes, wherein the first task processing node is one of the at least two task processing nodes.
  • the task processing node can be understood as a node that can process pending requests.
  • the task processing node can be a task processing server, for example, the above-mentioned inventory server, logistics server, etc., and the server can be one or more servers.
  • the distribution node can be understood as a server that can distribute the pending requests received or generated by itself to the task processing node associated with it.
  • the distribution node can also be called a consumer end.
  • the distribution node can be the above-mentioned order server, and the order server can receive order requests sent by users through user terminals.
  • Pending requests can be understood as user requests sent by users to the distribution node through terminals, such as order requests, data acquisition requests, etc.
  • the pending request can also be understood as a request generated by the distribution node according to the user request sent by the user. For example, after the user sends a shopping order request to it, the order server needs to send a deduction request to the inventory server after processing the shopping order request, so as to deduct the inventory quantity of the product by calling the service of the inventory server. Avoid the situation where the user places an order after the product is sold out and the inventory quantity has not been reduced. The problem of not being able to obtain goods.
  • the pending request set can be understood as a set consisting of a specific number of pending requests.
  • the task response message can be understood as a message sent by the task processing node to the allocation node through the data path between the task processing node and the allocation node, and the message carries the task processing weight.
  • the task processing weight can be understood as a parameter that characterizes the request processing capability of the task processing node itself.
  • the parameter can be any value within a value range, such as any value within the value range of [0,1] or [0,100].
  • the task processing node generates a task processing weight based on the current task processing information during its own task processing process.
  • the task processing weight is used to characterize the information about the task processing status of the task processing node itself. It should be noted that in the request processing method provided in this specification, the task processing weight is calculated by the task processing node itself and fed back to the allocation node. Thereby, the channel for feedback from the server to the consumer is opened up by reversely pushing the weight, which provides feasibility for the server to protect itself.
  • the allocation node is the order server
  • the task processing node is the inventory server
  • the pending request is a request for inventory reduction
  • the task processing weight can be the weight corresponding to each inventory server.
  • the inventory server will determine its own weight based on the current processing status information during its own inventory reduction processing; then generate a weight adjustment message based on the weight information, and send the weight adjustment message to the order server.
  • the order server receives the weight adjustment message sent by each inventory server, and determines the weight of each inventory server from the weight adjustment message.
  • a shopping order processing request for a product is received from a user through a client, a request for deduction of inventory for the product is generated, wherein the number of the shopping order processing request is consistent with the number of the request for deduction of inventory.
  • the order server will allocate a specific number of deduction of inventory requests to each inventory server according to the weight of each inventory server, and allocate and send the deduction of inventory requests to the corresponding inventory server.
  • the request processing method provided in this specification is that the inventory server feeds back its own pressure information by pushing weights, thereby avoiding the problem of reducing the success rate of the service due to direct rejection of the request, ensuring that normal services can continue to be processed, and isolating faults within a single service.
  • the request processing method provided in this specification determines a corresponding number of pending requests for each task processing node according to the task processing weight that characterizes the current processing state of each task processing node, and allocates them to the corresponding task processing node, thereby achieving load balancing for the task processing nodes and realizing intelligent traffic scheduling of the cluster.
  • the first task processing node among the at least two task processing nodes allocates the corresponding set of pending requests, including:
  • the allocation node determines, based on a task processing weight of a first task processing node among the at least two task processing nodes, request set information corresponding to the first task processing node;
  • a pending request set corresponding to the first task processing node is constructed, and the pending request set is sent to the first task processing node.
  • the request set information can be understood as information for constructing the request set information.
  • the information can be used to indicate the number of pending requests that need to be allocated to each task processing node.
  • determining the request set information corresponding to the first task processing node among the at least two task processing nodes based on the task processing weight of the first task processing node includes:
  • the allocation node determines a first task processing node among the at least two task processing nodes, and determines a task processing weight of the first task processing node;
  • the request processing quantity of the first task processing node is determined, and the request processing quantity is used as request set information.
  • the allocation node needs to first determine the first task processing node from at least two task processing nodes in the process of determining the corresponding request processing quantity for each task processing node, and then determine the task processing weight of the first task processing node from the task processing weights recorded by itself.
  • the allocation node needs to determine the request quantity of the at least two pending requests and the node number of at least two task processing nodes; then based on the request quantity, the node number, and the task processing weight of the first task processing node, calculate the request processing quantity of the pending requests that need to be allocated to it for the task processing weight, and determine the request processing quantity as the request set information required to construct the pending request set.
  • the order server determines the number of requests to be allocated to the inventory server, it needs to determine the weight of the inventory server A; then determine the total number of inventory reduction requests and the total number of inventory servers; based on the weight of the inventory server A, the total number of inventory reduction requests, and the total number of inventory servers, calculate the number of requests that the inventory server A needs to allocate.
  • the calculation of the number of requests can be obtained by the following formula (1).
  • A represents the total request rate of the order server (consumer end), that is, the number of orders
  • B represents the total number of inventory servers.
  • DeWeight represents the weight of each inventory server.
  • the number of requests allocated to each warehouse server can be called the request rate of the inventory server; among them, a normal inventory server can be understood as an inventory server with a weight of 1, and an abnormal inventory server can be understood as an inventory server with a weight less than 1. Based on this, the abnormal inventory server request rate H is downgraded to The normal server request rate is
  • the request processing method provided in this specification determines the number of requests that need to be allocated to each task processing node through the weight provided by the task processing node. Based on this, substituting the above request rate parameters can obtain an abnormal server concurrency function, such as the following formula (2).
  • J represents the concurrency number of the abnormal server
  • the MaxCon is a preset concurrency number threshold, called the maximum action concurrency number
  • MinCon is a preset concurrency number threshold, called the minimum action concurrency number
  • MaxCon is greater than MinCon.
  • the abnormal server concurrency function (Formula 2) can be simplified to the following formula (3).
  • the change in the concurrency growth rate of the abnormal server can be calculated, see Figure 4, which is a schematic diagram of the change in the concurrency growth rate of the abnormal server in a request processing method provided by an embodiment of this specification. Based on Figure 4, it can be seen that after the total request rate A reaches 400 and the concurrency number reaches 200, the concurrency growth rate of the abnormal server slows down and eventually converges to around the maximum concurrency number of 400.
  • the constructing a request set to be processed corresponding to the first task processing node based on the request set information and the at least two requests to be processed includes:
  • the allocation node obtains, from the at least two pending requests, a target pending request corresponding to the request processing quantity of the first task processing node;
  • a set of pending requests corresponding to the first task processing node is constructed based on the target pending request, wherein the set of pending requests includes the target pending request.
  • the allocation node will obtain a number of pending requests corresponding to the number of requests to be processed by the first task processing node from at least two pending requests, and use the corresponding number of pending requests as target pending requests that need to be allocated to the first task processing node; then, based on the target pending requests, a pending request set corresponding to the first task processing node is constructed, the pending request set includes the target pending requests, and the pending request set is sent to the first task processing node, thereby preventing unlimited expansion of resource occupation, achieving rapid fault convergence, and significantly reducing the impact on users.
  • the request to be processed is an order to be processed
  • the at least two requests to be processed are based on the task processing weight and the at least two requests to be processed.
  • the first task processing node among the task processing nodes allocates a corresponding set of requests to be processed, including:
  • the allocation node allocates a corresponding set of pending orders to a first order processing node among the at least two order processing nodes based on the order task processing weight and the at least two pending orders.
  • the pending order may be understood as a commodity order that needs to be processed, and the order processing node may be understood as a server that can process the commodity order, and the server may be composed of one or more servers.
  • the allocation node can be understood as a server that allocates the pending order to the order task processing node.
  • the allocation node is the order allocation server
  • the first order processing node can be the product order processing server.
  • the product order server can determine the downgrade weight based on its own load situation, and push the downgrade weight to the order allocation server.
  • the order allocation server initiates a call to multiple product order processing servers based on the product order request sent by the client, it will use this new weight to allocate product orders, thereby reducing the number of requests received by servers with high or abnormal loads, and achieving load balancing.
  • Step 304 The first task processing node performs task processing on the pending request in the received pending request set, updates the task processing weight according to the current processing status information during the task processing, and sends the updated task processing weight to the allocation node based on the task response message.
  • the current processing status information can be understood as information characterizing the current processing status of the first task processing node, or can be understood as information characterizing the current load of the server.
  • the current processing status information can be the current concurrency number of the first task processing node, the memory occupancy rate of the first task processing node, the CPU (central processing unit) occupancy rate, etc.
  • the task processing of the pending request can be understood as deducting the commodity inventory data stored in the database associated with the first task processing node based on the inventory reduction request.
  • updating the task processing weight according to the current processing state information during the task processing includes:
  • the first task processing node monitors current processing status information during the task processing
  • the task processing weight is updated based on the current processing state information and a preset weight update parameter.
  • the current processing status information may be the current concurrent number of requests. Based on this, determining that the current processing status information meets the preset weight update condition includes:
  • the first task processing node determines that the current processing status information satisfies a preset weight update condition when determining that the current concurrent request number is greater than or equal to a preset minimum concurrent request threshold.
  • the preset minimum request concurrency threshold may be understood as a preset value, which may be used by the first task processing node to determine its own load condition, such as the preset minimum request concurrency threshold MinCon. If the current server's concurrent number is less than the minimum concurrent number of actions, no weight downgrade will be performed, and the current server's weight will be kept consistent with other normal server weights. If the current server's concurrent number is higher than the minimum concurrent number of actions, its own weight needs to be recalculated, so as to check its own load in real time to prevent the impact of unlimited expansion of requests on the server.
  • the current processing state information is the current processing resource information; the current processing resources can be understood as the resources required by the first task processing node to perform task processing, such as the CPU resources and memory resources of the server.
  • the current processing resource information can be understood as information characterizing the usage of the current processing resources, such as the CPU utilization, memory utilization, etc.
  • the first task processing node determines that the current processing state information satisfies a preset weight update condition when determining that the current processing resource information is greater than or equal to a preset resource threshold.
  • the preset resource threshold value may be understood as a preset value, which may be used by the first task processing node to determine its own load condition, for example, a CPU utilization threshold value of 90%.
  • the request processing method allows the inventory server to detect its own CPU utilization in real time.
  • its own CPU utilization of 95% is greater than or equal to the preset CPU utilization threshold of 90%, it is determined that it is in a load state and needs to adjust its own weight, thereby checking its own load situation in real time to prevent the impact of unlimited expansion of request occupancy on the server.
  • the first task processing node in the request processing method provided in this specification can monitor the current processing status information of its own task processing process in real time; and when it is determined that the current processing status information meets the preset weight update conditions, it can update its own task processing weight based on the current processing status information and the preset weight update parameters.
  • the current processing state information is the current number of concurrent requests
  • the preset weight update parameter includes a preset minimum concurrent request threshold and a preset maximum concurrent request threshold; based on this, the task processing weight is updated based on the current processing state information and the preset weight update parameter, including:
  • the first task processing node determines the preset minimum request concurrency threshold and the preset maximum request concurrency threshold
  • updated task weight information is obtained, and the task weight information is replaced based on the updated task weight information.
  • the preset maximum request concurrency threshold can be understood as a pre-set value, which can be used by the first task processing node to determine its own load situation.
  • the preset maximum request concurrency threshold is greater than the preset minimum request concurrency threshold.
  • the request processing party provided in this specification has designed two adjustment factors, namely the minimum action concurrency number MinCon and the maximum action concurrency number MaxCon; a push data (degradation weight Deweight) and an adjustment method, a custom adjustment curve. In actual applications, if the current server's concurrency is less than the minimum action concurrency number, no weight downgrade will be performed, and the current server weight will be kept consistent with other normal server weights.
  • the task processing node dynamically controls its own weight in the cluster between the minimum action concurrency number and the maximum action concurrency number.
  • the weight value provides the ability to shield faults when the server is abnormal, and realizes the disaster recovery of the service cluster.
  • the downgrade weight is determined based on the current concurrency and pushed to the consumer.
  • the downgrade weight decreases as the current concurrency increases.
  • the reduction trend in this reduction process is controlled by a custom adjustment curve, which can be a linear function curve, or can be adjusted to a quadratic function, cubic function, etc. As the number of functions increases, the server performance converges faster.
  • the processing rate of the server is consistent with the above situation.
  • the inventory server needs to determine the preset minimum concurrent action number and maximum concurrent action number, and then recalculate its own downgrade weight based on the minimum concurrent action number, the maximum concurrent action number and the current concurrency number.
  • the server performs capacity assessment based on the current concurrency to make the pushed weight value quasi-real-time and avoid information lag.
  • the downgrade weight can be determined according to the following formula (4).
  • Figure 5 is a schematic diagram of the change in the concurrency number under different functions of a request processing method provided by an embodiment of this specification.
  • Figure 5 is a fitting curve of the concurrency growth when the custom adjustment curve is a linear function, a quadratic function, and a decimation function; based on Figure 5, it can be seen that as the number of functions increases, the concurrency number is less affected by the request rate, and the protection efficiency of the server is higher.
  • the downgrade weight is 0, which means that no requests will be accepted, ensuring that the current concurrency number of the machine will never exceed the maximum action concurrency number.
  • the task processing node in a request processing method provided in this specification will actively send the task processing weight determined according to the current processing status information in the task processing process to the allocation node; and the allocation node will quickly and accurately determine the current processing status of each task processing node based on the task processing weight to avoid delay problems; and when receiving a pending request, it will allocate the pending request to the corresponding task processing node based on the current processing status of each task processing node, thereby improving the request processing efficiency.
  • Figure 6 shows a schematic diagram of the processing process of a request processing method provided by an embodiment of this specification; wherein, the order service end (i.e., the consumer end) can receive the product order provided by the user.
  • the order service end i.e., the consumer end
  • the order service end needs to send a deduction inventory request to the inventory service end (i.e., the service end corresponding to the consumer end), so as to deduct the inventory quantity of the product by calling the service of the inventory service end.
  • the process of the order service end calling the deduction inventory service provided by the inventory service end through the deduction inventory request is as follows.
  • the total request rate of the order server is A qps
  • the total number of inventory servers is B (B>1)
  • the response speed of the normal inventory server is C ms
  • the response speed of the abnormal inventory server is D ms (D>C).
  • FIG. 6 is a schematic diagram of the single-machine concurrency number in a request processing method provided by an embodiment of the present specification; Figure 7 is obtained by substituting the above-mentioned concurrency growth function into the calculation.
  • the single-machine concurrency number of the normal inventory server is only 100, while the abnormal inventory server has reached 4000, far exceeding the concurrency range limit that the general server can bear. Based on this, after the current concurrency number of the server reaches the minimum action concurrency number MinCon, through the formula Determine the downgrade weight of the abnormal inventory server and send the downgrade weight to the order server.
  • the order server will determine the corresponding request rate for each inventory server based on the weight provided by the inventory server to represent its own load situation in order to prevent unlimited expansion of resource usage, achieve rapid fault convergence, and significantly reduce the impact on users.
  • the downgrade weight is substituted into the formula
  • the request rate of the abnormal inventory server is determined, that is, the number of inventory deduction requests that need to be allocated to the abnormal server, and the corresponding number of inventory deduction requests are sent to the abnormal inventory server.
  • the request processing method provided in this specification reduces the impact by dynamically sensing and calculating the delay and timely downgrading the problematic server. Referring to Figure 6, by reducing the weight ratio of problematic and normal inventory service providers from 1:1 to 10.5:1, the upstream and downstream status conditions have greatly optimized the average request delay and delay on the user side, and the high concurrency on the entire link has also been alleviated.
  • the request processing method limits the maximum concurrency by defining two adjustment factors, namely the minimum action concurrency number and the maximum action concurrency number, thereby fundamentally solving the problem of unlimited expansion of resource usage in the unlimited scheme.
  • the proportion distribution of requests on the consumer side is adjusted by combining weight push with a custom adjustment curve, thus avoiding directly solving the processing of requests.
  • the impact on user experience is reduced by shifting the request target.
  • the abnormal server does not reject all request processing, normal services in the abnormal server can also receive requests normally, thus achieving abnormal shielding between services.
  • the performance calculation of the server itself is relatively accurate. Real-time and accurate, the server-side current limiting can ensure the efficiency and correctness of downgrade isolation.
  • the request processing method provided in this specification protects its own concurrency from the perspective of the server, and greatly optimizes and improves a single server, abnormal services, normal services, overall cluster stability, and user experience.
  • FIG. 8 shows an application flow chart of another request processing method provided according to an embodiment of the present specification.
  • the request processing method is applied to a task processing node, and the method specifically includes the following steps.
  • Step 802 Generate a task response message based on the task processing weight, and send the task response message to the allocation node.
  • Step 804 Receive a set of pending requests determined by the allocation node for the task processing node, wherein the set of pending requests is determined by the allocation node based on the task processing weight and at least two pending requests received.
  • Step 806 performing task processing on the pending requests in the received pending request set, and updating the task processing weight according to current processing status information during the task processing.
  • Step 808 Sending the updated task processing weight to the allocation node based on the task response message.
  • Another request processing method applied to task processing nodes will actively send the task processing weight determined according to the current processing status information during the task processing process to the allocation node; and the allocation node will quickly and accurately determine the current processing status of each task processing node based on the task processing weight to avoid delay problems; and when receiving pending requests, it will allocate the pending requests to the corresponding task processing nodes based on the current processing status of each task processing node, thereby improving request processing efficiency.
  • the above is a schematic scheme of another request processing method of this embodiment. It should be noted that the technical scheme of the other request processing method and the technical scheme of the above-mentioned one request processing method belong to the same concept, and the details not described in detail in the technical scheme of the other request processing method can be referred to the description of the technical scheme of the above-mentioned one request processing method.
  • FIG. 9 shows an application flow chart of another request processing method provided according to an embodiment of the present specification.
  • the request processing method is applied to a distribution node, and the method specifically includes the following steps.
  • Step 902 receiving at least two pending requests, and receiving task response messages sent by at least two task processing nodes, wherein the task response messages carry task processing weights.
  • Step 904 Based on the task processing weight and the at least two pending requests, a corresponding pending request set is allocated to a first task processing node among the at least two task processing nodes, wherein the first task processing node is one of the at least two task processing nodes.
  • Another request processing method applied to allocation nodes will receive the task processing weight determined by the task processing node based on the current processing status information during the task processing process, and quickly and accurately determine the current processing status of each task processing node based on the task processing weight, thereby avoiding delay problems, and when receiving pending requests, it will allocate pending requests to corresponding task processing nodes based on the current processing status of each task processing node, thereby improving request processing efficiency.
  • the above is a schematic scheme of another request processing method of this embodiment. It should be noted that the technical scheme of the another request processing method and the technical scheme of the above request processing method belong to the same concept, and the details of the technical scheme of the another request processing method that are not described in detail can all be referred to the description of the technical scheme of the above request processing method.
  • FIG10 shows a schematic diagram of the structure of a request processing system provided by an embodiment of this specification.
  • the system includes a distribution node 1002 and at least two task processing nodes 1004, wherein:
  • the allocation node 1002 is configured to receive at least two pending requests and receive task response messages sent by the at least two task processing nodes 1004, wherein the task response messages carry task processing weights;
  • the first task processing node 1004 is configured to perform task processing on the pending requests in the received pending request set, update the task processing weight according to the current processing status information during the task processing, and send the updated task processing weight to the allocation node 1002 based on the task response message.
  • the allocation node 1002 is further configured to determine the request set information corresponding to the first task processing node 1004 based on the task processing weight of the first task processing node 1004 among the at least two task processing nodes 1004;
  • a pending request set corresponding to the first task processing node 1004 is constructed, and the pending request set is sent to the first task processing node 1004 .
  • the allocation node 1002 is further configured to determine a first task processing node 1004 among the at least two task processing nodes 1004, and determine a task processing weight of the first task processing node 1004;
  • the node quantities of the at least two task processing nodes 1004 and the task processing weight, the request processing quantity of the first task processing node 1004 is determined, and the request processing quantity is used as request set information.
  • the allocation node 1002 is further configured to obtain, from the at least two pending requests, a target pending request corresponding to the request processing quantity of the first task processing node 1004;
  • a set of pending requests corresponding to the first task processing node 1004 is constructed based on the target pending request, wherein the set of pending requests includes the target pending request.
  • the first task processing node 1004 is further configured to monitor current processing status information during the task processing
  • the task processing weight is updated based on the current processing state information and a preset weight update parameter.
  • the current processing state information is the current number of concurrent requests
  • the preset weight update parameters include a preset minimum concurrent request threshold and a preset maximum concurrent request threshold
  • the first task processing node 1004 is further configured to determine the preset minimum request concurrency threshold and the preset maximum request concurrency threshold;
  • updated task weight information is obtained, and the task weight information is replaced based on the updated task weight information.
  • the current processing status information is the current concurrent number of requests
  • the first task processing node 1004 is further configured to determine that the current processing state information satisfies a preset weight update condition when it is determined that the current number of concurrent requests is greater than or equal to a preset minimum concurrent request threshold.
  • the current processing state information is current processing resource information
  • the first task processing node 1004 is further configured to determine that the current processing state information satisfies a preset weight update condition when it is determined that the current processing resource information is greater than or equal to a preset resource threshold.
  • the pending request is a pending order
  • the allocation node 1002 is further configured to allocate a corresponding set of pending orders to be processed to the first order processing node among the at least two order processing nodes based on the order task processing weight and the at least two pending orders.
  • the task processing node of a request processing system will actively send the task processing weight determined according to the current processing status information in the task processing process to the allocation node; and the allocation node will quickly and accurately determine the current processing status of each task processing node based on the task processing weight to avoid delay problems; and when receiving a pending request, it will allocate the pending request to the corresponding task processing node based on the current processing status of each task processing node, thereby improving the request processing efficiency.
  • this specification also provides another request processing device embodiment, wherein the request processing device is applied to a task processing node, and includes:
  • a first sending module is configured to generate a task response message based on the task processing weight, and send the task response message to the allocation node;
  • a receiving module configured to receive a set of pending requests determined by the allocation node for the task processing node, The pending request set is determined by the allocation node based on the task processing weight and at least two pending requests received;
  • a processing module configured to perform task processing on the pending requests in the received pending request set, and update the task processing weight according to current processing status information during the task processing;
  • the second sending module is configured to send the updated task processing weight to the allocation node based on the task response message.
  • Another request processing device applied to task processing nodes will actively send the task processing weight determined according to the current processing status information during the task processing process to the allocation node; and the allocation node will quickly and accurately determine the current processing status of each task processing node based on the task processing weight to avoid delay problems; and when receiving pending requests, it will allocate the pending requests to the corresponding task processing nodes based on the current processing status of each task processing node, thereby improving the request processing efficiency.
  • the above is a schematic scheme of another request processing device of this embodiment. It should be noted that the technical scheme of the another request processing device and the technical scheme of the another request processing method mentioned above belong to the same concept, and the details of the technical scheme of the another request processing device that are not described in detail can all be referred to the description of the technical scheme of the another request processing method mentioned above.
  • this specification also provides another request processing device embodiment, where the request processing device is applied to an allocation node, including:
  • a receiving module configured to receive at least two pending requests and receive task response messages sent by at least two task processing nodes, wherein the task response messages carry task processing weights;
  • the allocation module is configured to allocate a corresponding set of pending requests to a first task processing node among the at least two task processing nodes based on the task processing weight and the at least two pending requests, wherein the first task processing node is one of the at least two task processing nodes.
  • Another request processing device applied to allocation nodes will receive the task processing weight determined by the task processing node according to the current processing status information during the task processing process, and quickly and accurately determine the current processing status of each task processing node based on the task processing weight, thereby avoiding delay problems, and when receiving pending requests, it will allocate pending requests to corresponding task processing nodes based on the current processing status of each task processing node, thereby improving request processing efficiency.
  • the above is a schematic scheme of another request processing device of this embodiment. It should be noted that the technical scheme of the another request processing device and the technical scheme of the another request processing method described above belong to the same concept, and the details not described in detail in the technical scheme of the another request processing device can be referred to the description of the technical scheme of the another request processing method described above.
  • Fig. 11 shows a block diagram of a computing device 1100 according to an embodiment of the present specification.
  • the components of the computing device 1100 include but are not limited to a memory 1110 and a processor 1120.
  • the processor 1120 is connected to the memory 1110 via a bus 1130, and a database 1150 is used to store data.
  • the computing device 1100 also includes an access device 1140 that enables the computing device 1100 to communicate via one or more networks 1160.
  • networks 1160 include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet.
  • PSTN public switched telephone network
  • LAN local area network
  • WAN wide area network
  • PAN personal area network
  • Internet a combination of communication networks such as the Internet.
  • the access device 1140 may include one or more of any type of network interface (e.g., a network interface card (NIC)) whether wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a World Wide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.
  • a network interface card e.g., a network interface card (NIC)
  • WLAN wireless local area network
  • Wi-MAX World Wide Interoperability for Microwave Access
  • Ethernet e.g., a USB interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.
  • USB universal serial bus
  • NFC near field communication
  • the above components of the computing device 1100 and other components not shown in FIG. 11 may also be connected to each other, for example, through a bus. It should be understood that the computing device structure block diagram shown in FIG. 11 is only for illustrative purposes and is not intended to limit the scope of the present specification. Those skilled in the art may add or replace other components as needed.
  • the computing device 1100 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or PC.
  • the computing device 1100 may also be a mobile or stationary server.
  • the processor 1120 is used to execute the following computer executable instructions, which implement the steps of the above-mentioned request processing method when executed by the processor.
  • An embodiment of the present specification further provides a computer-readable storage medium storing computer-executable instructions, which can implement the steps of the above-mentioned request processing method when executed by a processor.
  • An embodiment of the present specification further provides a computer program, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the above-mentioned request processing method.
  • the computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc.
  • the computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Economics (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Strategic Management (AREA)
  • Human Resources & Organizations (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Marketing (AREA)
  • Finance (AREA)
  • Accounting & Taxation (AREA)
  • Development Economics (AREA)
  • General Engineering & Computer Science (AREA)
  • Multi Processors (AREA)
  • Computer And Data Communications (AREA)

Abstract

Provided in the embodiments of the description are a request processing method and system. The request processing method is applied to the request processing system. The system comprises an allocation node and at least two task processing nodes. The method comprises: an allocation node receiving at least two requests to be processed, and receiving task response messages sent by at least two task processing nodes, wherein the task response messages carry a task processing weight; and on the basis of the task processing weights and the at least two requests to be processed, allocating a corresponding set of requests to be processed to a first task processing node among the at least two task processing nodes, wherein the first task processing node is one of the at least two task processing nodes; and the first task processing node performing task processing on the requests to be processed in the received set of requests to be processed, updating the task processing weights according to the current processing state information in the task processing process, and sending the updated task processing weights to the allocation node on the basis of the task response messages.

Description

请求处理方法以及***Request processing method and system
本申请要求于2022年10月24日提交中国专利局、申请号为202211304750.9、申请名称为“请求处理方法以及***”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to the Chinese patent application filed with the China Patent Office on October 24, 2022, with application number 202211304750.9 and application name “Request Processing Method and System”, all contents of which are incorporated by reference in this application.
技术领域Technical Field
本说明书实施例涉及计算机技术领域,特别涉及一种请求处理方法。The embodiments of this specification relate to the field of computer technology, and in particular to a request processing method.
背景技术Background technique
随着互联网技术的不断发展,一个服务端在接收到请求后可能需要调用其他服务端对该请求进行处理;而该服务端将请求分配至其他服务端时,为了提高请求处理效率,会采用负载均分的方式,根据各服务端的当前处理状态为其分配对应的请求。With the continuous development of Internet technology, a server may need to call other servers to process the request after receiving it. When the server distributes the request to other servers, in order to improve the request processing efficiency, it will adopt a load balancing method to distribute the corresponding request to each server according to its current processing status.
现有技术中,服务端对其他服务端的当前处理状态进行监测,但是该方式会存在延迟的问题,导致服务端无法及时的了解其他服务端的当前处理状态,因此降低请求处理效率。In the prior art, the server monitors the current processing status of other servers, but this method has a delay problem, resulting in the server being unable to understand the current processing status of other servers in a timely manner, thereby reducing the request processing efficiency.
发明内容Summary of the invention
有鉴于此,本说明书实施例提供了一种请求处理方法。本说明书一个或者多个实施例同时涉及一种请求处理***,另两种请求处理方法,两种请求处理装置,一种计算设备,一种计算机可读存储介质以及一种计算机程序,以解决现有技术中存在的技术缺陷。In view of this, an embodiment of this specification provides a request processing method. One or more embodiments of this specification also involve a request processing system, two other request processing methods, two request processing devices, a computing device, a computer-readable storage medium and a computer program to solve the technical defects existing in the prior art.
根据本说明书实施例的第一方面,提供了一种请求处理方法,应用于请求处理***,所述***包括分配节点以及至少两个任务处理节点,所述方法包括:According to a first aspect of an embodiment of this specification, a request processing method is provided, which is applied to a request processing system, the system comprising a distribution node and at least two task processing nodes, the method comprising:
所述分配节点,接收至少两个待处理请求,并接收所述至少两个任务处理节点发送的任务响应消息,所述任务响应消息中携带任务处理权重;以及The allocation node receives at least two pending requests and receives a task response message sent by the at least two task processing nodes, wherein the task response message carries a task processing weight; and
基于所述任务处理权重以及所述至少两个待处理请求,为所述至少两个任务处理节点中的第一任务处理节点分配对应的待处理请求集合,其中,所述第一任务处理节点为所述至少两个任务处理节点之一;Based on the task processing weight and the at least two pending requests, assigning a corresponding pending request set to a first task processing node among the at least two task processing nodes, wherein the first task processing node is one of the at least two task processing nodes;
所述第一任务处理节点,对接收的所述待处理请求集合中的所述待处理请求进行任务处理,并根据所述任务处理过程中的当前处理状态信息,对所述任务处理权重进行更新,且基于所述任务响应消息将更新后的任务处理权重发送至所述分配节点。The first task processing node performs task processing on the pending request in the received pending request set, updates the task processing weight according to the current processing status information during the task processing, and sends the updated task processing weight to the allocation node based on the task response message.
根据本说明书实施例的第二方面,提供了一种请求处理***,所述***包括分配节点以及至少两个任务处理节点,其中,According to a second aspect of an embodiment of this specification, a request processing system is provided, the system comprising a distribution node and at least two task processing nodes, wherein:
所述分配节点,被配置为接收至少两个待处理请求,并接收所述至少两个任务处理节点发送的任务响应消息,所述任务响应消息中携带任务处理权重;以及 The allocation node is configured to receive at least two pending requests and receive a task response message sent by the at least two task processing nodes, wherein the task response message carries a task processing weight; and
基于所述任务处理权重以及所述至少两个待处理请求,为所述至少两个任务处理节点中的第一任务处理节点分配对应的待处理请求集合,其中,所述第一任务处理节点为所述至少两个任务处理节点之一;Based on the task processing weight and the at least two pending requests, assigning a corresponding pending request set to a first task processing node among the at least two task processing nodes, wherein the first task processing node is one of the at least two task processing nodes;
所述第一任务处理节点,被配置为对接收的所述待处理请求集合中的所述待处理请求进行任务处理,并根据所述任务处理过程中的当前处理状态信息,对所述任务处理权重进行更新,且基于所述任务响应消息将更新后的任务处理权重发送至所述分配节点。The first task processing node is configured to perform task processing on the pending requests in the received pending request set, update the task processing weight according to the current processing status information during the task processing, and send the updated task processing weight to the allocation node based on the task response message.
根据本说明书实施例的第三方面,提供了一种请求处理方法,应用于任务处理节点,包括:According to a third aspect of an embodiment of this specification, a request processing method is provided, which is applied to a task processing node, including:
基于任务处理权重生成任务响应消息,并将所述任务响应消息发送至分配节点;Generate a task response message based on the task processing weight, and send the task response message to the allocation node;
接收所述分配节点为所述任务处理节点确定的待处理请求集合,其中,所述待处理请求集合为所述分配节点基于所述任务处理权重以及接收的至少两个待处理请求确定;receiving a set of pending requests determined by the allocation node for the task processing node, wherein the set of pending requests is determined by the allocation node based on the task processing weight and at least two pending requests received;
对接收的所述待处理请求集合中的所述待处理请求进行任务处理,并根据所述任务处理过程中的当前处理状态信息,对所述任务处理权重进行更新;Performing task processing on the pending requests in the received pending request set, and updating the task processing weight according to current processing status information during the task processing;
基于所述任务响应消息将更新后的任务处理权重发送至所述分配节点。The updated task processing weight is sent to the allocation node based on the task response message.
根据本说明书实施例的第四方面,提供了一种请求处理装置,应用于任务处理节点,包括:According to a fourth aspect of an embodiment of this specification, a request processing device is provided, which is applied to a task processing node, including:
第一发送模块,被配置为基于任务处理权重生成任务响应消息,并将所述任务响应消息发送至分配节点;A first sending module is configured to generate a task response message based on the task processing weight, and send the task response message to the allocation node;
接收模块,被配置为接收所述分配节点为所述任务处理节点确定的待处理请求集合,其中,所述待处理请求集合为所述分配节点基于所述任务处理权重以及接收的至少两个待处理请求确定;A receiving module, configured to receive a set of pending requests determined by the allocation node for the task processing node, wherein the set of pending requests is determined by the allocation node based on the task processing weight and at least two pending requests received;
处理模块,被配置为对接收的所述待处理请求集合中的所述待处理请求进行任务处理,并根据所述任务处理过程中的当前处理状态信息,对所述任务处理权重进行更新;A processing module, configured to perform task processing on the pending requests in the received pending request set, and update the task processing weight according to current processing status information during the task processing;
第二发送模块,被配置为基于所述任务响应消息将更新后的任务处理权重发送至所述分配节点。The second sending module is configured to send the updated task processing weight to the allocation node based on the task response message.
根据本说明书实施例的第五方面,提供了一种请求处理方法,应用于分配节点,包括:According to a fifth aspect of an embodiment of this specification, a request processing method is provided, which is applied to an allocation node, including:
接收至少两个待处理请求,并接收至少两个任务处理节点发送的任务响应消息,其中,所述任务响应消息中携带任务处理权重;receiving at least two pending requests and receiving task response messages sent by at least two task processing nodes, wherein the task response messages carry task processing weights;
基于所述任务处理权重以及所述至少两个待处理请求,为所述至少两个任务处理节点中的第一任务处理节点分配对应的待处理请求集合,其中,所述第一任务处理节点为所述至少两个任务处理节点之一。Based on the task processing weight and the at least two pending requests, a corresponding pending request set is allocated to a first task processing node among the at least two task processing nodes, wherein the first task processing node is one of the at least two task processing nodes.
根据本说明书实施例的第六方面,提供了一种请求处理装置,应用于分配节点,包括:According to a sixth aspect of an embodiment of this specification, a request processing device is provided, which is applied to an allocation node, including:
接收模块,被配置为接收至少两个待处理请求,并接收至少两个任务处理节点发送的 任务响应消息,其中,所述任务响应消息中携带任务处理权重;A receiving module is configured to receive at least two pending requests and receive at least two task processing nodes. A task response message, wherein the task response message carries a task processing weight;
分配模块,被配置为基于所述任务处理权重以及所述至少两个待处理请求,为所述至少两个任务处理节点中的第一任务处理节点分配对应的待处理请求集合,其中,所述第一任务处理节点为所述至少两个任务处理节点之一。The allocation module is configured to allocate a corresponding set of pending requests to a first task processing node among the at least two task processing nodes based on the task processing weight and the at least two pending requests, wherein the first task processing node is one of the at least two task processing nodes.
根据本说明书实施例的第七方面,提供了一种计算设备,包括:According to a seventh aspect of an embodiment of this specification, there is provided a computing device, including:
存储器和处理器;Memory and processor;
所述存储器用于存储计算机可执行指令,所述处理器用于执行所述计算机可执行指令,该计算机可执行指令被处理器执行时实现上述请求处理方法的步骤。The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions. When the computer executable instructions are executed by the processor, the steps of the above request processing method are implemented.
根据本说明书实施例的第八方面,提供了一种计算机可读存储介质,其存储有计算机可执行指令,该指令被处理器执行时实现上述请求处理方法的步骤。According to an eighth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores computer-executable instructions, and when the instructions are executed by a processor, the steps of the above-mentioned request processing method are implemented.
根据本说明书实施例的第九方面,提供了一种计算机程序,其中,当所述计算机程序在计算机中执行时,令计算机执行上述请求处理方法的步骤。According to a ninth aspect of the embodiments of this specification, a computer program is provided, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the above-mentioned request processing method.
本说明书一实施例提供的请求处理方法,应用于请求处理***,所述***包括分配节点以及至少两个任务处理节点,所述方法包括:所述分配节点,接收至少两个待处理请求,并接收所述至少两个任务处理节点发送的任务响应消息,所述任务响应消息中携带任务处理权重;以及基于所述任务处理权重以及所述至少两个待处理请求,为所述至少两个任务处理节点中的第一任务处理节点分配对应的待处理请求集合,其中,所述第一任务处理节点为所述至少两个任务处理节点之一;所述第一任务处理节点,对接收的所述待处理请求集合中的所述待处理请求进行任务处理,并根据所述任务处理过程中的当前处理状态信息,对所述任务处理权重进行更新,且基于所述任务响应消息将更新后的任务处理权重发送至所述分配节点。A request processing method provided in an embodiment of the present specification is applied to a request processing system, wherein the system includes an allocation node and at least two task processing nodes, and the method includes: the allocation node receives at least two pending requests, and receives a task response message sent by the at least two task processing nodes, wherein the task response message carries a task processing weight; and based on the task processing weight and the at least two pending requests, allocates a corresponding set of pending requests to a first task processing node among the at least two task processing nodes, wherein the first task processing node is one of the at least two task processing nodes; the first task processing node performs task processing on the pending requests in the received set of pending requests, updates the task processing weight according to current processing status information during the task processing, and sends the updated task processing weight to the allocation node based on the task response message.
具体的,该方法的任务处理节点,会将根据任务处理过程中的当前处理状态信息所确定的任务处理权重,主动发送至分配节点;而该分配节点会基于该任务处理权重快速且准确的确定每个任务处理节点的当前处理状态,避免延迟的问题;并且,在接收到待处理请求时会基于每个任务处理节点的当前处理状态,将待处理请求分配至对应的任务处理节点,提高了请求处理效率。Specifically, the task processing node of the method will actively send the task processing weight determined according to the current processing status information in the task processing process to the allocation node; and the allocation node will quickly and accurately determine the current processing status of each task processing node based on the task processing weight, avoiding delay problems; and when receiving pending requests, it will allocate the pending requests to the corresponding task processing nodes based on the current processing status of each task processing node, thereby improving request processing efficiency.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1是本说明书一个实施例提供的请求分配示意图;FIG1 is a schematic diagram of request allocation provided by an embodiment of this specification;
图2是本说明书一个实施例提供的一种请求处理方法的应用示意图;FIG2 is an application diagram of a request processing method provided by an embodiment of this specification;
图3是本说明书一个实施例提供的一种请求处理方法的流程图;FIG3 is a flow chart of a request processing method provided by an embodiment of this specification;
图4是本说明书一个实施例提供的一种请求处理方法的中异常服务端的并发增速变化示意图;FIG4 is a schematic diagram of a concurrent growth rate change of an abnormal server in a request processing method provided by an embodiment of this specification;
图5是本说明书一个实施例提供的一种请求处理方法的在不同函数下并发数的变化示意图; FIG5 is a schematic diagram of changes in the number of concurrent requests under different functions of a request processing method provided by an embodiment of this specification;
图6是本说明书一个实施例提供的一种请求处理方法的处理过程示意图;FIG6 is a schematic diagram of a processing process of a request processing method provided by an embodiment of this specification;
图7是本说明书一个实施例提供的一种请求处理方法中的单机并发数的示意图;FIG7 is a schematic diagram of the number of concurrent requests on a single machine in a request processing method provided by an embodiment of this specification;
图8是本说明书一个实施例提供的另一种请求处理方法的流程图;FIG8 is a flowchart of another request processing method provided by an embodiment of this specification;
图9是本说明书一个实施例提供的又一种请求处理方法的流程图;FIG9 is a flowchart of another request processing method provided by an embodiment of this specification;
图10是本说明书一个实施例提供的一种请求处理***的结构示意图;FIG10 is a schematic diagram of the structure of a request processing system provided by an embodiment of the present specification;
图11是本说明书一个实施例提供的一种计算设备的结构框图。FIG. 11 is a structural block diagram of a computing device provided by an embodiment of the present specification.
具体实施方式Detailed ways
在下面的描述中阐述了很多具体细节以便于充分理解本说明书。但是本说明书能够以很多不同于在此描述的其它方式来实施,本领域技术人员可以在不违背本说明书内涵的情况下做类似推广,因此本说明书不受下面公开的具体实施的限制。Many specific details are described in the following description to facilitate a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of this specification, so this specification is not limited to the specific implementation disclosed below.
在本说明书一个或多个实施例中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本说明书一个或多个实施例。在本说明书一个或多个实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本说明书一个或多个实施例中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and/or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.
应当理解,尽管在本说明书一个或多个实施例中可能采用术语第一、第二等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本说明书一个或多个实施例范围的情况下,第一也可以被称为第二,类似地,第二也可以被称为第一。取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”。It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
首先,对本说明书一个或多个实施例涉及的名词术语进行解释。First, the terms involved in one or more embodiments of this specification are explained.
服务并发:某一时刻下服务器正在处理的瞬时请求数。Service concurrency: The number of instantaneous requests that the server is processing at a certain moment.
请求速率:某一段时间内发送的总请求数。Request rate: The total number of requests sent within a certain period of time.
响应速度:单个请求从开始处理到完成所使用的时间。Response speed: The time it takes for a single request to be processed from the beginning to the completion.
负载均衡:从多个地址中通过一定算法选择一个最佳地址,在请求量达到一定程度后可以达到所有地址资源最大利用率。Load balancing: Select an optimal address from multiple addresses through a certain algorithm, and when the request volume reaches a certain level, the maximum utilization of all address resources can be achieved.
随着互联网技术的不断发展,一个服务端在接收到请求后可能需要调用其他服务端对该请求进行处理;而该服务端将请求分配至其他服务端时,为了提高请求处理效率,会采用负载均分的方式,根据各服务端的当前处理状态为其分配对应的请求。例如,对于大部分微服务化应用来说,服务端提供的一个服务往往都需要作为消费端,再依赖另外的若干个服务对自身接收到的请求进行处理,而对外暴露数据管理能力的服务大多都需要依赖数据库进行处理。参见图1,图1是本说明书一个实施例提供的订单服务的请求分配示意图;基于图1的A部分可知,订单服务端依赖了库存服务端的一个服务进行库存扣减,而库存服务端又需要依赖数据库进行数据的持久化。其中,QPS为请求速率,该ms为响应速 度。但是在生产环境中,由于来自数据库的慢处理,网络的抖动等问题都可能导致库存服务端提供的服务出现阻塞,发生瞬时并发大幅提高的情况,给机器带来极为严重的压力,甚至会导致服务宕机的情况。参见图1的B部分可知,图1的B部分是模拟数据库存在慢处理问题的场景下的请求处理情况,当库存服务端A的数据库连接出现了问题,单个请求需要2000ms来处理,这将导致库存服务A的瞬时并发达到840,即图中虚线部分,导致上游的订单服务甚至从80并发数上涨到了880并发数,有一半的用户请求的处理时长达到了2100ms以上,这无论对用户的请求体验或者是整个***的稳定性都带来了不良的因素。因此可知,对于大部分微服务化的应用来说,如果服务端处理性能出现抖动,服务端的瞬时并发会由于总体请求处理变慢导致瞬间上涨到很高,直接导致服务不可用乃至服务雪崩等后果。With the continuous development of Internet technology, a server may need to call other servers to process the request after receiving it; and when the server distributes the request to other servers, in order to improve the efficiency of request processing, it will adopt a load balancing method to distribute the corresponding request to each server according to its current processing status. For example, for most microservice applications, a service provided by a server often needs to act as a consumer and rely on several other services to process the requests it receives, and most services that expose data management capabilities to the outside world need to rely on databases for processing. Refer to Figure 1, which is a request allocation diagram for an order service provided by an embodiment of the present specification; based on part A of Figure 1, it can be seen that the order server relies on a service of the inventory server for inventory deductions, and the inventory server needs to rely on the database for data persistence. Among them, QPS is the request rate, and the ms is the response rate. However, in a production environment, problems such as slow processing from the database and network jitter may cause the services provided by the inventory server to be blocked, resulting in a significant increase in instantaneous concurrency, which will bring extremely serious pressure to the machine and even cause the service to crash. As shown in part B of Figure 1, part B of Figure 1 simulates the request processing in a scenario where the database has a slow processing problem. When there is a problem with the database connection of inventory server A, a single request takes 2000ms to process, which will cause the instantaneous concurrency of inventory service A to reach 840, that is, the dotted part of the figure, causing the upstream order service to even increase from 80 concurrency to 880 concurrency. Half of the user requests take more than 2100ms to process, which has adverse effects on both the user's request experience and the stability of the entire system. Therefore, it can be seen that for most microservice applications, if the server processing performance jitters, the instantaneous concurrency of the server will instantly rise to a very high level due to the slow overall request processing, directly leading to consequences such as service unavailability and even service avalanche.
基于此,本说明书针对对于服务端阻塞造成瞬时并发增长的问题,提供了三种处理方案,分别是直接不设限方案、设置最大并发限制方案,以及客户端视角进行负载均衡调度方案。Based on this, this manual provides three solutions to the problem of instantaneous concurrency growth caused by server-side blocking, namely, a direct unlimited solution, a maximum concurrency limit setting solution, and a load balancing scheduling solution from the client perspective.
但是,上述解决方法,都有可能出现服务端阻塞造成瞬时并发增长的情况。针对设置最大并发限制的方案,是指服务端的瞬时并发数在达到一定量的时候就拒绝接收新的请求,此方案是以牺牲一定请求成功数来保障应用的总体性能。该方案达到限制之后拒绝新的请求,会给用户带来不好的体验。However, the above solutions may cause the server to be blocked and cause the instantaneous concurrency to increase. The solution of setting the maximum concurrency limit means that when the instantaneous concurrency of the server reaches a certain amount, it will refuse to accept new requests. This solution sacrifices a certain number of successful requests to ensure the overall performance of the application. This solution will reject new requests after the limit is reached, which will bring a bad experience to users.
另外一种是不做任何限制,任由并发无限制提升。不设限方案是指在出现单个服务并发上涨的时候继续扩容处理池,以满足并发的需要。由于不对扩容设限制,在请求并发量上升的时候会对提供者带来一定的压力,而随着压力的上升,所有服务的总体处理时长也会变长,当并发量达到一定的程度以后,很可能会导致进程出现内存溢出。如图1的C部分所示,设置最大并发数为100个,可以看到每秒约有352个请求被拒绝,换来的是全链路上应用的并发数总体都不会特别高。最大并发限制有两种限制方式,一种是每个服务独享一个并发度,另外一种是多个服务共享一个并发度。独享并发度的方式如果限制值偏大,在多个服务都阻塞的时候仍会导致内存溢出等问题,如果限制值偏小则不适用于一些IO密集型服务。共享模式如果某个服务阻塞以后会导致在同一个服务组里面的其他服务也无法收到新的请求,影响正常的请求。一般不会默认使用独享并发度,仅提供基于自定义配置的支持。因此,最大并发限制方案有两个比较大的缺点:一是会造成请求成功数下降的问题,给用户带来不好的体验;二是异常服务在进行限制的时候也会影响正常的服务,扩大了影响面。The other is to allow the concurrency to increase without any restrictions. The unrestricted solution means that when the concurrency of a single service increases, the processing pool will continue to expand to meet the concurrency needs. Since there is no limit on the expansion, when the number of concurrent requests increases, it will bring certain pressure to the provider. As the pressure increases, the overall processing time of all services will also increase. When the concurrency reaches a certain level, it is likely to cause memory overflow in the process. As shown in part C of Figure 1, the maximum concurrency is set to 100. It can be seen that about 352 requests are rejected per second, which means that the overall concurrency of applications on the entire link will not be particularly high. There are two ways to limit the maximum concurrency. One is that each service has a dedicated concurrency, and the other is that multiple services share a concurrency. If the exclusive concurrency method has a large limit value, it will still cause problems such as memory overflow when multiple services are blocked. If the limit value is too small, it is not suitable for some IO-intensive services. In the shared mode, if a service is blocked, other services in the same service group will not be able to receive new requests, affecting normal requests. Generally, exclusive concurrency is not used by default, and only support based on custom configuration is provided. Therefore, the maximum concurrency limit solution has two major disadvantages: first, it will cause the number of successful requests to decrease, which will bring a bad experience to users; second, abnormal services will also affect normal services when they are restricted, expanding the impact.
第三种为客户端视角进行负载均衡调度的方式,在客户端视角进行负载均衡调度是指通过消费端感知服务端的如响应时间等指标,在消费端单机进行服务粒度的最优服务端选择。常见的算法有如最小活跃数算法、最快响应算法等。但是这些算法由于仅能站在消费端单机视角进行流量的调度,并不能及时高效地了解每一台服务端的真实单机性能情况。此外,最小活跃数、最快响应等算法依赖集群内的机器配置、响应时间等类似指标才能较 好地工作,在复杂的混部场景下很容易出现误判。The third method is to perform load balancing scheduling from the client's perspective. Load balancing scheduling from the client's perspective means that the consumer perceives the server's indicators such as response time, and selects the optimal server for service granularity on the consumer's single machine. Common algorithms include the minimum active number algorithm and the fastest response algorithm. However, since these algorithms can only schedule traffic from the perspective of a single machine on the consumer's end, they cannot understand the actual single-machine performance of each server in a timely and efficient manner. In addition, algorithms such as the minimum active number and the fastest response rely on similar indicators such as machine configuration and response time within the cluster to be more accurate. It is easy to make misjudgments in complex colocation scenarios.
基于此,在本说明书中,提供了一种请求处理方法,本说明书同时涉及一种请求处理***,另一种请求处理方法,一种请求处理装置,一种计算设备,以及一种计算机可读存储介质,在下面的实施例中逐一进行详细说明。Based on this, in this specification, a request processing method is provided. This specification also involves a request processing system, another request processing method, a request processing apparatus, a computing device, and a computer-readable storage medium, which are described in detail one by one in the following embodiments.
参见图2,图2示出了根据本说明书一个实施例提供的一种请求处理方法的应用示意图,需要说明的是,本说明书提供的请求处理方法采用动态权重推送的方式,在保证最大并发数不超过预期的情况下通过权重调度的方式降低有问题的服务端的调用速度。在避免直接抛出异常给用户造成困扰的前提下,可以保证单台服务端的压力不会超过上限。基于此,参见图2,本说明书提供的请求处理方法,在订单服务端(可以作为消费端)与库存服务端之间的调用链路中,加入了从服务端返回推送给消费端权重大小的数据通路。在服务端负载较高的时候,该库存服务端可以根据自身负载情况确定的降级权重,通过此数据通路向消费者推送降级权重,在下次消费端在基于客户端发送的订单请求,向多个库存服务端发起调用的时候会使用此新的权重进行订单请求的分配,从而减少负载较高或异常的服务端所接收到的请求数量,实现负载均分。基于此,本本说明书提供的一种请求处理方法,旨在通过服务端反向推送自适应降级权重,进行集群的智能流量调度,实现异常单机节点的服务降级隔离,防止资源占用无限扩展,达到快速的故障收敛,大幅减低对用户的影响。Referring to FIG. 2, FIG. 2 shows an application schematic diagram of a request processing method provided according to an embodiment of the present specification. It should be noted that the request processing method provided in the present specification adopts a dynamic weight push method, and reduces the call speed of the problematic server by weight scheduling while ensuring that the maximum number of concurrent connections does not exceed expectations. Under the premise of avoiding directly throwing an exception to cause trouble to the user, it can be ensured that the pressure of a single server will not exceed the upper limit. Based on this, referring to FIG. 2, the request processing method provided in the present specification adds a data path of the weight size returned from the server to the consumer in the call link between the order server (which can be used as the consumer) and the inventory server. When the server load is high, the inventory server can push the downgrade weight to the consumer through this data path according to the downgrade weight determined by its own load situation. The next time the consumer initiates a call to multiple inventory servers based on the order request sent by the client, this new weight will be used to distribute the order request, thereby reducing the number of requests received by the server with high load or abnormality, and realizing load balancing. Based on this, this manual provides a request processing method that aims to perform intelligent traffic scheduling of the cluster by reversely pushing adaptive degradation weights through the server, realize service degradation isolation of abnormal single-machine nodes, prevent unlimited expansion of resource occupation, achieve rapid fault convergence, and significantly reduce the impact on users.
参见图3,图3示出了根据本说明书一个实施例提供的一种请求处理方法的应用流程图,该请求处理方法应用于请求处理***,所述***包括分配节点以及至少两个任务处理节点,所述方法具体包括以下步骤。Refer to Figure 3, which shows an application flow chart of a request processing method provided according to an embodiment of this specification. The request processing method is applied to a request processing system, the system includes a distribution node and at least two task processing nodes, and the method specifically includes the following steps.
步骤302:所述分配节点,接收至少两个待处理请求,并接收所述至少两个任务处理节点发送的任务响应消息,所述任务响应消息中携带任务处理权重;以及基于所述任务处理权重以及所述至少两个待处理请求,为所述至少两个任务处理节点中的第一任务处理节点分配对应的待处理请求集合,其中,所述第一任务处理节点为所述至少两个任务处理节点之一。Step 302: The allocation node receives at least two pending requests and receives a task response message sent by the at least two task processing nodes, wherein the task response message carries a task processing weight; and based on the task processing weight and the at least two pending requests, allocates a corresponding set of pending requests to a first task processing node among the at least two task processing nodes, wherein the first task processing node is one of the at least two task processing nodes.
其中,任务处理节点可以理解为能对待处理请求进行处理的节点,该任务处理节点可以为任务处理服务端,例如,该上述库存服务端、物流服务端等,该服务端可以为一个或多个服务器。该分配节点可以理解为能够将自身接收或生成的待处理请求,分配至与其相关联的任务处理节点的服务端,该分配节点也可以称为消费端,例如,该分配节点可以为上述订单服务端,该订单服务端可以接收用户通过用户终端发送的订单请求。待处理请求可以理解为用户通过终端向该分配节点发送的用户请求,例如,订单请求、数据获取请求等等。或者,该待处理请求也可以理解为该分配节点根据用户发送的用户请求所生成的请求,例如,在用户向其发送购物订单请求之后,该订单服务端在处理完成该购物订单请求之后,需要向库存服务端发送减扣库存请求,从而通过调用该库存服务端的服务,对该商品的库存数量进行扣除。避免由于该商品售空后,由于库存数量没有减少导致用户下单后 无法获得商品的问题。待处理请求集合可以理解为由特定数量的待处理请求所构成的集合。Among them, the task processing node can be understood as a node that can process pending requests. The task processing node can be a task processing server, for example, the above-mentioned inventory server, logistics server, etc., and the server can be one or more servers. The distribution node can be understood as a server that can distribute the pending requests received or generated by itself to the task processing node associated with it. The distribution node can also be called a consumer end. For example, the distribution node can be the above-mentioned order server, and the order server can receive order requests sent by users through user terminals. Pending requests can be understood as user requests sent by users to the distribution node through terminals, such as order requests, data acquisition requests, etc. Alternatively, the pending request can also be understood as a request generated by the distribution node according to the user request sent by the user. For example, after the user sends a shopping order request to it, the order server needs to send a deduction request to the inventory server after processing the shopping order request, so as to deduct the inventory quantity of the product by calling the service of the inventory server. Avoid the situation where the user places an order after the product is sold out and the inventory quantity has not been reduced. The problem of not being able to obtain goods. The pending request set can be understood as a set consisting of a specific number of pending requests.
该任务响应消息可以理解为该任务处理节点通过其与分配节点之间的数据通路,向分配节点发送的消息,该消息中携带有任务处理权重。The task response message can be understood as a message sent by the task processing node to the allocation node through the data path between the task processing node and the allocation node, and the message carries the task processing weight.
任务处理权重可以理解为表征该任务处理节点自身请求处理能力的参数,该参数可以为一个取值区间内的任意数值,例如[0,1]或[0,100]取值区间内的任意数值。也即是说,该任务处理节点根据自身进行任务处理过程中的当前任务处理信息生成任务处理权重,该任务处理权重用于表征该任务处理节点自身任务处理情况的信息。需要说明的是,本说明书提供的请求处理方法中该,任务处理权重为任务处理节点自身进行计算并反馈至分配节点。从而通过权重反向推送的方式打通服务端向消费端反馈的通道,为服务端进行自身保护提供了可行性。The task processing weight can be understood as a parameter that characterizes the request processing capability of the task processing node itself. The parameter can be any value within a value range, such as any value within the value range of [0,1] or [0,100]. In other words, the task processing node generates a task processing weight based on the current task processing information during its own task processing process. The task processing weight is used to characterize the information about the task processing status of the task processing node itself. It should be noted that in the request processing method provided in this specification, the task processing weight is calculated by the task processing node itself and fed back to the allocation node. Thereby, the channel for feedback from the server to the consumer is opened up by reversely pushing the weight, which provides feasibility for the server to protect itself.
下面以请求处理方法在电商场景下的应用为例,对该请求处理方法进行说明,其中,该分配节点为订单服务端,该任务处理节点为库存服务端,该待处理请求为减扣库存请求,该任务处理权重可以为每个库存服务端对应的权重。基于此,该库存服务端会根据当前自身进行减扣库存处理过程中的当前处理状态信息,确定自身的权重;之后基于该权重信息生成一个权重调整消息,并将该权重调整消息发送至订单服务端。The following uses the application of the request processing method in an e-commerce scenario as an example to illustrate the request processing method, wherein the allocation node is the order server, the task processing node is the inventory server, the pending request is a request for inventory reduction, and the task processing weight can be the weight corresponding to each inventory server. Based on this, the inventory server will determine its own weight based on the current processing status information during its own inventory reduction processing; then generate a weight adjustment message based on the weight information, and send the weight adjustment message to the order server.
该订单服务端接收每个库存服务端发送的权重调整消息,并从该权重调整消息中确定每个库存服务端的权重。接收到用户通过客户端发送的、针对商品的购物订单处理请求的情况下,会生成针对该商品的减扣库存请求,其中该购物订单处理请求的数量与减扣库存请求的数量为一致。之后,该订单服务端会根据每个库存服务端的权重,为每个库存服务端分配特定数量的减扣库存请求,并将该减扣库存请求分配发送至对应的库存服务端。也即是说,本说明书提供的请求处理方法,库存服务端的通过权重推送的方式来反馈自身的压力信息,避免直接拒绝请求造成服务成功率降低的问题,保证正常的服务能够继续处理,将故障隔离在单一服务内。The order server receives the weight adjustment message sent by each inventory server, and determines the weight of each inventory server from the weight adjustment message. When a shopping order processing request for a product is received from a user through a client, a request for deduction of inventory for the product is generated, wherein the number of the shopping order processing request is consistent with the number of the request for deduction of inventory. Afterwards, the order server will allocate a specific number of deduction of inventory requests to each inventory server according to the weight of each inventory server, and allocate and send the deduction of inventory requests to the corresponding inventory server. In other words, the request processing method provided in this specification is that the inventory server feeds back its own pressure information by pushing weights, thereby avoiding the problem of reducing the success rate of the service due to direct rejection of the request, ensuring that normal services can continue to be processed, and isolating faults within a single service.
在本说明书提供的一实施例中,本说明书提供的请求处理方法,在进行请求分配的过程中,会根据表征每个任务处理节点的当前处理状态的任务处理权重,为每个任务处理节点确定对应数量的待处理请求,并分配至对应的任务处理节点,从而实现针对任务处理节点的负载均分,实现集群的智能流量调度。具体的,所述至少两个任务处理节点中的第一任务处理节点分配对应的待处理请求集合,包括:In one embodiment provided in this specification, the request processing method provided in this specification, in the process of request allocation, determines a corresponding number of pending requests for each task processing node according to the task processing weight that characterizes the current processing state of each task processing node, and allocates them to the corresponding task processing node, thereby achieving load balancing for the task processing nodes and realizing intelligent traffic scheduling of the cluster. Specifically, the first task processing node among the at least two task processing nodes allocates the corresponding set of pending requests, including:
所述分配节点,基于所述至少两个任务处理节点中的第一任务处理节点的任务处理权重,确定所述第一任务处理节点对应的请求集合信息;The allocation node determines, based on a task processing weight of a first task processing node among the at least two task processing nodes, request set information corresponding to the first task processing node;
基于所述请求集合信息以及所述至少两个待处理请求,构建所述第一任务处理节点对应的待处理请求集合,并将所述待处理请求集合发送至所述第一任务处理节点。Based on the request set information and the at least two pending requests, a pending request set corresponding to the first task processing node is constructed, and the pending request set is sent to the first task processing node.
其中,该请求集合信息可以理解为构建该请求集合信息的信息,例如,该请求集合信 息可以为每个任务处理节点所需要分配的待处理请求的数量。The request set information can be understood as information for constructing the request set information. The information can be used to indicate the number of pending requests that need to be allocated to each task processing node.
具体的,所述基于所述至少两个任务处理节点中的第一任务处理节点的任务处理权重,确定所述第一任务处理节点对应的请求集合信息,包括:Specifically, determining the request set information corresponding to the first task processing node among the at least two task processing nodes based on the task processing weight of the first task processing node includes:
所述分配节点,确定所述至少两个任务处理节点中的第一任务处理节点,并确定所述第一任务处理节点的任务处理权重;The allocation node determines a first task processing node among the at least two task processing nodes, and determines a task processing weight of the first task processing node;
基于所述至少两个待处理请求的请求数量、所述至少两个任务处理节点的节点数量以及所述任务处理权重,确定所述第一任务处理节点的请求处理数量,并将所述请求处理数量作为请求集合信息。Based on the request quantities of the at least two pending requests, the node quantities of the at least two task processing nodes, and the task processing weight, the request processing quantity of the first task processing node is determined, and the request processing quantity is used as request set information.
具体的,该分配节点为了实现针对任务处理节点的负载均分,以及集群的智能流量调度,为每个任务处理节点确定对应的请求处理数量的过程中,首先需要从至少两个任务处理节点中确定第一任务处理节点,然后从自身记录的任务处理权重中确定该第一任务处理节点的任务处理权重。Specifically, in order to achieve load balancing for task processing nodes and intelligent traffic scheduling of the cluster, the allocation node needs to first determine the first task processing node from at least two task processing nodes in the process of determining the corresponding request processing quantity for each task processing node, and then determine the task processing weight of the first task processing node from the task processing weights recorded by itself.
之后,该分配节点需要确定该至少两个待处理请求的请求数量,以及至少两个任务处理节点的节点数量;然后基于该请求数量、节点数量、以及第一任务处理节点的任务处理权重,为该任务处理权重计算出需要为其分配的待处理请求的请求处理数量,并将该请求处理数量确定为构建待处理请求集合所需要的请求集合信息。Afterwards, the allocation node needs to determine the request quantity of the at least two pending requests and the node number of at least two task processing nodes; then based on the request quantity, the node number, and the task processing weight of the first task processing node, calculate the request processing quantity of the pending requests that need to be allocated to it for the task processing weight, and determine the request processing quantity as the request set information required to construct the pending request set.
沿用上例,订单服务端在为库存服务端确定需要分配的请求数量的过程中,需要确定该库存服务端A的权重;然后确定减扣库存请求的总数、库存服务端的总数;基于该库存服务端A的权重、减扣库存请求的总数、库存服务端的总数这三个参数,计算出库存服务端A所需要分配的请求数量。在实际应用中,该请求数量的计算可以通过下述公式(1)计算获得。
Using the above example, when the order server determines the number of requests to be allocated to the inventory server, it needs to determine the weight of the inventory server A; then determine the total number of inventory reduction requests and the total number of inventory servers; based on the weight of the inventory server A, the total number of inventory reduction requests, and the total number of inventory servers, calculate the number of requests that the inventory server A needs to allocate. In actual applications, the calculation of the number of requests can be obtained by the following formula (1).
其中,A表示订单服务端(消费端)的总请求速率,也即是订单数量,B表示库存服务端的总数。DeWeight表示每个库存服务端的权重。而为每个库房服务端分配的请求数量可以称为该库存服务端请求速率;其中,正常库存服务端可以理解为权重为1的库存服务端,异常库存服务端可以理解为权重小于1的库存服务端,基于此,异常的库存服务端请求速率H被降级为正常的服务端请求速率为 Among them, A represents the total request rate of the order server (consumer end), that is, the number of orders, and B represents the total number of inventory servers. DeWeight represents the weight of each inventory server. The number of requests allocated to each warehouse server can be called the request rate of the inventory server; among them, a normal inventory server can be understood as an inventory server with a weight of 1, and an abnormal inventory server can be understood as an inventory server with a weight less than 1. Based on this, the abnormal inventory server request rate H is downgraded to The normal server request rate is
需要说明的是,本说明书提供的请求处理方法,通过任务处理节点提供的权重,确定需要分配给每个任务处理节点的请求数量,基于此,该代入上述请求速率参数可得到异常的服务端并发函数,如下述公式(2)。
It should be noted that the request processing method provided in this specification determines the number of requests that need to be allocated to each task processing node through the weight provided by the task processing node. Based on this, substituting the above request rate parameters can obtain an abnormal server concurrency function, such as the following formula (2).
其中,J表述异常的服务端的并发数;该MaxCon为一个预设的并发数量阈值,称为最高动作并发数;MinCon为一个预设的并发数量阈值,称为最低动作并发数;其中MaxCon大于MinCon。Among them, J represents the concurrency number of the abnormal server; the MaxCon is a preset concurrency number threshold, called the maximum action concurrency number; MinCon is a preset concurrency number threshold, called the minimum action concurrency number; wherein MaxCon is greater than MinCon.
为了方便计算,假设最低动作并发数可以为200,最高动作并发数可以为400,异常的服务端并发函数(公式2)可以简化为下述公式(3)。
For the convenience of calculation, assuming that the minimum concurrent number of actions can be 200 and the maximum concurrent number of actions can be 400, the abnormal server concurrency function (Formula 2) can be simplified to the following formula (3).
基于上述异常的服务端并发函数可以计算出异常服务端的并发增速变化,参见图4,图4是本说明书一个实施例提供的一种请求处理方法的中异常服务端的并发增速变化示意图。基于图4可知,在总请求速率为A达到400,并发数达到200之后,异常服务端的并发增速变缓,最终会收敛在最高并发数400附近。Based on the above abnormal server concurrency function, the change in the concurrency growth rate of the abnormal server can be calculated, see Figure 4, which is a schematic diagram of the change in the concurrency growth rate of the abnormal server in a request processing method provided by an embodiment of this specification. Based on Figure 4, it can be seen that after the total request rate A reaches 400 and the concurrency number reaches 200, the concurrency growth rate of the abnormal server slows down and eventually converges to around the maximum concurrency number of 400.
具体的,所述基于所述请求集合信息以及所述至少两个待处理请求,构建所述第一任务处理节点对应的待处理请求集合,包括:Specifically, the constructing a request set to be processed corresponding to the first task processing node based on the request set information and the at least two requests to be processed includes:
所述分配节点,从所述至少两个待处理请求中,获取与所述第一任务处理节点的请求处理数量对应的目标待处理请求;The allocation node obtains, from the at least two pending requests, a target pending request corresponding to the request processing quantity of the first task processing node;
基于所述目标待处理请求构建所述第一任务处理节点对应的待处理请求集合,其中,所述待处理请求集合中包含所述目标待处理请求。A set of pending requests corresponding to the first task processing node is constructed based on the target pending request, wherein the set of pending requests includes the target pending request.
具体的,该分配节点在确定需要第一任务处理节点的请求处理数量之后,会从至少两个待处理请求中,获取与第一任务处理节点的请求处理数量对应数量的待处理请求,并将该对应数量的待处理请求作为需要分配给第一任务处理节点的目标待处理请求;然后基于目标待处理请求构建第一任务处理节点对应的待处理请求集合,该待处理请求集合中包含目标待处理请求,并将该待处理请求集合发送至该第一任务处理节点,从而防止资源占用无限扩展,达到快速的故障收敛,大幅减低对用户的影响。Specifically, after determining the number of requests that need to be processed by the first task processing node, the allocation node will obtain a number of pending requests corresponding to the number of requests to be processed by the first task processing node from at least two pending requests, and use the corresponding number of pending requests as target pending requests that need to be allocated to the first task processing node; then, based on the target pending requests, a pending request set corresponding to the first task processing node is constructed, the pending request set includes the target pending requests, and the pending request set is sent to the first task processing node, thereby preventing unlimited expansion of resource occupation, achieving rapid fault convergence, and significantly reducing the impact on users.
在本说明书提供的请求处理方法中,所述待处理请求为待处理订单;In the request processing method provided in this specification, the request to be processed is an order to be processed;
相应地,所述基于所述任务处理权重以及所述至少两个待处理请求,为所述至少两个 任务处理节点中的第一任务处理节点分配对应的待处理请求集合,包括:Accordingly, the at least two requests to be processed are based on the task processing weight and the at least two requests to be processed. The first task processing node among the task processing nodes allocates a corresponding set of requests to be processed, including:
所述分配节点,基于订单任务处理权重以及所述至少两个待处理订单,为所述至少两个订单处理节点中的第一订单处理节点分配对应的待处理订单集合。The allocation node allocates a corresponding set of pending orders to a first order processing node among the at least two order processing nodes based on the order task processing weight and the at least two pending orders.
其中,该待处理订单可以理解为需要进行处理的商品订单,该订单处理节点可以理解为能够处理该商品订单的服务端,该服务端可以为一个或多个服务器构成。The pending order may be understood as a commodity order that needs to be processed, and the order processing node may be understood as a server that can process the commodity order, and the server may be composed of one or more servers.
该分配节点可以理解为将该待处理订单分配给订单任务处理节点的服务端。The allocation node can be understood as a server that allocates the pending order to the order task processing node.
沿用上例,该分配节点为订单分配服务端,该第一订单处理节点可以为商品订单处理服务端,基于此,在商品订单服务端负载较高的时候,该商品订单服务端可以根据自身负载情况确定的降级权重,并向订单分配服务端推送降级权重,在下次订单分配服务端在基于客户端发送的商品订单请求,向多个商品订单处理服务端发起调用的时候会使用此新的权重进行商品订单的分配,从而减少负载较高或异常的服务端所接收到的请求数量,实现负载均分。Continuing with the above example, the allocation node is the order allocation server, and the first order processing node can be the product order processing server. Based on this, when the load on the product order server is high, the product order server can determine the downgrade weight based on its own load situation, and push the downgrade weight to the order allocation server. The next time the order allocation server initiates a call to multiple product order processing servers based on the product order request sent by the client, it will use this new weight to allocate product orders, thereby reducing the number of requests received by servers with high or abnormal loads, and achieving load balancing.
步骤304:所述第一任务处理节点,对接收的所述待处理请求集合中的所述待处理请求进行任务处理,并根据所述任务处理过程中的当前处理状态信息,对所述任务处理权重进行更新,且基于所述任务响应消息将更新后的任务处理权重发送至所述分配节点。Step 304: The first task processing node performs task processing on the pending request in the received pending request set, updates the task processing weight according to the current processing status information during the task processing, and sends the updated task processing weight to the allocation node based on the task response message.
其中,当前处理状态信息可以理解为表征该第一任务处理节点的当前处理状态的信息,也可以理解为表征该服务端当前负载情况的信息。例如,该当前处理状态信息可以为第一任务处理节点的当前并发数量、该第一任务处理节点的内存占用率、CPU(中央处理器)占用率等。The current processing status information can be understood as information characterizing the current processing status of the first task processing node, or can be understood as information characterizing the current load of the server. For example, the current processing status information can be the current concurrency number of the first task processing node, the memory occupancy rate of the first task processing node, the CPU (central processing unit) occupancy rate, etc.
其中,在待处理请求为减扣库存请求的情况下,该对待处理请求进行任务处理可以理解为基于该减扣库存请求,对于该第一任务处理节点相关联的数据库中存储的商品库存数据进行扣减。In which, in the case that the pending request is a request for inventory reduction, the task processing of the pending request can be understood as deducting the commodity inventory data stored in the database associated with the first task processing node based on the inventory reduction request.
具体的,所述根据所述任务处理过程中的当前处理状态信息,对所述任务处理权重进行更新,包括:Specifically, updating the task processing weight according to the current processing state information during the task processing includes:
所述第一任务处理节点,监测所述任务处理过程中的当前处理状态信息;The first task processing node monitors current processing status information during the task processing;
在确定所述当前处理状态信息满足预设权重更新条件的情况下,基于所述当前处理状态信息以及预设权重更新参数,对所述任务处理权重进行更新。When it is determined that the current processing state information satisfies a preset weight update condition, the task processing weight is updated based on the current processing state information and a preset weight update parameter.
需要说明的是,该当前处理状态信息可以为当前请求并发数量,基于此,所述确定所述当前处理状态信息满足预设权重更新条件,包括:It should be noted that the current processing status information may be the current concurrent number of requests. Based on this, determining that the current processing status information meets the preset weight update condition includes:
所述第一任务处理节点,在确定所述当前请求并发数量大于等于预设最小请求并发阈值的情况下,确定所述当前处理状态信息满足预设权重更新条件。The first task processing node determines that the current processing status information satisfies a preset weight update condition when determining that the current concurrent request number is greater than or equal to a preset minimum concurrent request threshold.
其中,该预设最小请求并发阈值可以理解为预先设置的一个数值,该数值可以用于第一任务处理节点对自身的负载情况进行判定,例如上述预设最小请求并发阈值MinCon。 如果当前服务端的并发数小于最低动作并发数则不进行任何权重降级,保持当前服务端权重和其他正常的服务端权重一致。如果当前服务端的并发数高于最低动作并发数则需要重新计算自身的权重,从而实时对自身的负载情况进行检查,防止请求占用无限扩展对服务端的影响。The preset minimum request concurrency threshold may be understood as a preset value, which may be used by the first task processing node to determine its own load condition, such as the preset minimum request concurrency threshold MinCon. If the current server's concurrent number is less than the minimum concurrent number of actions, no weight downgrade will be performed, and the current server's weight will be kept consistent with other normal server weights. If the current server's concurrent number is higher than the minimum concurrent number of actions, its own weight needs to be recalculated, so as to check its own load in real time to prevent the impact of unlimited expansion of requests on the server.
需要说明的是,该所述当前处理状态信息为当前处理资源信息;当前处理资源可以理解为第一任务处理节点进行任务处理时所需要的资源,例如,服务端的CPU资源、内存资源等。该当前处理资源信息可以理解为表征该当前处理资源的使用情况的信息,例如,CPU的利用率、内存利用率等等。基于此,所述确定所述当前处理状态信息满足预设权重更新条件,包括:It should be noted that the current processing state information is the current processing resource information; the current processing resources can be understood as the resources required by the first task processing node to perform task processing, such as the CPU resources and memory resources of the server. The current processing resource information can be understood as information characterizing the usage of the current processing resources, such as the CPU utilization, memory utilization, etc. Based on this, the determination that the current processing state information meets the preset weight update condition includes:
所述第一任务处理节点,在确定所述当前处理资源信息大于等于预设资源阈值的情况下,确定所述当前处理状态信息满足预设权重更新条件。The first task processing node determines that the current processing state information satisfies a preset weight update condition when determining that the current processing resource information is greater than or equal to a preset resource threshold.
其中,预设资源阈值可以理解为一个预先设置的数值,该数值可以用于第一任务处理节点对自身的负载情况进行判定,例如CPU利用量阈值为90%等。The preset resource threshold value may be understood as a preset value, which may be used by the first task processing node to determine its own load condition, for example, a CPU utilization threshold value of 90%.
沿用上例,本说明书提供的请求处理方法,该库存服务端能够实时对自身的CPU利用率进行检测,在确定该自身CPU利用率95%大于等于预设CPU利用量阈值90%的情况下,确定自身处于负载状态,需要对自身的权重进行调整,从而实时对自身的负载情况进行检查,防止请求占用无限扩展对服务端的影响。Continuing with the above example, the request processing method provided in this specification allows the inventory server to detect its own CPU utilization in real time. When it is determined that its own CPU utilization of 95% is greater than or equal to the preset CPU utilization threshold of 90%, it is determined that it is in a load state and needs to adjust its own weight, thereby checking its own load situation in real time to prevent the impact of unlimited expansion of request occupancy on the server.
具体的,本说明书提供的请求处理方法中的第一任务处理节点,能够实时监测自身进行任务处理过程中的当前处理状态信息;并在确定当前处理状态信息满足预设权重更新条件的情况下,可以基于当前处理状态信息以及预设权重更新参数,对自身任务处理权重进行更新。Specifically, the first task processing node in the request processing method provided in this specification can monitor the current processing status information of its own task processing process in real time; and when it is determined that the current processing status information meets the preset weight update conditions, it can update its own task processing weight based on the current processing status information and the preset weight update parameters.
其中,所述当前处理状态信息为当前请求并发数量,所述预设权重更新参数包括预设最小请求并发阈值,以及预设最大请求并发阈值;基于此,所述基于所述当前处理状态信息以及预设权重更新参数,对所述任务处理权重进行更新,包括:Wherein, the current processing state information is the current number of concurrent requests, and the preset weight update parameter includes a preset minimum concurrent request threshold and a preset maximum concurrent request threshold; based on this, the task processing weight is updated based on the current processing state information and the preset weight update parameter, including:
所述第一任务处理节点,确定所述预设最小请求并发阈值,以及所述预设最大请求并发阈值;The first task processing node determines the preset minimum request concurrency threshold and the preset maximum request concurrency threshold;
基于所述预设最小请求并发阈值、所述预设最大请求并发阈值以及所述当前请求并发数量,获得更新任务权重信息,并基于所述更新任务权重信息替换所述任务权重信息。Based on the preset minimum request concurrency threshold, the preset maximum request concurrency threshold and the current number of concurrent requests, updated task weight information is obtained, and the task weight information is replaced based on the updated task weight information.
其中,预设最大请求并发阈值可以理解为预先设置的一个数值,该数值可以用于第一任务处理节点对自身的负载情况进行判定,该预设最大请求并发阈值大于预设最小请求并发阈值。需要说明的是,本说明书提供的请求处理方,设计了两个调节因子,分别是最低动作并发数MinCon和最高动作并发数MaxCon;一个推送数据(降级权重Deweight)以及一种调节方式,自定义调节曲线。在实际应用中,如果当前服务端的并发数小于最低动作并发数则不进行任何权重降级,保持当前服务端权重和其他正常的服务端权重一致。并且,任务处理节点在最低动作并发数和最高动作并发数之间动态控制自身在集群中的权 重值,提供在自身异常时的故障屏蔽的能力,实现服务的集群的容灾。通过服务端对自身权重的计算和更新,达到在存在单点异常是,实现多个离散的服务端之间流量调度的最优解。Among them, the preset maximum request concurrency threshold can be understood as a pre-set value, which can be used by the first task processing node to determine its own load situation. The preset maximum request concurrency threshold is greater than the preset minimum request concurrency threshold. It should be noted that the request processing party provided in this specification has designed two adjustment factors, namely the minimum action concurrency number MinCon and the maximum action concurrency number MaxCon; a push data (degradation weight Deweight) and an adjustment method, a custom adjustment curve. In actual applications, if the current server's concurrency is less than the minimum action concurrency number, no weight downgrade will be performed, and the current server weight will be kept consistent with other normal server weights. In addition, the task processing node dynamically controls its own weight in the cluster between the minimum action concurrency number and the maximum action concurrency number. The weight value provides the ability to shield faults when the server is abnormal, and realizes the disaster recovery of the service cluster. By calculating and updating the weight of the server itself, the optimal solution for traffic scheduling between multiple discrete servers can be achieved when there is a single point of abnormality.
如果当前服务端的并发数高于最低动作并发数,则根据当前并发数确定降级权重,并向消费端推送降级权重,降级权重随当前并发数的升高而降低。在这个降低过程中的降低趋势由自定义调节曲线控制,该自定义调节曲线可以为一次函数曲线,也可以调整为二次函数、三次函数等曲线,随着函数次数的升高服务端性能收敛的速度也越快。If the current server concurrency is higher than the minimum action concurrency, the downgrade weight is determined based on the current concurrency and pushed to the consumer. The downgrade weight decreases as the current concurrency increases. The reduction trend in this reduction process is controlled by a custom adjustment curve, which can be a linear function curve, or can be adjusted to a quadratic function, cubic function, etc. As the number of functions increases, the server performance converges faster.
沿用上例,在最低动作并发数到达前,服务端的处理速率和前述情况一致,但是在达到了最低动作并发数后,需要对自身的权重进行降级,因此该库存服务端需要确定预先设置的最低动作并发数和最高动作并发数,然后基于该最低动作并发数、最高动作并发数以及当前并发数重新计算自身的降级权重,服务端基于当前并发进行容量评估,使推送的权重值具有准实时性,避免由于信息滞后。其中,该降级权重可以根据下述公式(4)确定。
Using the above example, before the minimum concurrent action number is reached, the processing rate of the server is consistent with the above situation. However, after reaching the minimum concurrent action number, its own weight needs to be downgraded. Therefore, the inventory server needs to determine the preset minimum concurrent action number and maximum concurrent action number, and then recalculate its own downgrade weight based on the minimum concurrent action number, the maximum concurrent action number and the current concurrency number. The server performs capacity assessment based on the current concurrency to make the pushed weight value quasi-real-time and avoid information lag. The downgrade weight can be determined according to the following formula (4).
需要说明的是,为便于描述该自定义调节曲线采用一次函数。但也采用二次函数或十次函数。参见图5,图5是本说明书一个实施例提供的一种请求处理方法的在不同函数下并发数的变化示意图。图5是自定义调节曲线为一次函数、二次函数和十次函数时的并发数增长拟合曲线;基于图5可知,随着函数次数的上升,并发数受到请求速率的影响也就越少,对服务端的保护效率也越高。此外,在当前并发数达到最高动作并发数时降级权重为0,代表不再接受任何请求,保证机器的当前并发数永远不会超过最高动作并发数。It should be noted that a linear function is used to facilitate the description of the custom adjustment curve. However, a quadratic function or a decimation function may also be used. Referring to Figure 5, Figure 5 is a schematic diagram of the change in the concurrency number under different functions of a request processing method provided by an embodiment of this specification. Figure 5 is a fitting curve of the concurrency growth when the custom adjustment curve is a linear function, a quadratic function, and a decimation function; based on Figure 5, it can be seen that as the number of functions increases, the concurrency number is less affected by the request rate, and the protection efficiency of the server is higher. In addition, when the current concurrency number reaches the maximum action concurrency number, the downgrade weight is 0, which means that no requests will be accepted, ensuring that the current concurrency number of the machine will never exceed the maximum action concurrency number.
本说明书提供的一种请求处理方法中的任务处理节点,会将根据任务处理过程中的当前处理状态信息所确定的任务处理权重,主动发送至分配节点;而该分配节点会基于该任务处理权重快速且准确的确定每个任务处理节点的当前处理状态,避免延迟的问题;并且,在接收到待处理请求时会基于每个任务处理节点的当前处理状态,将待处理请求分配至对应的任务处理节点,提高了请求处理效率。The task processing node in a request processing method provided in this specification will actively send the task processing weight determined according to the current processing status information in the task processing process to the allocation node; and the allocation node will quickly and accurately determine the current processing status of each task processing node based on the task processing weight to avoid delay problems; and when receiving a pending request, it will allocate the pending request to the corresponding task processing node based on the current processing status of each task processing node, thereby improving the request processing efficiency.
下述结合附图6,以本说明书提供的请求处理方法在订单处理场景下的应用为例,对所述请求处理方法进行进一步说明。其中,图6示出了本说明书一个实施例提供的一种请求处理方法的处理过程示意图;其中,该订单服务端(即消费端)能接收用户提供的商品订单,在该订单服务端处理商品订单的过程中,为了避免由于该商品售空后,由于库存数量没有减少导致用户下单后无法获得商品的问题。订单服务端需要向库存服务端(即与消费端对应的服务端)发送减扣库存请求,从而通过调用该库存服务端的服务,对该商品的库存数量进行扣除。基于此,订单服务端通过减扣库存请求,调用库存服务端提供的减扣库存服务的过程如下。 The following is combined with Figure 6, taking the application of the request processing method provided by this specification in the order processing scenario as an example to further illustrate the request processing method. Among them, Figure 6 shows a schematic diagram of the processing process of a request processing method provided by an embodiment of this specification; wherein, the order service end (i.e., the consumer end) can receive the product order provided by the user. In the process of processing the product order by the order service end, in order to avoid the problem that the user cannot obtain the product after placing an order because the inventory quantity has not been reduced after the product is sold out. The order service end needs to send a deduction inventory request to the inventory service end (i.e., the service end corresponding to the consumer end), so as to deduct the inventory quantity of the product by calling the service of the inventory service end. Based on this, the process of the order service end calling the deduction inventory service provided by the inventory service end through the deduction inventory request is as follows.
需要说明的是,图6中订单服务端的总请求速率为A qps,库存服务端总数为B(B>1),正常的库存服务端的响应速度为C ms,异常的库存服务端响应速度为D ms(D>C)。基于此可以确定在权重进行调节之前,每台库存服务端的请求速率为正常的库存服务端并发数为异常的库存服务端并发数为 It should be noted that in Figure 6, the total request rate of the order server is A qps, the total number of inventory servers is B (B>1), the response speed of the normal inventory server is C ms, and the response speed of the abnormal inventory server is D ms (D>C). Based on this, it can be determined that before the weight is adjusted, the request rate of each inventory server is The normal number of concurrent connections on the inventory server is The abnormal number of concurrent inventory servers is
基于此,参见图6,B为2,C为50,D为2000,代表总共4台库存服务端,正常的库存服务端的响应速度为50ms,异常的库存服务端响应速度为2000ms。可以得到正常库存服务端的并发数增长函数为异常库存服务端的并发数增长函数为参见图7,图7是本说明书一个实施例提供的一种请求处理方法中的单机并发数的示意图;该图7是代入上述并发数增长函数计算获得。如图7所示,即使总请求速率达到了8000QPS的时候,正常的库存服务端的单机并发数仅为100,而异常的库存服务端并发数已经达到了4000,远超一般服务端所能承受的并发范围限制。基于此,在服务端的当前并发数达到了最低动作并发数MinCon后,通过公式确定异常库存服务端的降级权重,并将该降级权重发送至订单服务端。Based on this, see Figure 6, B is 2, C is 50, and D is 2000, which means there are 4 inventory servers in total. The response speed of a normal inventory server is 50ms, and the response speed of an abnormal inventory server is 2000ms. The concurrent number growth function of a normal inventory server is: The concurrent growth function of the abnormal inventory server is: See Figure 7, which is a schematic diagram of the single-machine concurrency number in a request processing method provided by an embodiment of the present specification; Figure 7 is obtained by substituting the above-mentioned concurrency growth function into the calculation. As shown in Figure 7, even when the total request rate reaches 8000QPS, the single-machine concurrency number of the normal inventory server is only 100, while the abnormal inventory server has reached 4000, far exceeding the concurrency range limit that the general server can bear. Based on this, after the current concurrency number of the server reaches the minimum action concurrency number MinCon, through the formula Determine the downgrade weight of the abnormal inventory server and send the downgrade weight to the order server.
而订单服务端再向多个库存服务端发送减扣库存请求的过程中,为了防止资源占用无限扩展,达到快速的故障收敛,大幅减低对用户影响的目的。会根据库存服务端提供的,表征其自身负载情况的权重,为每个库存服务端确定对应的请求速率。具体的将降级权重代入到公式中,确定异常库存服务端的请求速率,也即是需要分配给异常服务端的扣减库存请求数量,并将对应数量的扣减库存请求发送至异常库存服务端。本说明书提供的请求处理方法,通过对延迟的动态感知计算,及时对有问题的服务端进行降级来降低影响面。参见图6,通过将有问题和没问题的库存服务提供者的权重比例从1:1降低到10.5:1之后的上下游状态情况,用户侧的请求平均延时和延时都有了大幅优化,全链路上的高并发情况也得到了缓解。In the process of sending inventory reduction requests to multiple inventory servers, the order server will determine the corresponding request rate for each inventory server based on the weight provided by the inventory server to represent its own load situation in order to prevent unlimited expansion of resource usage, achieve rapid fault convergence, and significantly reduce the impact on users. Specifically, the downgrade weight is substituted into the formula In the process, the request rate of the abnormal inventory server is determined, that is, the number of inventory deduction requests that need to be allocated to the abnormal server, and the corresponding number of inventory deduction requests are sent to the abnormal inventory server. The request processing method provided in this specification reduces the impact by dynamically sensing and calculating the delay and timely downgrading the problematic server. Referring to Figure 6, by reducing the weight ratio of problematic and normal inventory service providers from 1:1 to 10.5:1, the upstream and downstream status conditions have greatly optimized the average request delay and delay on the user side, and the high concurrency on the entire link has also been alleviated.
需要说明的是,针对上述不设限方案、设置最大并发限制的方案、客户端视角进行负载均衡调度方案的问题,本说明书提供的请求处理方法,通过定义了最低动作并发数和最高动作并发数两个调节因子,限制了最大的并发数,从根本上解决了不设限方案中资源占用无限扩展的问题。另外是通过权重推送加自定义调节曲线配合的方式,调节消费端的请求比例分布,避免了直接解决请求的处理。通过转移请求目标的方式降低对用户体验的影响。同时由于异常的服务端的没有拒绝所有的请求处理,对于异常服务端内正常的服务也可以正常接收到请求,达到服务间的异常屏蔽。此外服务端自身的性能计算是相对来说准 实时的且准确的,通过服务端视角的自身限流能保证降级隔离的高效性与正确性。It should be noted that, in response to the problems of the above-mentioned unlimited scheme, the scheme with a maximum concurrency limit, and the load balancing scheduling scheme from the client's perspective, the request processing method provided in this specification limits the maximum concurrency by defining two adjustment factors, namely the minimum action concurrency number and the maximum action concurrency number, thereby fundamentally solving the problem of unlimited expansion of resource usage in the unlimited scheme. In addition, the proportion distribution of requests on the consumer side is adjusted by combining weight push with a custom adjustment curve, thus avoiding directly solving the processing of requests. The impact on user experience is reduced by shifting the request target. At the same time, since the abnormal server does not reject all request processing, normal services in the abnormal server can also receive requests normally, thus achieving abnormal shielding between services. In addition, the performance calculation of the server itself is relatively accurate. Real-time and accurate, the server-side current limiting can ensure the efficiency and correctness of downgrade isolation.
综上所述,本说明书提供的请求处理方法从服务端视角对自身的并发数进行了保护,对单台服务端、异常的服务、正常的服务、集群整体稳定性和用户体验都有极大的优化提升。In summary, the request processing method provided in this specification protects its own concurrency from the perspective of the server, and greatly optimizes and improves a single server, abnormal services, normal services, overall cluster stability, and user experience.
参见图8,图8示出了根据本说明书一个实施例提供的另一种请求处理方法的应用流程图,该请求处理方法应用于任务处理节点,所述方法具体包括以下步骤。Referring to FIG. 8 , FIG. 8 shows an application flow chart of another request processing method provided according to an embodiment of the present specification. The request processing method is applied to a task processing node, and the method specifically includes the following steps.
步骤802:基于任务处理权重生成任务响应消息,并将所述任务响应消息发送至分配节点。Step 802: Generate a task response message based on the task processing weight, and send the task response message to the allocation node.
步骤804:接收所述分配节点为所述任务处理节点确定的待处理请求集合,其中,所述待处理请求集合为所述分配节点基于所述任务处理权重以及接收的至少两个待处理请求确定。Step 804: Receive a set of pending requests determined by the allocation node for the task processing node, wherein the set of pending requests is determined by the allocation node based on the task processing weight and at least two pending requests received.
步骤806:对接收的所述待处理请求集合中的所述待处理请求进行任务处理,并根据所述任务处理过程中的当前处理状态信息,对所述任务处理权重进行更新。Step 806: performing task processing on the pending requests in the received pending request set, and updating the task processing weight according to current processing status information during the task processing.
步骤808:基于所述任务响应消息将更新后的任务处理权重发送至所述分配节点。Step 808: Sending the updated task processing weight to the allocation node based on the task response message.
针对该另一种请求处理方法的解释,可以参见上述一种请求处理方法中对应或相应地内容,在此不过多赘述。For an explanation of the other request processing method, please refer to the corresponding or corresponding content in the above-mentioned request processing method, which will not be elaborated here.
本说明书提供的应用于任务处理节点的另一种请求处理方法,会将根据任务处理过程中的当前处理状态信息所确定的任务处理权重,主动发送至分配节点;而该分配节点会基于该任务处理权重快速且准确的确定每个任务处理节点的当前处理状态,避免延迟的问题;并且,在接收到待处理请求时会基于每个任务处理节点的当前处理状态,将待处理请求分配至对应的任务处理节点,提高了请求处理效率。Another request processing method applied to task processing nodes provided in this specification will actively send the task processing weight determined according to the current processing status information during the task processing process to the allocation node; and the allocation node will quickly and accurately determine the current processing status of each task processing node based on the task processing weight to avoid delay problems; and when receiving pending requests, it will allocate the pending requests to the corresponding task processing nodes based on the current processing status of each task processing node, thereby improving request processing efficiency.
上述为本实施例的另一种请求处理方法的示意性方案。需要说明的是,该另一种请求处理方法的技术方案与上述的一种请求处理方法的技术方案属于同一构思,另一种请求处理方法的技术方案未详细描述的细节内容,均可以参见上述一种请求处理方法的技术方案的描述。The above is a schematic scheme of another request processing method of this embodiment. It should be noted that the technical scheme of the other request processing method and the technical scheme of the above-mentioned one request processing method belong to the same concept, and the details not described in detail in the technical scheme of the other request processing method can be referred to the description of the technical scheme of the above-mentioned one request processing method.
参见图9,图9示出了根据本说明书一个实施例提供的又一种请求处理方法的应用流程图,该请求处理方法应用于分配节点,所述方法具体包括以下步骤。Referring to FIG. 9 , FIG. 9 shows an application flow chart of another request processing method provided according to an embodiment of the present specification. The request processing method is applied to a distribution node, and the method specifically includes the following steps.
步骤902:接收至少两个待处理请求,并接收至少两个任务处理节点发送的任务响应消息,其中,所述任务响应消息中携带任务处理权重。Step 902: receiving at least two pending requests, and receiving task response messages sent by at least two task processing nodes, wherein the task response messages carry task processing weights.
步骤904:基于所述任务处理权重以及所述至少两个待处理请求,为所述至少两个任务处理节点中的第一任务处理节点分配对应的待处理请求集合,其中,所述第一任务处理节点为所述至少两个任务处理节点之一。Step 904: Based on the task processing weight and the at least two pending requests, a corresponding pending request set is allocated to a first task processing node among the at least two task processing nodes, wherein the first task processing node is one of the at least two task processing nodes.
针对该又一种请求处理方法的解释,可以参见上述一种请求处理方法以及另一种请求处理方法中对应或相应地内容,在此不过多赘述。 For an explanation of yet another request processing method, please refer to the corresponding or corresponding contents in the above-mentioned one request processing method and another request processing method, and no further details will be given here.
本说明书提供的应用于分配节点的另一种请求处理方法,会接收到任务处理节点根据任务处理过程中的当前处理状态信息所确定的任务处理权重,并基于该任务处理权重快速且准确的确定每个任务处理节点的当前处理状态,避免延迟的问题,并且在接收到待处理请求时会基于每个任务处理节点的当前处理状态,将待处理请求分配至对应的任务处理节点,提高了请求处理效率。Another request processing method applied to allocation nodes provided in this specification will receive the task processing weight determined by the task processing node based on the current processing status information during the task processing process, and quickly and accurately determine the current processing status of each task processing node based on the task processing weight, thereby avoiding delay problems, and when receiving pending requests, it will allocate pending requests to corresponding task processing nodes based on the current processing status of each task processing node, thereby improving request processing efficiency.
上述为本实施例的又一种请求处理方法的示意性方案。需要说明的是,该又一种请求处理方法的技术方案与上述的一种请求处理方法的技术方案属于同一构思,又一种请求处理方法的技术方案未详细描述的细节内容,均可以参见上述一种请求处理方法的技术方案的描述。The above is a schematic scheme of another request processing method of this embodiment. It should be noted that the technical scheme of the another request processing method and the technical scheme of the above request processing method belong to the same concept, and the details of the technical scheme of the another request processing method that are not described in detail can all be referred to the description of the technical scheme of the above request processing method.
与上述方法实施例相对应,本说明书还提供了请求处理***实施例,图10示出了本说明书一个实施例提供的一种请求处理***的结构示意图。如图10所示,所述***包括分配节点1002以及至少两个任务处理节点1004,其中,Corresponding to the above method embodiment, this specification also provides a request processing system embodiment. FIG10 shows a schematic diagram of the structure of a request processing system provided by an embodiment of this specification. As shown in FIG10, the system includes a distribution node 1002 and at least two task processing nodes 1004, wherein:
所述分配节点1002,被配置为接收至少两个待处理请求,并接收所述至少两个任务处理节点1004发送的任务响应消息,所述任务响应消息中携带任务处理权重;以及The allocation node 1002 is configured to receive at least two pending requests and receive task response messages sent by the at least two task processing nodes 1004, wherein the task response messages carry task processing weights; and
基于所述任务处理权重以及所述至少两个待处理请求,为所述至少两个任务处理节点1004中的第一任务处理节点1004分配对应的待处理请求集合,其中,所述第一任务处理节点1004为所述至少两个任务处理节点1004之一;Based on the task processing weight and the at least two pending requests, assigning a corresponding pending request set to a first task processing node 1004 of the at least two task processing nodes 1004, wherein the first task processing node 1004 is one of the at least two task processing nodes 1004;
所述第一任务处理节点1004,被配置为对接收的所述待处理请求集合中的所述待处理请求进行任务处理,并根据所述任务处理过程中的当前处理状态信息,对所述任务处理权重进行更新,且基于所述任务响应消息将更新后的任务处理权重发送至所述分配节点1002。The first task processing node 1004 is configured to perform task processing on the pending requests in the received pending request set, update the task processing weight according to the current processing status information during the task processing, and send the updated task processing weight to the allocation node 1002 based on the task response message.
可选地,所述分配节点1002,还被配置为基于所述至少两个任务处理节点1004中的第一任务处理节点1004的任务处理权重,确定所述第一任务处理节点1004对应的请求集合信息;Optionally, the allocation node 1002 is further configured to determine the request set information corresponding to the first task processing node 1004 based on the task processing weight of the first task processing node 1004 among the at least two task processing nodes 1004;
基于所述请求集合信息以及所述至少两个待处理请求,构建所述第一任务处理节点1004对应的待处理请求集合,并将所述待处理请求集合发送至所述第一任务处理节点1004。Based on the request set information and the at least two pending requests, a pending request set corresponding to the first task processing node 1004 is constructed, and the pending request set is sent to the first task processing node 1004 .
可选地,所述分配节点1002,还被配置为确定所述至少两个任务处理节点1004中的第一任务处理节点1004,并确定所述第一任务处理节点1004的任务处理权重;Optionally, the allocation node 1002 is further configured to determine a first task processing node 1004 among the at least two task processing nodes 1004, and determine a task processing weight of the first task processing node 1004;
基于所述至少两个待处理请求的请求数量、所述至少两个任务处理节点1004的节点数量以及所述任务处理权重,确定所述第一任务处理节点1004的请求处理数量,并将所述请求处理数量作为请求集合信息。Based on the request quantities of the at least two pending requests, the node quantities of the at least two task processing nodes 1004 and the task processing weight, the request processing quantity of the first task processing node 1004 is determined, and the request processing quantity is used as request set information.
可选地,所述分配节点1002,还被配置为从所述至少两个待处理请求中,获取与所述第一任务处理节点1004的请求处理数量对应的目标待处理请求;Optionally, the allocation node 1002 is further configured to obtain, from the at least two pending requests, a target pending request corresponding to the request processing quantity of the first task processing node 1004;
基于所述目标待处理请求构建所述第一任务处理节点1004对应的待处理请求集合,其中,所述待处理请求集合中包含所述目标待处理请求。 A set of pending requests corresponding to the first task processing node 1004 is constructed based on the target pending request, wherein the set of pending requests includes the target pending request.
可选地,所述第一任务处理节点1004,还被配置为监测所述任务处理过程中的当前处理状态信息;Optionally, the first task processing node 1004 is further configured to monitor current processing status information during the task processing;
在确定所述当前处理状态信息满足预设权重更新条件的情况下,基于所述当前处理状态信息以及预设权重更新参数,对所述任务处理权重进行更新。When it is determined that the current processing state information satisfies a preset weight update condition, the task processing weight is updated based on the current processing state information and a preset weight update parameter.
可选地,所述当前处理状态信息为当前请求并发数量,所述预设权重更新参数包括预设最小请求并发阈值,以及预设最大请求并发阈值;Optionally, the current processing state information is the current number of concurrent requests, and the preset weight update parameters include a preset minimum concurrent request threshold and a preset maximum concurrent request threshold;
相应地,所述第一任务处理节点1004,还被配置为确定所述预设最小请求并发阈值,以及所述预设最大请求并发阈值;Accordingly, the first task processing node 1004 is further configured to determine the preset minimum request concurrency threshold and the preset maximum request concurrency threshold;
基于所述预设最小请求并发阈值、所述预设最大请求并发阈值以及所述当前请求并发数量,获得更新任务权重信息,并基于所述更新任务权重信息替换所述任务权重信息。Based on the preset minimum request concurrency threshold, the preset maximum request concurrency threshold and the current number of concurrent requests, updated task weight information is obtained, and the task weight information is replaced based on the updated task weight information.
可选地,所述当前处理状态信息为当前请求并发数量;Optionally, the current processing status information is the current concurrent number of requests;
相应地,所述第一任务处理节点1004,还被配置为在确定所述当前请求并发数量大于等于预设最小请求并发阈值的情况下,确定所述当前处理状态信息满足预设权重更新条件。Correspondingly, the first task processing node 1004 is further configured to determine that the current processing state information satisfies a preset weight update condition when it is determined that the current number of concurrent requests is greater than or equal to a preset minimum concurrent request threshold.
可选地,所述当前处理状态信息为当前处理资源信息;Optionally, the current processing state information is current processing resource information;
相应地,所述第一任务处理节点1004,还被配置为在确定所述当前处理资源信息大于等于预设资源阈值的情况下,确定所述当前处理状态信息满足预设权重更新条件。Correspondingly, the first task processing node 1004 is further configured to determine that the current processing state information satisfies a preset weight update condition when it is determined that the current processing resource information is greater than or equal to a preset resource threshold.
可选地,所述待处理请求为待处理订单;Optionally, the pending request is a pending order;
相应地,所述分配节点1002,还被配置为基于订单任务处理权重以及所述至少两个待处理订单,为所述至少两个订单处理节点中的第一订单处理节点分配对应的待处理订单集合。Correspondingly, the allocation node 1002 is further configured to allocate a corresponding set of pending orders to be processed to the first order processing node among the at least two order processing nodes based on the order task processing weight and the at least two pending orders.
本说明书提供的一种请求处理***的任务处理节点,会将根据任务处理过程中的当前处理状态信息所确定的任务处理权重,主动发送至分配节点;而该分配节点会基于该任务处理权重快速且准确的确定每个任务处理节点的当前处理状态,避免延迟的问题;并且,在接收到待处理请求时会基于每个任务处理节点的当前处理状态,将待处理请求分配至对应的任务处理节点,提高了请求处理效率。The task processing node of a request processing system provided in this specification will actively send the task processing weight determined according to the current processing status information in the task processing process to the allocation node; and the allocation node will quickly and accurately determine the current processing status of each task processing node based on the task processing weight to avoid delay problems; and when receiving a pending request, it will allocate the pending request to the corresponding task processing node based on the current processing status of each task processing node, thereby improving the request processing efficiency.
上述为本实施例的一种请求处理***的示意性方案。需要说明的是,该请求处理***的技术方案与上述的请求处理方法的技术方案属于同一构思,请求处理***的技术方案未详细描述的细节内容,均可以参见上述请求处理方法的技术方案的描述。The above is a schematic scheme of a request processing system of this embodiment. It should be noted that the technical scheme of the request processing system and the technical scheme of the request processing method described above are of the same concept, and the details not described in detail in the technical scheme of the request processing system can be referred to the description of the technical scheme of the request processing method described above.
与上述方法实施例相对应,本说明书还提供了另一种请求处理装置实施例,所述请求处理装置,应用于任务处理节点,包括:Corresponding to the above method embodiment, this specification also provides another request processing device embodiment, wherein the request processing device is applied to a task processing node, and includes:
第一发送模块,被配置为基于任务处理权重生成任务响应消息,并将所述任务响应消息发送至分配节点;A first sending module is configured to generate a task response message based on the task processing weight, and send the task response message to the allocation node;
接收模块,被配置为接收所述分配节点为所述任务处理节点确定的待处理请求集合, 其中,所述待处理请求集合为所述分配节点基于所述任务处理权重以及接收的至少两个待处理请求确定;a receiving module configured to receive a set of pending requests determined by the allocation node for the task processing node, The pending request set is determined by the allocation node based on the task processing weight and at least two pending requests received;
处理模块,被配置为对接收的所述待处理请求集合中的所述待处理请求进行任务处理,并根据所述任务处理过程中的当前处理状态信息,对所述任务处理权重进行更新;A processing module, configured to perform task processing on the pending requests in the received pending request set, and update the task processing weight according to current processing status information during the task processing;
第二发送模块,被配置为基于所述任务响应消息将更新后的任务处理权重发送至所述分配节点。The second sending module is configured to send the updated task processing weight to the allocation node based on the task response message.
本说明书提供的应用于任务处理节点的另一种请求处理装置,会将根据任务处理过程中的当前处理状态信息所确定的任务处理权重,主动发送至分配节点;而该分配节点会基于该任务处理权重快速且准确的确定每个任务处理节点的当前处理状态,避免延迟的问题;并且,在接收到待处理请求时会基于每个任务处理节点的当前处理状态,将待处理请求分配至对应的任务处理节点,提高了请求处理效率。Another request processing device applied to task processing nodes provided in this specification will actively send the task processing weight determined according to the current processing status information during the task processing process to the allocation node; and the allocation node will quickly and accurately determine the current processing status of each task processing node based on the task processing weight to avoid delay problems; and when receiving pending requests, it will allocate the pending requests to the corresponding task processing nodes based on the current processing status of each task processing node, thereby improving the request processing efficiency.
上述为本实施例的另一种请求处理装置的示意性方案。需要说明的是,该另一种请求处理装置的技术方案与上述的另一种请求处理方法的技术方案属于同一构思,另一种请求处理装置的技术方案未详细描述的细节内容,均可以参见上述另一种请求处理方法的技术方案的描述。The above is a schematic scheme of another request processing device of this embodiment. It should be noted that the technical scheme of the another request processing device and the technical scheme of the another request processing method mentioned above belong to the same concept, and the details of the technical scheme of the another request processing device that are not described in detail can all be referred to the description of the technical scheme of the another request processing method mentioned above.
与上述方法实施例相对应,本说明书还提供了又一种请求处理装置实施例,所述请求处理装置,应用于分配节点,包括:Corresponding to the above method embodiment, this specification also provides another request processing device embodiment, where the request processing device is applied to an allocation node, including:
接收模块,被配置为接收至少两个待处理请求,并接收至少两个任务处理节点发送的任务响应消息,其中,所述任务响应消息中携带任务处理权重;A receiving module, configured to receive at least two pending requests and receive task response messages sent by at least two task processing nodes, wherein the task response messages carry task processing weights;
分配模块,被配置为基于所述任务处理权重以及所述至少两个待处理请求,为所述至少两个任务处理节点中的第一任务处理节点分配对应的待处理请求集合,其中,所述第一任务处理节点为所述至少两个任务处理节点之一。The allocation module is configured to allocate a corresponding set of pending requests to a first task processing node among the at least two task processing nodes based on the task processing weight and the at least two pending requests, wherein the first task processing node is one of the at least two task processing nodes.
本说明书提供的应用于分配节点的又一种请求处理装置,会接收到任务处理节点根据任务处理过程中的当前处理状态信息所确定的任务处理权重,并基于该任务处理权重快速且准确的确定每个任务处理节点的当前处理状态,避免延迟的问题,并且在接收到待处理请求时会基于每个任务处理节点的当前处理状态,将待处理请求分配至对应的任务处理节点,提高了请求处理效率。Another request processing device applied to allocation nodes provided in this specification will receive the task processing weight determined by the task processing node according to the current processing status information during the task processing process, and quickly and accurately determine the current processing status of each task processing node based on the task processing weight, thereby avoiding delay problems, and when receiving pending requests, it will allocate pending requests to corresponding task processing nodes based on the current processing status of each task processing node, thereby improving request processing efficiency.
上述为本实施例的又一种请求处理装置的示意性方案。需要说明的是,该又一种请求处理装置的技术方案与上述的又一种请求处理方法的技术方案属于同一构思,又一种请求处理装置的技术方案未详细描述的细节内容,均可以参见上述又一种请求处理方法的技术方案的描述。The above is a schematic scheme of another request processing device of this embodiment. It should be noted that the technical scheme of the another request processing device and the technical scheme of the another request processing method described above belong to the same concept, and the details not described in detail in the technical scheme of the another request processing device can be referred to the description of the technical scheme of the another request processing method described above.
图11示出了根据本说明书一个实施例提供的一种计算设备1100的结构框图。该计算设备1100的部件包括但不限于存储器1110和处理器1120。处理器1120与存储器1110通过总线1130相连接,数据库1150用于保存数据。 Fig. 11 shows a block diagram of a computing device 1100 according to an embodiment of the present specification. The components of the computing device 1100 include but are not limited to a memory 1110 and a processor 1120. The processor 1120 is connected to the memory 1110 via a bus 1130, and a database 1150 is used to store data.
计算设备1100还包括接入设备1140,接入设备1140使得计算设备1100能够经由一个或多个网络1160通信。这些网络的示例包括公用交换电话网(PSTN)、局域网(LAN)、广域网(WAN)、个域网(PAN)或诸如因特网的通信网络的组合。接入设备1140可以包括有线或无线的任何类型的网络接口(例如,网络接口卡(NIC))中的一个或多个,诸如IEEE802.11无线局域网(WLAN)无线接口、全球微波互联接入(Wi-MAX)接口、以太网接口、通用串行总线(USB)接口、蜂窝网络接口、蓝牙接口、近场通信(NFC)接口,等等。The computing device 1100 also includes an access device 1140 that enables the computing device 1100 to communicate via one or more networks 1160. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 1140 may include one or more of any type of network interface (e.g., a network interface card (NIC)) whether wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a World Wide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.
在本说明书的一个实施例中,计算设备1100的上述部件以及图11中未示出的其他部件也可以彼此相连接,例如通过总线。应当理解,图11所示的计算设备结构框图仅仅是出于示例的目的,而不是对本说明书范围的限制。本领域技术人员可以根据需要,增添或替换其他部件。In one embodiment of the present specification, the above components of the computing device 1100 and other components not shown in FIG. 11 may also be connected to each other, for example, through a bus. It should be understood that the computing device structure block diagram shown in FIG. 11 is only for illustrative purposes and is not intended to limit the scope of the present specification. Those skilled in the art may add or replace other components as needed.
计算设备1100可以是任何类型的静止或移动计算设备,包括移动计算机或移动计算设备(例如,平板计算机、个人数字助理、膝上型计算机、笔记本计算机、上网本等)、移动电话(例如,智能手机)、可佩戴的计算设备(例如,智能手表、智能眼镜等)或其他类型的移动设备,或者诸如台式计算机或PC的静止计算设备。计算设备1100还可以是移动式或静止式的服务器。The computing device 1100 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or PC. The computing device 1100 may also be a mobile or stationary server.
其中,处理器1120用于执行如下计算机可执行指令,该计算机可执行指令被处理器执行时实现上述请求处理方法的步骤。The processor 1120 is used to execute the following computer executable instructions, which implement the steps of the above-mentioned request processing method when executed by the processor.
上述为本实施例的一种计算设备的示意性方案。需要说明的是,该计算设备的技术方案与上述的请求处理方法的技术方案属于同一构思,计算设备的技术方案未详细描述的细节内容,均可以参见上述请求处理方法的技术方案的描述。The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the request processing method described above are of the same concept, and the details not described in detail in the technical scheme of the computing device can be found in the description of the technical scheme of the request processing method described above.
本说明书一实施例还提供一种计算机可读存储介质,其存储有计算机可执行指令,该计算机可执行指令被处理器执行时实现上述请求处理方法的步骤。An embodiment of the present specification further provides a computer-readable storage medium storing computer-executable instructions, which can implement the steps of the above-mentioned request processing method when executed by a processor.
上述为本实施例的一种计算机可读存储介质的示意性方案。需要说明的是,该存储介质的技术方案与上述的请求处理方法的技术方案属于同一构思,存储介质的技术方案未详细描述的细节内容,均可以参见上述请求处理方法的技术方案的描述。The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the request processing method described above are of the same concept, and the details not described in detail in the technical scheme of the storage medium can be found in the description of the technical scheme of the request processing method described above.
本说明书一实施例还提供一种计算机程序,其中,当所述计算机程序在计算机中执行时,令计算机执行上述请求处理方法的步骤。An embodiment of the present specification further provides a computer program, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the above-mentioned request processing method.
上述为本实施例的一种计算机程序的示意性方案。需要说明的是,该计算机程序的技术方案与上述的请求处理方法的技术方案属于同一构思,计算机程序的技术方案未详细描述的细节内容,均可以参见上述请求处理方法的技术方案的描述。The above is a schematic scheme of a computer program of this embodiment. It should be noted that the technical scheme of the computer program and the technical scheme of the request processing method described above are of the same concept, and the details not described in detail in the technical scheme of the computer program can be found in the description of the technical scheme of the request processing method described above.
上述对本说明书特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或 者可能是有利的。The above description is of certain embodiments of the present specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in a different order than that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or The latter may be beneficial.
所述计算机指令包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,所述计算机可读介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读介质不包括电载波信号和电信信号。The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
需要说明的是,对于前述的各方法实施例,为了简便描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本说明书实施例并不受所描述的动作顺序的限制,因为依据本说明书实施例,某些步骤可以采用其它顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定都是本说明书实施例所必须的。It should be noted that, for the convenience of description, the aforementioned method embodiments are all described as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the described action sequence, because according to the embodiments of this specification, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其它实施例的相关描述。In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
以上公开的本说明书优选实施例只是用于帮助阐述本说明书。可选实施例并没有详尽叙述所有的细节,也不限制该发明仅为所述的具体实施方式。显然,根据本说明书实施例的内容,可作很多的修改和变化。本说明书选取并具体描述这些实施例,是为了更好地解释本说明书实施例的原理和实际应用,从而使所属技术领域技术人员能很好地理解和利用本说明书。本说明书仅受权利要求书及其全部范围和等效物的限制。 The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not describe all the details in detail, nor do they limit the invention to only the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that technicians in the relevant technical field can well understand and use this specification. This specification is limited only by the claims and their full scope and equivalents.

Claims (14)

  1. 一种请求处理方法,应用于请求处理***,所述***包括分配节点以及至少两个任务处理节点,所述方法包括:A request processing method is applied to a request processing system, the system comprising a distribution node and at least two task processing nodes, the method comprising:
    所述分配节点,接收至少两个待处理请求,并接收所述至少两个任务处理节点发送的任务响应消息,所述任务响应消息中携带任务处理权重;以及The allocation node receives at least two pending requests and receives a task response message sent by the at least two task processing nodes, wherein the task response message carries a task processing weight; and
    基于所述任务处理权重以及所述至少两个待处理请求,为所述至少两个任务处理节点中的第一任务处理节点分配对应的待处理请求集合,其中,所述第一任务处理节点为所述至少两个任务处理节点之一;Based on the task processing weight and the at least two pending requests, assigning a corresponding pending request set to a first task processing node among the at least two task processing nodes, wherein the first task processing node is one of the at least two task processing nodes;
    所述第一任务处理节点,对接收的所述待处理请求集合中的所述待处理请求进行任务处理,并根据所述任务处理过程中的当前处理状态信息,对所述任务处理权重进行更新,且基于所述任务响应消息将更新后的任务处理权重发送至所述分配节点。The first task processing node performs task processing on the pending request in the received pending request set, updates the task processing weight according to the current processing status information during the task processing, and sends the updated task processing weight to the allocation node based on the task response message.
  2. 根据权利要求1所述的请求处理方法,所述基于所述任务处理权重以及所述至少两个待处理请求,为所述至少两个任务处理节点中的第一任务处理节点分配对应的待处理请求集合,包括:According to the request processing method of claim 1, allocating a corresponding set of pending requests to a first task processing node among the at least two task processing nodes based on the task processing weight and the at least two pending requests comprises:
    所述分配节点,基于所述至少两个任务处理节点中的第一任务处理节点的任务处理权重,确定所述第一任务处理节点对应的请求集合信息;The allocation node determines, based on a task processing weight of a first task processing node among the at least two task processing nodes, request set information corresponding to the first task processing node;
    基于所述请求集合信息以及所述至少两个待处理请求,构建所述第一任务处理节点对应的待处理请求集合,并将所述待处理请求集合发送至所述第一任务处理节点。Based on the request set information and the at least two pending requests, a pending request set corresponding to the first task processing node is constructed, and the pending request set is sent to the first task processing node.
  3. 根据权利要求2所述的请求处理方法,所述基于所述至少两个任务处理节点中的第一任务处理节点的任务处理权重,确定所述第一任务处理节点对应的请求集合信息,包括:According to the request processing method of claim 2, determining the request set information corresponding to the first task processing node among the at least two task processing nodes based on the task processing weight of the first task processing node comprises:
    所述分配节点,确定所述至少两个任务处理节点中的第一任务处理节点,并确定所述第一任务处理节点的任务处理权重;The allocation node determines a first task processing node among the at least two task processing nodes, and determines a task processing weight of the first task processing node;
    基于所述至少两个待处理请求的请求数量、所述至少两个任务处理节点的节点数量以及所述任务处理权重,确定所述第一任务处理节点的请求处理数量,并将所述请求处理数量作为请求集合信息。Based on the request quantities of the at least two pending requests, the node quantities of the at least two task processing nodes, and the task processing weight, the request processing quantity of the first task processing node is determined, and the request processing quantity is used as request set information.
  4. 根据权利要求3所述的请求处理方法,所述基于所述请求集合信息以及所述至少两个待处理请求,构建所述第一任务处理节点对应的待处理请求集合,包括:According to the request processing method of claim 3, constructing a set of pending requests corresponding to the first task processing node based on the request set information and the at least two pending requests comprises:
    所述分配节点,从所述至少两个待处理请求中,获取与所述第一任务处理节点的请求处理数量对应的目标待处理请求;The allocation node obtains, from the at least two pending requests, a target pending request corresponding to the request processing quantity of the first task processing node;
    基于所述目标待处理请求构建所述第一任务处理节点对应的待处理请求集合,其中,所述待处理请求集合中包含所述目标待处理请求。A set of pending requests corresponding to the first task processing node is constructed based on the target pending request, wherein the set of pending requests includes the target pending request.
  5. 根据权利要求1所述的请求处理方法,所述根据所述任务处理过程中的当前处理状态信息,对所述任务处理权重进行更新,包括: According to the request processing method of claim 1, the updating of the task processing weight according to the current processing status information during the task processing process comprises:
    所述第一任务处理节点,监测所述任务处理过程中的当前处理状态信息;The first task processing node monitors current processing status information during the task processing;
    在确定所述当前处理状态信息满足预设权重更新条件的情况下,基于所述当前处理状态信息以及预设权重更新参数,对所述任务处理权重进行更新。When it is determined that the current processing state information satisfies a preset weight update condition, the task processing weight is updated based on the current processing state information and a preset weight update parameter.
  6. 根据权利要求5所述的请求处理方法,所述当前处理状态信息为当前请求并发数量,所述预设权重更新参数包括预设最小请求并发阈值,以及预设最大请求并发阈值;According to the request processing method of claim 5, the current processing status information is the current number of concurrent requests, and the preset weight update parameters include a preset minimum concurrent request threshold and a preset maximum concurrent request threshold;
    相应地,所述基于所述当前处理状态信息以及预设权重更新参数,对所述任务处理权重进行更新,包括:Accordingly, the updating of the task processing weight based on the current processing state information and the preset weight update parameter includes:
    所述第一任务处理节点,确定所述预设最小请求并发阈值,以及所述预设最大请求并发阈值;The first task processing node determines the preset minimum request concurrency threshold and the preset maximum request concurrency threshold;
    基于所述预设最小请求并发阈值、所述预设最大请求并发阈值以及所述当前请求并发数量,获得更新任务权重信息,并基于所述更新任务权重信息替换所述任务权重信息。Based on the preset minimum request concurrency threshold, the preset maximum request concurrency threshold and the current number of concurrent requests, updated task weight information is obtained, and the task weight information is replaced based on the updated task weight information.
  7. 根据权利要求5所述的请求处理方法,所述当前处理状态信息为当前请求并发数量;According to the request processing method of claim 5, the current processing status information is the current concurrent number of requests;
    相应地,所述确定所述当前处理状态信息满足预设权重更新条件,包括:Accordingly, the determining that the current processing state information satisfies a preset weight update condition includes:
    所述第一任务处理节点,在确定所述当前请求并发数量大于等于预设最小请求并发阈值的情况下,确定所述当前处理状态信息满足预设权重更新条件。The first task processing node determines that the current processing status information satisfies a preset weight update condition when determining that the current concurrent request number is greater than or equal to a preset minimum concurrent request threshold.
  8. 根据权利要求5所述的请求处理方法,所述当前处理状态信息为当前处理资源信息;According to the request processing method of claim 5, the current processing state information is current processing resource information;
    相应地,所述确定所述当前处理状态信息满足预设权重更新条件,包括:Accordingly, the determining that the current processing state information satisfies a preset weight update condition includes:
    所述第一任务处理节点,在确定所述当前处理资源信息大于等于预设资源阈值的情况下,确定所述当前处理状态信息满足预设权重更新条件。The first task processing node determines that the current processing state information satisfies a preset weight update condition when determining that the current processing resource information is greater than or equal to a preset resource threshold.
  9. 根据权利要求1所述的请求处理方法,所述待处理请求为待处理订单;The request processing method according to claim 1, wherein the request to be processed is an order to be processed;
    相应地,所述基于所述任务处理权重以及所述至少两个待处理请求,为所述至少两个任务处理节点中的第一任务处理节点分配对应的待处理请求集合,包括:Accordingly, allocating a corresponding set of pending requests to a first task processing node among the at least two task processing nodes based on the task processing weight and the at least two pending requests includes:
    所述分配节点,基于订单任务处理权重以及所述至少两个待处理订单,为所述至少两个订单处理节点中的第一订单处理节点分配对应的待处理订单集合。The allocation node allocates a corresponding set of pending orders to a first order processing node among the at least two order processing nodes based on the order task processing weight and the at least two pending orders.
  10. 一种请求处理方法,应用于任务处理节点,包括:A request processing method, applied to a task processing node, comprising:
    基于任务处理权重生成任务响应消息,并将所述任务响应消息发送至分配节点;Generate a task response message based on the task processing weight, and send the task response message to the allocation node;
    接收所述分配节点为所述任务处理节点确定的待处理请求集合,其中,所述待处理请求集合为所述分配节点基于所述任务处理权重以及接收的至少两个待处理请求确定;receiving a set of pending requests determined by the allocation node for the task processing node, wherein the set of pending requests is determined by the allocation node based on the task processing weight and at least two pending requests received;
    对接收的所述待处理请求集合中的所述待处理请求进行任务处理,并根据所述任务处理过程中的当前处理状态信息,对所述任务处理权重进行更新;Performing task processing on the pending requests in the received pending request set, and updating the task processing weight according to current processing status information during the task processing;
    基于所述任务响应消息将更新后的任务处理权重发送至所述分配节点。The updated task processing weight is sent to the allocation node based on the task response message.
  11. 一种请求处理方法,应用于分配节点,包括: A request processing method, applied to an allocation node, comprising:
    接收至少两个待处理请求,并接收至少两个任务处理节点发送的任务响应消息,其中,所述任务响应消息中携带任务处理权重;receiving at least two pending requests and receiving task response messages sent by at least two task processing nodes, wherein the task response messages carry task processing weights;
    基于所述任务处理权重以及所述至少两个待处理请求,为所述至少两个任务处理节点中的第一任务处理节点分配对应的待处理请求集合,其中,所述第一任务处理节点为所述至少两个任务处理节点之一。Based on the task processing weight and the at least two pending requests, a corresponding pending request set is allocated to a first task processing node among the at least two task processing nodes, wherein the first task processing node is one of the at least two task processing nodes.
  12. 一种请求处理***,所述***包括分配节点以及至少两个任务处理节点,其中,A request processing system, the system comprising a distribution node and at least two task processing nodes, wherein:
    所述分配节点,被配置为接收至少两个待处理请求,并接收所述至少两个任务处理节点发送的任务响应消息,所述任务响应消息中携带任务处理权重;以及The allocation node is configured to receive at least two pending requests and receive a task response message sent by the at least two task processing nodes, wherein the task response message carries a task processing weight; and
    基于所述任务处理权重以及所述至少两个待处理请求,为所述至少两个任务处理节点中的第一任务处理节点分配对应的待处理请求集合,其中,所述第一任务处理节点为所述至少两个任务处理节点之一;Based on the task processing weight and the at least two pending requests, assigning a corresponding pending request set to a first task processing node among the at least two task processing nodes, wherein the first task processing node is one of the at least two task processing nodes;
    所述第一任务处理节点,被配置为对接收的所述待处理请求集合中的所述待处理请求进行任务处理,并根据所述任务处理过程中的当前处理状态信息,对所述任务处理权重进行更新,且基于所述任务响应消息将更新后的任务处理权重发送至所述分配节点。The first task processing node is configured to perform task processing on the pending requests in the received pending request set, update the task processing weight according to the current processing status information during the task processing, and send the updated task processing weight to the allocation node based on the task response message.
  13. 一种计算设备,包括:A computing device comprising:
    存储器和处理器;Memory and processor;
    所述存储器用于存储计算机可执行指令,所述处理器用于执行所述计算机可执行指令,该计算机可执行指令被处理器执行时实现权利要求10所述的请求处理方法,或者权利要求11所述的请求处理方法的步骤。The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the request processing method according to claim 10 or the steps of the request processing method according to claim 11 are implemented.
  14. 一种计算机可读存储介质,其存储有计算机可执行指令,该计算机可执行指令被处理器执行时实现权利要求10所述的请求处理方法,或者权利要求11所述的请求处理方法的步骤。 A computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, implement the request processing method of claim 10 or the steps of the request processing method of claim 11.
PCT/CN2023/124393 2022-10-24 2023-10-13 Request processing method and system WO2024088079A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211304750.9 2022-10-24
CN202211304750.9A CN115686840A (en) 2022-10-24 2022-10-24 Request processing method and system

Publications (1)

Publication Number Publication Date
WO2024088079A1 true WO2024088079A1 (en) 2024-05-02

Family

ID=85099496

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/124393 WO2024088079A1 (en) 2022-10-24 2023-10-13 Request processing method and system

Country Status (2)

Country Link
CN (1) CN115686840A (en)
WO (1) WO2024088079A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115686840A (en) * 2022-10-24 2023-02-03 阿里巴巴(中国)有限公司 Request processing method and system

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070143460A1 (en) * 2005-12-19 2007-06-21 International Business Machines Corporation Load-balancing metrics for adaptive dispatching of long asynchronous network requests
CN104394224A (en) * 2014-11-28 2015-03-04 无锡华云数据技术服务有限公司 Load balance system
CN108667878A (en) * 2017-03-31 2018-10-16 北京京东尚科信息技术有限公司 Server load balancing method and device, storage medium, electronic equipment
CN109308221A (en) * 2018-08-02 2019-02-05 南京邮电大学 A kind of Nginx dynamic load balancing method based on WebSocket long connection
CN110933139A (en) * 2019-11-05 2020-03-27 浙江工业大学 System and method for solving high concurrency of Web server
US20200193357A1 (en) * 2018-06-19 2020-06-18 Beijing Didi Infinity Technology And Development Co., Ltd. Systems and methods for allocating service requests
CN111930523A (en) * 2020-09-28 2020-11-13 支付宝(杭州)信息技术有限公司 Load balancing method and system for service cluster
CN112835698A (en) * 2021-02-09 2021-05-25 北京工业大学 Heterogeneous cluster-based dynamic load balancing method for request classification processing
CN113110933A (en) * 2021-03-11 2021-07-13 浙江工业大学 System with Nginx load balancing technology
CN114205361A (en) * 2021-12-08 2022-03-18 聚好看科技股份有限公司 Load balancing method and server
CN114500578A (en) * 2021-12-27 2022-05-13 天翼云科技有限公司 Load balancing scheduling method and device for distributed storage system and storage medium
CN115150399A (en) * 2022-07-25 2022-10-04 深圳爱换电科技有限公司 Load balancing method, load balancing device, processing system and storage medium
CN115686840A (en) * 2022-10-24 2023-02-03 阿里巴巴(中国)有限公司 Request processing method and system

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070143460A1 (en) * 2005-12-19 2007-06-21 International Business Machines Corporation Load-balancing metrics for adaptive dispatching of long asynchronous network requests
CN104394224A (en) * 2014-11-28 2015-03-04 无锡华云数据技术服务有限公司 Load balance system
CN108667878A (en) * 2017-03-31 2018-10-16 北京京东尚科信息技术有限公司 Server load balancing method and device, storage medium, electronic equipment
US20200193357A1 (en) * 2018-06-19 2020-06-18 Beijing Didi Infinity Technology And Development Co., Ltd. Systems and methods for allocating service requests
CN109308221A (en) * 2018-08-02 2019-02-05 南京邮电大学 A kind of Nginx dynamic load balancing method based on WebSocket long connection
CN110933139A (en) * 2019-11-05 2020-03-27 浙江工业大学 System and method for solving high concurrency of Web server
CN111930523A (en) * 2020-09-28 2020-11-13 支付宝(杭州)信息技术有限公司 Load balancing method and system for service cluster
CN112835698A (en) * 2021-02-09 2021-05-25 北京工业大学 Heterogeneous cluster-based dynamic load balancing method for request classification processing
CN113110933A (en) * 2021-03-11 2021-07-13 浙江工业大学 System with Nginx load balancing technology
CN114205361A (en) * 2021-12-08 2022-03-18 聚好看科技股份有限公司 Load balancing method and server
CN114500578A (en) * 2021-12-27 2022-05-13 天翼云科技有限公司 Load balancing scheduling method and device for distributed storage system and storage medium
CN115150399A (en) * 2022-07-25 2022-10-04 深圳爱换电科技有限公司 Load balancing method, load balancing device, processing system and storage medium
CN115686840A (en) * 2022-10-24 2023-02-03 阿里巴巴(中国)有限公司 Request processing method and system

Also Published As

Publication number Publication date
CN115686840A (en) 2023-02-03

Similar Documents

Publication Publication Date Title
US9948791B2 (en) Sharing group notification
US9565318B2 (en) Quality of service adjustments to improve network utilization
CN109684358B (en) Data query method and device
US8320246B2 (en) Adaptive window size for network fair usage controls
US9391749B2 (en) System and method for distributed data management in wireless networks
US11316792B2 (en) Method and system of limiting traffic
EP1993231A1 (en) Allocation method, system and device for network resource in communication network
WO2024088079A1 (en) Request processing method and system
WO2012082390A2 (en) Intelligent automated data usage upgrade recommendation
CN112445857A (en) Resource quota management method and device based on database
US9706438B1 (en) System, method, and computer program for congestion relief in a communication network
CN115277577B (en) Data processing method, apparatus, computer device, and computer readable storage medium
US20160294569A1 (en) Quota control policy
US10382630B2 (en) Telecommunication service subscription integration system
EP3476130B1 (en) Mobile video optimization
CN110868304B (en) PCC strategy issuing method and system
CN107786765B (en) Information interaction method and device
CN112738743A (en) Business service, real-time charging method, device, edge server and charging system
US11695878B2 (en) Adjustable and dynamic thresholds in wireless networks
WO2018018641A1 (en) Data transmission method and apparatus for data service
CN110115040A (en) Adaptive content optimization
US20160295028A1 (en) Tracking usage window for quota control policy
US20220070303A1 (en) Methods and nodes for maintaining a communication session for a subscriber
CN114356995A (en) Block chain data analysis method and device and related equipment
CN115150400A (en) Service fault processing method and device, cloud service platform and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23881658

Country of ref document: EP

Kind code of ref document: A1