CN115002225A - Request processing method and device and readable medium - Google Patents

Request processing method and device and readable medium Download PDF

Info

Publication number
CN115002225A
CN115002225A CN202210493178.9A CN202210493178A CN115002225A CN 115002225 A CN115002225 A CN 115002225A CN 202210493178 A CN202210493178 A CN 202210493178A CN 115002225 A CN115002225 A CN 115002225A
Authority
CN
China
Prior art keywords
service interface
flow control
access
access request
request
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202210493178.9A
Other languages
Chinese (zh)
Inventor
何贵民
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba China Co Ltd
Original Assignee
Alibaba China Co Ltd
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 Alibaba China Co Ltd filed Critical Alibaba China Co Ltd
Priority to CN202210493178.9A priority Critical patent/CN115002225A/en
Publication of CN115002225A publication Critical patent/CN115002225A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/30Flow control; Congestion control in combination with information about buffer occupancy at either end or at transit nodes

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

The application provides a request processing method, a request processing device and a readable medium, and relates to the technical field of networks. The method comprises the following steps: under the condition that an unsent access request exists, acquiring a first flow control residual quantity of a service interface which needs to be accessed by the access request in a concurrent time period; the first flow control residual quantity is used for representing the request residual quantity of the service interface which can successfully respond to the access request in a concurrent time period; sending an access request needing to access the service interface to the service interface according to the first flow control surplus of the service interface; wherein the number of the transmitted access requests is not greater than the first amount of the streaming remaining. Therefore, the problems that the number of requests of the service interface needing to be accessed exceeds the flow control threshold value due to excessive sent access requests can be avoided to a certain extent, the service interface cannot be accessed normally, and the access requests cannot be responded successfully, and further the problems that processing resources are wasted and burden is caused to the service interface due to the fact that invalid requests are sent for retrying are avoided.

Description

Request processing method and device and readable medium
Technical Field
The present application relates to the field of network technologies, and in particular, to a request processing method and apparatus, and a readable medium.
Background
At present, service interfaces are more and more widely applied, and in order to ensure stability of a service party, a service party sets a corresponding flow control threshold value for the service interface to control flow. Within a concurrent time period, the access request within the flow control threshold can be successfully responded, normally accesses to the service interface, and successfully calls the API. And the access request exceeding the flow control threshold cannot be successfully responded, cannot normally access the service interface, and fails to be called.
When a high concurrent access is initiated to a service interface, since multiple access requests are sent at a time, the flow control threshold of the service interface may be exceeded, and thus the access requests may not be successfully responded. In the prior art, retry is performed continuously according to a preset backoff strategy under the condition that response cannot be successfully performed. However, in this method, a large number of invalid requests that cannot be successfully responded may be sent to the service interface during the retry process, which results in a waste of processing resources and a burden on the service interface.
Disclosure of Invention
In view of the foregoing problems, embodiments of the present application provide a request processing method, an apparatus, and a readable medium to solve the problem that a large number of invalid requests that will not be successfully responded to may be sent to a service interface during a retry process, which may cause a waste of processing resources and a burden on the service interface.
In order to solve the above problem, an embodiment of the present application discloses a request processing method, including:
under the condition that an unsent access request exists, acquiring a first flow control residual quantity of a service interface which needs to be accessed by the access request in a concurrent time period; the first flow control residual quantity is used for representing the request residual quantity of the service interface which can successfully respond to the access request in the concurrent time period;
sending an access request needing to access the service interface to the service interface according to the first flow control surplus of the service interface; wherein the number of the transmitted access requests is not greater than the first amount of the streaming remaining.
Optionally, in another embodiment of the present application, the method further includes:
writing the second flow control residual quantity into a target cache distributed for the service interface;
the updating the second flow remaining amount includes:
updating the second flow control surplus in the target cache; the effective duration of the target cache is not less than the duration of the concurrency time period;
the method further comprises the following steps:
and clearing the target cache after the effective duration.
Optionally, in another embodiment of the present application, the method further includes:
generating a key word for representing the interface identity according to the accessed service interface information in the request;
the writing the second flow control residual amount into a target cache allocated to the service interface includes:
and writing the second flow control residual quantity into a target cache corresponding to the keyword.
Optionally, in another embodiment of the present application, the obtaining of the first remaining amount of flow control of the service interface that needs to be accessed by the access request in a concurrent time period includes:
receiving response information returned by the service interface for the access request; the response information comprises a first flow control residual amount of the service interface in the concurrent time period;
and extracting the first flow control residual quantity from the response information.
Optionally, in another embodiment of the present application, the method further includes:
under the condition that the first flow control residual quantity is not larger than a second preset threshold value and/or received response information returned by the service interface is used for representing response failure of the service interface, reacquiring the first flow control residual quantity in a next concurrent time period, and sending the access request needing to access the service interface to the service interface according to the reacquired first flow control residual quantity;
and when the first flow control residual amount is larger than the second preset threshold value, executing the step of sending an access request needing to access the service interface to the service interface according to the first flow control residual amount of the service interface.
Optionally, in another embodiment of the present application, in a case that there are at least two service interfaces, flow control thresholds of at least some of the service interfaces are different.
The embodiment of the application also discloses another request processing method, which is applied to a client and comprises the following steps:
receiving a cloud resource processing task;
generating at least one group of access requests according to the cloud resource processing task; the method comprises the following steps that a same group of access requests are used for accessing a same service interface of a server, and the server has at least one service interface;
for a group of access requests, under the condition that unsent access requests exist, acquiring a first flow control residual quantity of a corresponding service interface in a concurrent time period from a server; the first flow control residual quantity is used for representing the request residual quantity of the service interface which can successfully respond to the access request in the concurrent time period;
according to the first flow control surplus of the service interface, sending the access request to the service end to access the service interface; wherein the number of the transmitted access requests is not greater than the first amount of the streaming remaining.
Correspondingly, the embodiment of the present application further discloses a request processing apparatus, including:
the first acquisition module is used for acquiring a first flow control residual quantity of a service interface which needs to be accessed by an access request in a concurrent time period under the condition that the unsent access request exists; the first flow control residual quantity is used for representing the request residual quantity of the service interface which can successfully respond to the access request in the concurrent time period;
the sending module is used for sending an access request needing to access the service interface to the service interface according to the first flow control surplus of the service interface; wherein the number of the transmitted access requests is not greater than the first amount of the streaming remaining.
The embodiment of the application also discloses another request processing device, which is applied to a client and comprises:
the receiving module is used for receiving the cloud resource processing task;
the generating module is used for generating at least one group of access requests according to the cloud resource processing tasks; the method comprises the following steps that a same group of access requests are used for accessing a same service interface of a server, and the server has at least one service interface;
the acquisition module is used for acquiring a first flow control residual amount of a corresponding service interface in a concurrency time period from a server under the condition that an unsent access request exists for a group of access requests; the first flow control residual quantity is used for representing the request residual quantity of the service interface which can successfully respond to the access request in the concurrent time period;
the sending module is used for sending the access request to the server side according to the first flow control surplus of the service interface so as to access the service interface; wherein the number of the transmitted access requests is not greater than the first amount of the streaming remaining.
Correspondingly, the embodiment of the application also discloses a device, which comprises:
one or more processors; and
one or more machine-readable media having instructions stored thereon, which when executed by the one or more processors, cause the apparatus to perform the above-described methods.
Accordingly, embodiments of the present application also disclose one or more machine-readable media having instructions stored thereon, which when executed by one or more processors, cause an apparatus to perform the above-described methods.
The embodiment of the application has the following advantages:
the embodiment of the application comprises the following steps: under the condition that an unsent access request exists, acquiring a first flow control residual quantity of a service interface which needs to be accessed by the access request in a concurrency time period; the first flow control residual quantity is used for representing the request residual quantity of the service interface which can successfully respond to the access request in a concurrent time period; sending an access request needing to access the service interface to the service interface according to the first flow control surplus of the service interface; wherein the number of the transmitted access requests is not greater than the first amount of the streaming remaining. Therefore, the problems that the number of requests of the service interface needing to be accessed exceeds the flow control threshold value due to excessive sent access requests can be avoided to a certain extent, the service interface cannot be accessed normally, and the access requests cannot be responded successfully, and further the problems that processing resources are wasted and burden is caused to the service interface due to the fact that invalid requests are sent for retrying are avoided.
Drawings
FIG. 1 is a diagram of an implementation architecture provided by an embodiment of the present application;
fig. 2 is a schematic diagram of an application scenario provided in an embodiment of the present application;
fig. 3 is a schematic diagram of another application scenario provided in an embodiment of the present application;
FIG. 4 is a schematic diagram of another application scenario provided in an embodiment of the present application;
FIG. 5 is a schematic diagram of another application scenario provided in an embodiment of the present application;
FIG. 6 is a flowchart illustrating steps of a method for processing a request according to an embodiment of the present application;
FIG. 7 is a schematic flow chart diagram provided by an embodiment of the present application;
FIG. 8 is a flow chart illustrating steps of another request processing method provided by an embodiment of the present application;
fig. 9 is a block diagram of a request processing apparatus according to an embodiment of the present application;
FIG. 10 is a block diagram of another request processing device provided in an embodiment of the present application;
fig. 11 is a schematic structural diagram of an apparatus according to another embodiment of the present application.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, the present application is described in further detail with reference to the accompanying drawings and the detailed description.
To enable those skilled in the art to better understand the present application, the following description is made of the concepts related to the present application:
service interface: may refer to an Application Programming Interface (API) provided by the server. Specifically, the API may refer to an open API (open API) provided by a service end, and sending the access request to the service interface may be sending the access request to the service end providing the service interface.
Flow control: also referred to as flow control, for controlling the number of accesses to the same service interface within the same concurrency time period.
Flow control threshold: the flow control thresholds for different service interfaces may be different, or may be the same. The flow control threshold of a service interface is used to characterize the number of access requests for accessing the service interface that can be successfully responded to at maximum within a concurrent time period. For example, if the flow control threshold of API1 is 1000, then a maximum of 1000 call requests for accessing API1 can be successfully responded to within one concurrency time period.
Concurrent time period: also called as time slice, the length of the time slice can be set according to the actual requirement. For example, one time slice may be 1 second. Accordingly, the flow control threshold may characterize the maximum number of requests that can be successfully responded to per second.
And (3) access request: and the request for accessing the service interface can be sent by the client to the server. The service interface can be understood as a calling service interface, and when the service interface can be normally accessed, the service interface can successfully respond to the access request, and the access request can successfully call the service interface. When the service interface is not normally accessed, the service interface cannot successfully respond to the access request, and the access request cannot successfully call the service interface, which may cause call failure. If the number of times of accessing the service interface required to be accessed in the concurrent time period does not exceed the flow control threshold, the access request can be successfully responded, and the service interface can be normally accessed. If the number of times of accessing the service interface required to be accessed in the concurrency time period exceeds the flow control threshold, the access request cannot be successfully responded, the service interface cannot be normally accessed, and the call failure occurs. The number of times that the service interface is accessed may refer to the number of access requests that the service interface has successfully responded, and generally, the number of access requests received by the service interface is the number of access requests that have successfully responded when the flow control threshold is not exceeded.
First flow control remaining amount: the remaining number of requests characterizing the successful response of the service interface to the access request within the concurrent time period. The first flow control surplus may be dynamically changed during the concurrent time period. If the server has not received an access request for accessing the service interface within the concurrent time period, a first flow control residual amount of the service interface within the concurrent time period may be equal to the flow control threshold. As the client sends an access request for accessing the service interface, the first amount of flow control remaining will decrease accordingly. For example, assuming that the flow control threshold is 1000, 500 access requests for accessing the service interface have been received in a concurrent time period, and the service interface has successfully responded to 500 access requests, the first flow control remaining amount of the service interface in the concurrent time period is 500. Further, if 300 access requests for accessing the service interface are received again, the first amount of traffic remaining for the service interface in the concurrent time period becomes 200.
High concurrency: refers to sending a large number of access requests to a service interface within the same time slice.
Backoff strategy: refers to a retry strategy taken after encountering a failure to invoke an interface. For example, the access request is resent at a preset retry interval.
The following describes an application scenario related to the present application.
Referring to fig. 1, an implementation architecture diagram of the present application is shown, including: client 00 and server 01. The server 01 may be a cloud platform formed by servers, or may also be a single server. A plurality of service interfaces may be provided in the service 01. Each service interface may be used to perform specified operations, which may be set based on actual requirements, e.g., may be create, delete, update, query, read, etc. Client 00 can perform specified operations by accessing service interface, and assuming that service interface 1 can be used to create an instance, client 01 can access service interface 1 to create an instance.
In a high concurrency scenario, the client may access the service interface in the server with a large number of concurrencies, and may send multiple access requests each time. But is limited by the flow control threshold of the service interface, the problem of access failure may occur, and the stability of the client is affected. In the embodiment of the present application, when a client 00 requests to access a service interface, for an access request that is not sent, first, a first flow control remaining amount of the service interface that the access request needs to access within a concurrence time period is obtained. And sending an access request which needs to access the service interface in the unsent access requests according to the first flow control residual quantity. And controlling the number of the access requests sent to the server 01 according to the first flow control surplus which can be successfully responded actually, so as to avoid exceeding the flow control threshold of the service interface. Therefore, the problems that access requests are not successfully responded, the service interfaces cannot be normally accessed, access failure is caused, and flow control errors occur can be avoided to a certain extent, the occurrence probability of the flow control errors can be reduced, loss caused by sending a large number of invalid requests for retry is avoided, and the problems that processing resources are wasted and burdens are caused to the server 01 are avoided.
Referring to fig. 2, a schematic diagram of an application scenario of the present application is shown, where a client currently has M unsent access requests, and a server provides N APIs for explanation. Assume that access request 1, access request 100, is for access API1 and access request 101, access request M, is for access API 2. For a set of access requests: access request 1-access request 100, may determine a first amount of streaming remaining for API1 during the concurrent time period. For another set of access requests: access request 101-access request M, may determine a first amount of streaming remaining for API2 within a concurrent time period.
Further, for a set of access requests: the access requests 1 to 100 may send the access requests of the access requests 1 to 100 to the server according to the first remaining amount of flow control of the API1, where the number of sent access requests is not greater than the first remaining amount of flow control of the API 1. Assuming that the first amount of flow control for API1 is 500, access request 1-access request 100 may all be sent to API 1. For newly generated access requests for accessing the API1 within the concurrent time period, the first remaining amount of the flow control of the API1 still has a margin, and therefore, the access requests can be continuously sent to the server. For another set of access requests: the access requests 101 to M may send the access requests of the access requests 101 to M to the server according to the first remaining amount of flow control of the API2, where the number of sent access requests is not greater than the first remaining amount of flow control of the API 2. Therefore, the problem of access failure of the API1 or the API2 in a concurrent time period can be avoided, and the problems of processing resource waste and burden on a service interface in a server caused by retry are further avoided. It should be noted that, the server may return Response information (Response) to the client for the received access request. The response information may be used to characterize whether the access request is successfully responded, that is, may be used to characterize whether the API requested to be accessed is normally accessed.
Further, the access request in the embodiment of the present application may be generated based on a task initiated at the client. The task may be initiated manually by a user or automatically by the client. Referring to fig. 3, a schematic diagram of another application scenario of the present application is shown, where a user may initiate a pending task at a client, and the client may generate a plurality of access requests based on the pending task. Illustratively, the client may parse the pending task to generate a plurality of access requests. When an access request is sent, for an access request which is not sent, a client can obtain the first flow control surplus of an API which needs to be accessed by the access request in a concurrent time period, and for any API which needs to be accessed, an access request for accessing the API is sent to a server according to the first flow control surplus of the API, so that the problem that the number of the sent access requests is too large to cause access failure is solved, and the problems that processing resources are wasted and burden is caused to a service interface in the server due to retry are solved. Because the number of the access requests sent this time is not more than the first flow control residual amount, the server side can successfully respond to the access requests and access the API required to be accessed. Accordingly, the service end can return response information to represent that the service interface response is successful, and the API required to be accessed by the access request is successfully called.
The specific type of the to-be-processed task may be set based on actual requirements, for example, the to-be-processed task may be a cloud resource processing task, for example, a resource scheduling task. Resource orchestration tasks may be used to orchestrate resources, illustratively resources that, as objects that are orchestrated, may be created, deleted, updated, read, used in combination, and so forth. Resources may include instances, services, and the like. Examples may include virtual switches (Vswitch), elastic computing service instances (ECS), database instances (RDS), etc., and services may include elastic scaling services, load balancing services, etc. In a resource arrangement scenario, a client may be a resource arrangement tool, and a server may be a cloud platform. The resources may be cloud resources provided by the cloud platform, or may also be resources provided by other platforms. The client can be integrated with the server, and the integration of the client and the server is usually realized by calling OpenAPI provided by the server. In the development process, the integration of the client and the server can realize the client for managing resources, and the integration process can refer to packaging and calling the OpenAPI of the cloud platform and performing different processing according to the response result of the OpenAPI. After the integration is finished, the integrated client can be downloaded and installed in a client mode. When the method is used, a user can specify the number of the concurrent resources which are created and managed concurrently, and the client can convert the number of the concurrent resources into the number of concurrent calls to the OpenAPI, so that concurrent management of the resources on the cloud is achieved. However, as the types and the number of resources used in tasks increase, the number of concurrencies increases to improve the management efficiency. But is limited by the flow control threshold of OpenAPI, and the increasing number of concurrencies may cause the failure of the resource orchestration task.
In the embodiment of the application, a user can initiate a resource scheduling task at a client, and an access request can be generated by the client based on the resource scheduling task. Assuming that the resource arrangement task corresponds to D resources, E APIs are sequentially called for each resource to be arranged, and then D × E access requests can be generated based on the resource arrangement task to obtain E groups of access requests. Referring to fig. 4, a schematic diagram of another application scenario of the present application is shown, assuming that 3 sets of access requests are generated based on a resource orchestration task: access request 1-access request 100, access request 101-access request 200, access request 201-access request X. For a group of access requests, for an access request which is not sent, the client can send the access request to the server according to the first flow control residual quantity of the API which needs to be accessed by the group of access requests in a concurrent time period, so as to avoid the problem that the number of the sent access requests is greater than the first flow control residual quantity, which causes call failure. Because the number of the access requests sent this time is not more than the first flow control residual amount, the API required to be accessed by the access requests can be successfully called. By successfully calling the API, resource orchestration can be performed, performing orchestration operations that the called API can implement, e.g., creating resources, updating resources, reading resources, and so forth. Illustratively, assuming that Q access requests are sent, and the APIs that the Q access requests need to access are used to create resources, then Q resources may be created.
Referring to fig. 5, a schematic diagram of another application scenario of the present application is shown, in which an access request may be generated by a client based on an order processing task. For the access request which is not sent, the client side can send the access request to the server side according to the first flow control surplus of the API which needs to be accessed by the access request in the concurrent time period so as to call the API which needs to be accessed by the access request. Because the sent access request is not larger than the first flow control residual amount, the API can be successfully called to process orders. Assuming that the API called this time is used to update the order status, and there are R access requests sent this time, and these access requests are used to indicate that the status of order 1, order 2, …, and order R is updated, the status of order 1, order 2, 2 …, and order R can be updated through the called API. Wherein the order may be a logistics order, a payment order, and the like. An API for performing other operations, such as an API for creating an order, an API for deleting an order, and an API for modifying an order, may also be provided in the server. Order creation, deletion, modification can be made by accessing these APIs.
The request processing method according to the present application will be described in detail below.
Referring to fig. 6, a flow chart illustrating steps of a request processing method of the present application may include:
step 101, under the condition that an unsent access request exists, acquiring a first flow control residual quantity of a service interface which needs to be accessed by the access request in a concurrent time period; the first flow control residual amount is used for representing the request residual amount of the service interface which can successfully respond to the access request in the concurrent time period.
In this embodiment of the present application, the unsent access requests may be all access requests generated based on the to-be-processed task, or may be access requests generated based on the to-be-processed task, in which the remaining part of all the access requests is unsent. The unsent access requests that exist within a concurrent time period may be generated within the concurrent time period and/or generated within a previous concurrent time period. The first remaining amount of flow control of the service interface in the concurrent time period may be determined based on a flow control threshold of the service interface and a number of successfully responded access requests of the service interface in the concurrent time period, for example, the first remaining amount of flow control may be a difference between the flow control threshold of the service interface and the number of successfully responded access requests in the concurrent time period. The first flow control remaining amount of the service interface with a larger flow control threshold value can be larger under the same access amount.
The access requests generated within a concurrent time period may be generated based on one or more pending tasks. There may be different numbers of unsent access requests, and therefore unsent access requests may be sent within one concurrent time period or may be sent over multiple concurrent time periods.
102, sending an access request needing to access the service interface to the service interface according to the first flow control residual amount of the service interface; wherein the number of the transmitted access requests is not greater than the first amount of the streaming remaining.
In the embodiment of the application, the sending of the access request to the service interface may be sending the access request to a server providing the service interface, and the server may call the service interface according to the access request to realize interface access without exceeding a flow control threshold of the service interface. For any service interface needing to be accessed, the number of the access requests sent at this time can be determined according to the number of the access requests needing to access the service interface. For example, all the access requests which need to access the service interface can be sent under the condition that the number of the access requests which need to access the service interface is not larger than the first flow control residual amount, so that the number of the sent access requests is increased, and the sending efficiency is improved. Alternatively, all the access requests that need to access the service interface may be sent to the service interface only when the first remaining amount of flow control has a large difference from the number of access requests that need to access the service interface, for example, the difference is greater than the first difference threshold. And sending part of the access requests needing to access the service interface to the service interface under the condition that the difference between the first flow control residual quantity and the number of the access requests needing to access the service interface is small, for example, the difference is not greater than a first difference threshold. The larger the difference value is, the more access requests can be sent at this time. Therefore, the problem that the service interface cannot be normally accessed can be avoided to a greater extent due to the fact that the request quantity of the service interface accessed in the concurrent time period exceeds the flow control threshold value caused by the sending operation. It should be noted that, in the embodiment of the present application, the number of the clients may be 1 or more, and when there are multiple clients, because the number of the sent access requests is smaller than the first flow control remaining amount, the problem that the number of the requests for accessing the service interface exceeds the flow control threshold value due to the access requests sent this time because other clients simultaneously request to access the service interface can be avoided to a certain extent.
In the embodiment of the application, the access requests for accessing the same service interface can be used as a group of access requests. Aiming at a group of access requests, under the condition that unsent access requests exist in the group of access requests, acquiring the first flow control surplus of a service interface which needs to be accessed by the group of access requests in a concurrent time period, and sending the access requests which need to access the service interface to the service interface according to the first flow control surplus of the service interface which needs to be accessed by the group of access requests.
In summary, in the request processing method provided in the embodiment of the present application, under the condition that there is an unsent access request, a first flow control residual amount of a service interface that needs to be accessed by the access request in a concurrency time period is obtained, where the first flow control residual amount is used to represent a request residual amount that the service interface can successfully respond to the access request in the concurrency time period. And sending an access request needing to access the service interface to the service interface according to the first flow control residual quantity of the service interface. Wherein the number of the transmitted access requests is not greater than the first amount of the streaming remaining. Therefore, the problems that the number of requests of the service interface needing to be accessed exceeds the flow control threshold value due to excessive sent access requests can be avoided to a certain extent, the service interface cannot be accessed normally, and the access requests cannot be responded successfully, and further the problems that processing resources are wasted and burden is caused to the service interface due to the fact that invalid requests are sent for retrying are avoided.
Optionally, in this embodiment of the application, the first remaining flow control amount may be obtained again within a next concurrent time period when the first remaining flow control amount is not greater than a second preset threshold and/or received response information returned by the service interface is used to characterize that the service interface fails to respond, and the access request that needs to access the service interface is sent to the service interface according to the obtained first remaining flow control amount. The second preset threshold may be set according to an actual requirement, for example, the second preset threshold may be 0. If the first flow control residual quantity is not greater than the second preset threshold value and/or response information returned by the service interface is used for representing the response failure of the service interface, it can be determined that the service interface needing to be accessed cannot successfully respond to the access request within the concurrent time period. Therefore, the method can wait for the next concurrency time period, acquire the first flow control residual amount again in the next concurrency time period, and transmit according to the acquired first flow control residual amount again. Thus, the problem of repeated failure caused by immediate retry can be avoided, and the probability of failure of response of the sent access request is reduced as much as possible. If the first flow control residual amount is greater than the second preset threshold value, the step of sending an access request needing to access the service interface to the service interface according to the first flow control residual amount of the service interface can be executed, so that the access request is sent to the service interface as soon as possible, and the request processing time length is shortened.
In an implementation scenario, there may be at least two service interfaces, and in a case that there are at least two service interfaces, flow control thresholds of at least some of the service interfaces are different. Illustratively, the flow control thresholds of at least two service interfaces may be different from each other, or the flow control thresholds of the existing part of the service interfaces are the same. In the embodiment of the application, the number of the sent access requests is limited based on the flow control residual amount of the service interface which is actually required to be accessed by the unsent access requests, so that even in a scene that flow control thresholds of the service interfaces are different, the problem that the access requests cannot be successfully responded due to excessive sent access requests can be avoided.
Optionally, the step of obtaining the first flow control remaining amount of the service interface that the access request needs to access in the concurrent time period may specifically include:
substep S21, receiving response information returned by the service interface for the access request; the response information comprises a first flow control residual amount of the service interface in the concurrent time period.
In this embodiment, the response information may be specifically returned by the server providing the service interface. The response information returned by the service interface for the access request may be returned for the access request received last time for accessing the service interface required to be accessed in the concurrency time period. The service interface may return a response message for any access request received. Because there may be differences in the arrival times of multiple access requests sent in parallel to the service interface, the first flow control residual amounts carried in different response messages are different. For example, the flow control threshold of the service interface is 1000, and the service interface has received 500 access requests by now. The first remaining amount of flow control included in the returned response information may be 499 for the 501 th received access request, and 498 for the 502 th received access request.
Further, response information is returned when the access request normally accesses the service interface or does not normally access the service interface. Accordingly, in the case of normal access to the service interface, the returned response information may be used to characterize that the service interface responds successfully, and that the service interface is successfully accessed. In the case of not accessing the service interface normally, the returned response information may be used to characterize that the service interface failed to respond, and the service interface was not accessed normally.
It should be noted that, if there are only 1 client and no access request has been sent to the service interface within the concurrent time period, the flow control threshold of the service interface may be directly determined as the first remaining flow control amount. If a plurality of clients exist, the method can receive the specified information returned by the service interface, the specified information can be used for representing that no access request is received in the concurrency time period, and the flow control threshold value of the service interface is determined as the first remaining flow control amount under the condition that the specified information is received. Correspondingly, when a plurality of clients exist, the service interface may also periodically synchronize the current first remaining flow control amount, and determine the first remaining flow control amount synchronized last time as the first remaining flow control amount of the service interface in the concurrent time period. In this way, even if a plurality of clients exist, the clients can be ensured to acquire a relatively accurate first flow control residual amount to some extent.
And a substep S22 of extracting the first remaining flow amount from the response information.
In the embodiment of the application, the response information may be analyzed, and the first flow control residual amount may be extracted from the specified position of the response information. The designated position may be set according to actual requirements, for example, the designated position may be a response header of the response information.
In the embodiment of the application, the first flow control surplus can be obtained by extracting the response information returned by the received service interface for the access request, so that the obtaining efficiency of obtaining the first flow control surplus can be ensured to a certain extent. And the first flow control surplus is extracted from the response information returned by the service interface, so that the acquired first flow control surplus can be ensured to conform to the actual condition of the service interface to a certain extent, and the accuracy of the first flow control surplus can be ensured to a certain extent.
Optionally, the step of sending, according to the first flow control remaining amount of the service interface, an access request that needs to access the service interface to the service interface may specifically include:
substep S31, adjusting the first flow control residual quantity to obtain a second flow control residual quantity; the second flow control remaining amount is smaller than the first flow control remaining amount.
For example, the service interface may receive an access request sent by another client, or receive an access request arriving later in a plurality of access requests sent in parallel. This results in a reduced amount of the actual first flow control remaining for the service interface. That is, the first remaining flow control amount acquired by the client may be larger than the current actual remaining flow control amount. Assuming that the flow control threshold of the service interface is 1000, the service interface has received 500 access requests by now. The last time 50 access requests were sent to the service interface, the actual first amount of traffic remaining for the service interface should be 450. However, the sequence of the access requests arriving at the service interface is different, and the sequence of the response information returned by the access requests received is also different. Assuming that response information returned by the service interface for the received 530 th access request is received first, the first flow control residual amount is obtained: 470. the actual first amount of flow control remaining after all access requests are received by the service interface should be 450. If the acquired first flow control surplus is directly used for sending, the number of the access requests sent this time may be too large. Therefore, in the embodiment of the present application, the acquired first remaining flow control amount may be adjusted to reduce the first remaining flow control amount. Therefore, the value after subsequent reduction is sent, and the problem that the number of the access requests sent this time is too large can be avoided to a certain extent.
In this embodiment, after one parallel transmission is completed, the number of the received response messages may be counted, and when the number of the received response messages is equal to the number of the access requests transmitted in parallel, the largest first remaining amount of the streaming control may be extracted from the plurality of response messages, so as to improve the accuracy of the acquired first remaining amount of the streaming control.
And a substep S32, sending an access request for accessing the service interface to the service interface based on the second flow control residual amount.
Because the acquired first flow control residual amount may be larger, in the embodiment of the application, the second flow control residual amount is acquired by reducing the first flow control residual amount, so that the second flow control residual amount better conforms to the actual residual condition of the service interface. And sending an access request to the service interface based on the second flow control residual amount. Because the adopted sending basis is more in line with the actual remaining condition of the service interface, the problem that the request quantity of the service interface exceeds the flow control threshold value after sending, and further the retry is needed can be avoided to a greater extent.
Optionally, in an implementation manner, the step of adjusting the first remaining flow control amount to obtain the second remaining flow control amount may specifically include: and adjusting the first flow control surplus according to a preset first adjusting weight to obtain the second flow control surplus. The first adjustment weight may be set according to actual requirements, which is not limited in the embodiment of the present application. For example, the first adjustment weight may be 0.6. In the adjustment according to the first adjustment weight, a method of reducing the first remaining flow rate may be adopted, and for example, a product of the first adjustment weight and the first remaining flow rate may be calculated and used as the second remaining flow rate. In the implementation mode, the second flow control surplus can be obtained only by directly adjusting according to the preset first adjusting weight, so that the adjusting efficiency can be ensured to a certain extent.
In another implementation manner, the step of adjusting the first remaining flow control amount to obtain the second remaining flow control amount may specifically include:
a substep S41, determining a second adjustment weight of the first remaining flow control amount according to the first remaining flow control amount of the service interface in the concurrent time period and a flow control threshold value of the service interface in the concurrent time period; wherein the second adjustment weight is positively correlated with the first flow control residual amount.
In the embodiment of the application, the ratio of the first remaining flow control amount to the flow control threshold may be determined, and the second adjustment weight of the first remaining flow control amount may be determined according to the ratio. Wherein the duty ratio is positively correlated with the first flow control remaining amount, and the second adjustment weight may be positively correlated with the duty ratio. The flow control threshold of the service interface may be pre-synchronized to the client. When the second adjustment weight is determined, a section to which the proportion belongs may be determined, and then a weight corresponding to the section to which the proportion belongs may be determined as the second adjustment weight of the first flow control remaining amount. Wherein, the maximum value of the second adjustment weight may be 1. For example, in the case where the occupancy is greater than 70%, the second adjustment weight may be 1.
And a substep S42, lowering the first remaining flow control amount based on the second adjustment weight, to obtain the second remaining flow control amount.
For example, a product of the second adjustment weight and the first remaining amount of gating may be calculated as a second remaining amount of gating. In the implementation manner, according to the first flow control surplus of the service interface in the concurrent time period and the flow control threshold of the service interface in the concurrent time period, the second adjustment weight of the first flow control surplus is determined, and the first flow control surplus is adjusted to be lower based on the second adjustment weight to be used as the second flow control surplus. Wherein the second adjustment weight is positively correlated with the first flow control residual amount. In this way, the adjustment weight adopted during adjustment is adaptively determined based on the first flow control residual quantity of the service interface to be accessed, so that the reasonability of the second flow control residual quantity obtained after adjustment can be ensured to a certain extent under the condition that the adjusted second flow control residual quantity is more consistent with the actual condition of the service interface to be accessed.
Optionally, the step of sending, to the service interface, an access request that needs to access the service interface based on the second flow control remaining amount may specifically include:
substep S51, setting waiting time for the access request needing to access the service interface; wherein at least some of the access requests have different wait durations.
Specifically, different waiting time durations may be set for different access requests that need to access the service interface. Assuming that there are 100 access requests that require access to the service interface, the set 100 wait durations may be different. Alternatively, the waiting time lengths in which some access requests exist may also be set to be the same, for example, 10 of the set 100 waiting time lengths may exist, which is not limited in this embodiment of the present application.
Substep S52, sending the access request to the service interface according to the waiting time of the access request; wherein the number of access requests sent within the concurrent time period is not greater than the second amount of traffic remaining.
In the embodiment of the application, the waiting time is set for the access request needing to access the service interface, and the access request is sent to the service interface according to the waiting time of the access request under the condition that the sent number is controlled not to be more than the second flow control residual amount, so that the problem that the request number of the service interface needing to be accessed exceeds the flow control threshold value and the service interface can not be normally accessed due to the sent access request can be avoided to a greater extent, and further retry is avoided to a greater extent. And because the waiting time lengths of the access requests are different, the problem that the service interface is impacted because the access requests needing to access the same service interface are simultaneously sent to the service interface at one time can be avoided to a certain extent.
Optionally, in an implementation manner, the step of setting a waiting duration for an access request that needs to access the service interface may specifically include:
and a substep S61, setting a waiting time for waiting for the next access request after the previous access request is sent for the access request needing to access the same service interface.
Correspondingly, the step of sending the access request to the service interface according to the waiting duration of the access request may specifically include:
substep S71, after sending the previous access request, selecting another access request to send through the waiting time length until the number of the sent access requests reaches the target number or until the concurrence time period is finished; wherein the target number is not greater than the second flow control residual amount.
In this implementation, waiting time durations may be set for access requests that need to access the same service interface one by one, and after the waiting time durations are reached, the access requests may be sent one by one. Specifically, a waiting time duration may be randomly set for one of the access requests that need to access the same service interface, and after the waiting time duration of the access request elapses, the access request is selected to be sent. After transmission, a waiting time period may be randomly set for one of the remaining access requests, and after the waiting time period of the access request elapses, the access request is selected for transmission. The access request selected after the previous access request is sent may be an access request for which a waiting time length is set after the previous access request is sent. By analogy, the transmission is stopped in case the number of transmitted access requests reaches the target number or, alternatively, in case the concurrent time period ends. The target number may be set according to an actual requirement, for example, the target number may be equal to the second flow control remaining amount, so that more access requests may be sent, and the access efficiency is improved. The target number may also be smaller than the second remaining amount of traffic, so that the problem of a large total number of transmitted access requests may be further avoided.
In the implementation mode, after the last access request is sent, the waiting time length for waiting of the next access request is set for the access requests needing to access the same service interface, and after the last access request is sent, one access request is selected again based on the waiting time length to be sent until the number of the sent access requests reaches the target number or the concurrency time period is ended. In this way, the sent multiple access requests can be sent one by one, so that the receiving pressure of the service interface can be relieved to a greater extent.
Optionally, in another implementation, the waiting time duration may be set for all access requests that need to access the same service interface, and then the access requests are sent, so as to ensure the overall operation efficiency. Specifically, in the sending process, the timing may be started after the waiting time duration is set for all the access requests that need to access the same service interface. If the waiting time of a certain access request is reached, the access request can be sent to the service interface, and the sending is finished and the timing is stopped until the number of the sent access requests reaches the target number or the concurrency time period is finished. Alternatively, after the last access request is transmitted, the timer may be restarted, and the transmission may be ended until the number of transmitted access requests reaches the target number or until the end of the concurrent time period.
Optionally, in this embodiment of the present application, a target ratio may also be obtained first, and when the target ratio is greater than or equal to a preset ratio threshold, a step of setting a waiting duration for an access request that needs to access the service interface is performed. Under the condition that the target ratio is smaller than a preset ratio threshold, directly sending the access request needing to access the service interface to the service interface; the target ratio is a ratio between the number of access requests which need to access the service interface and the second flow control residual amount, or the target ratio is a ratio between the second flow control residual amount and a flow control threshold value of the service interface.
Wherein, the preset ratio threshold value can be set according to actual requirements. For example, the preset ratio threshold may be 1, or a value less than 1. In the case that the target ratio is a ratio between the number of access requests that need to access the service interface and the second flow control remaining amount, if the target ratio is smaller than a preset ratio threshold, it may be considered that the second flow control remaining amount is relatively sufficient. Thus, an access request requiring access to a service interface can be directly sent to the service interface. In this way, transmission efficiency can be ensured. For example, multiple send threads may be created, with which access requests requiring access to the service interface are sent in parallel to the service interface. If the target ratio is equal to or greater than the preset ratio threshold, it may be considered that the second flow control residual amount may be insufficient. Therefore, the waiting time length can be set for the access requests needing to access the service interface, so that the access requests can be selected to be sent in sequence according to the waiting time length, and further, the phenomenon that too many access requests are sent at one time is avoided.
In the case that the target ratio is a ratio between the second remaining flow control amount and a flow control threshold of the service interface, if the target ratio is smaller than a preset ratio threshold, the flow control threshold of the service interface to be accessed may be larger, and the number of access requests that can be accepted within a single concurrent time period of the service interface to be accessed is larger. Thus, an access request requiring access to a service interface can be directly sent to the service interface. And if the target ratio is smaller than the preset ratio threshold, the amount of access requests which can still be successfully responded by the service interface needing to be accessed currently is possibly small. Therefore, the access request needing to access the service interface is directly sent to the service interface, and the problem that the sent access request fails to respond because the residual flow control quantity of the service interface is consumed by the access requests of other clients in the waiting process can be avoided. Conversely, if the target ratio is greater than or equal to the preset ratio threshold, it can be determined that the number of access requests that can be accepted within a single concurrent time period of the service interface that needs to be accessed is small. Therefore, the waiting time length can be set for the access requests needing to access the service interface, so that the access requests can be selected according to the waiting time length to be sent in sequence, and further, the condition that too many access requests are sent at one time is avoided.
In the embodiment of the present application, all the access requests that need to access the service interface may also be directly sent when the second remaining amount of the flow control is greater than the number of the access requests that need to access the service interface. And in the case of not more than the preset waiting time, randomly sending a target number of access requests by setting the waiting time. And controlling the number of the sent access requests according to the number of the access requests which are not actually sent and need to access the service interface and the second flow control residual amount of the service interface so as to avoid flow control errors as much as possible.
Optionally, the operation of setting a waiting duration for an access request that needs to access the service interface may specifically include:
substep S81: randomly selecting a value from a preset time length value range, and setting the selected value as the waiting time length of the access request; and the maximum end value of the time length value range is less than the time length of the concurrent time period.
For example, a value in the range of the duration value can be randomly selected as the waiting duration for any access request needing to access the service interface. In the embodiment of the application, the value is randomly selected as the waiting time of the access request, and the waiting time of the access request is dynamically set, so that the condition that the waiting time of the access request is the same as far as possible is avoided, and the randomness of the waiting time is increased. And the maximum end value of the time length value range is smaller than the time length of the concurrency time period, so that the sending interval between the access requests can be reduced to a certain extent, and the problem that the number of the access requests which can be sent in the concurrency time period is small and the request sending efficiency is reduced because the access requests need to wait to the next concurrency time period due to the set overlong waiting time length is avoided.
It should be noted that the waiting time duration of the access request may also be set to a fixed value, and the access request is sent at a fixed waiting interval during sending. Further, because the requests are concurrent, the times at which the requests are issued within the concurrent time period are often randomly distributed. The mode of setting the fixed waiting interval relatively and the mode of setting the waiting time for the access request randomly are adopted, so that the distribution of the waiting time of the access request can follow the sending rule of concurrent requests as much as possible, the waiting time of the requests can be reduced on the whole, and the request processing efficiency is improved.
The time length value range can be determined in the following way: acquiring a concurrency time period, a lower limit weight value and an upper limit weight value of the service interface; and determining the time length value range according to the lower limit weight value, the upper limit weight value and the concurrency time period. The lower limit weight value and the upper limit weight value may be set according to an actual demand, for example, the lower limit weight value may be 0.1, and the upper limit weight value may be 0.8. The product between the lower limit weight value and the duration of the concurrent time period can be calculated to obtain a minimum end value, and the product between the upper limit weight value and the duration of the concurrent time period can be calculated to obtain a maximum end value. And forming a time length value range based on the minimum end value and the maximum end value. Assuming that N represents the transmission time period, the time length may range from 0.1N to 0.8N. In the embodiment of the application, by obtaining the lower limit weight value and the upper limit weight value, the duration value range is determined based on the lower limit weight value, the upper limit weight value and the concurrency time period. Therefore, the time length value range can be more reasonable to a certain extent, the problem that the selected waiting time length is too short or too long is avoided, and the waiting time length is more reasonable and accurate.
Because the concurrent time period in the flow control strategy of the service interface is usually the division of continuous time, the duration of each concurrent time period is short, and when the flow control threshold of the service interface is not high, if the requests with the same quantity as the flow control threshold are released, the probability of generating flow control errors is high. In the embodiment of the application, a value is randomly selected as the waiting time length based on the time length value range determined by the concurrent time period, so that the interval time length between the sent access requests is controlled, and the occurrence of flow control errors is avoided as much as possible.
Optionally, in this embodiment of the present application, after the access request is sent, the second flow remaining amount may be updated; and under the condition that the second flow control surplus reaches a first preset threshold value and the time is still in the concurrent time period, stopping sending the access request. In the embodiment of the application, by updating the second flow control residual amount, whether the sending needs to be stopped can be judged based on the specific value of the second flow control residual amount, so that the processing efficiency can be improved to a certain extent. Meanwhile, the second flow control surplus is updated in time, so that the subsequent sending request can be prevented from being blocked.
Wherein updating the second remaining amount of traffic may be updating the second remaining amount of traffic according to the number of access requests transmitted after the access requests are transmitted. Specifically, the updated second remaining amount of flow control may be obtained by subtracting the number of access requests sent from the second remaining amount of flow control. Assuming that 1 access request was sent the last time, the second remaining amount of streaming may be decremented by one to effect the update. The first preset threshold may be set according to an actual demand, and the first preset threshold may be a difference between the second flow control surplus and the target quantity. For example, the first preset threshold may be 0, that is, the aforementioned target value may be equal to the second flow control residual amount. If the second remaining amount of traffic reaches a first preset threshold, it may be determined that the number of access requests that have been sent has reached the target number. Of course, the target value may be smaller than the second remaining amount of traffic control, and the first preset threshold may be greater than 0, so that the total number of access requests sent this time may be smaller than the second remaining amount of traffic control.
After each update, it may be detected whether the updated second remaining amount of flow control is equal to a first preset threshold. If the time is still in the concurrency time period and the updated second flow control residual amount is not equal to the first preset threshold, it indicates that the number of the sent access requests does not reach the target number after the first flow control threshold of the concurrency time period is determined. Therefore, after the last access request is sent, one access request from the rest of the access requests can be continuously sent after the waiting time period, until the second flow control residual amount reaches the first preset threshold value in the concurrent time period. Of course, if the concurrency time period ends and the next concurrency time period has been entered, then the remaining unsent access requests may continue to be sent during the next concurrency time period.
Optionally, in this embodiment of the application, after obtaining the second remaining amount of the streaming, the second remaining amount of the streaming may be written into a target cache allocated to the service interface. The operation of updating the second flow control residual quantity may specifically include: updating the second flow control surplus in the target cache; and the effective duration of the target cache is not more than the duration of the concurrent time period. The target cache may be a cache area for storing the flow control residual amount in the client. In one implementation, the first remaining amount of the first flow control may be written into the target buffer and transmitted directly according to the first remaining amount of the first flow control without adjusting the first remaining amount of the first flow control.
When the second remaining amount of the flow control is updated, the second remaining amount of the flow control may be read from the target cache, the updated second remaining amount of the flow control may be rewritten into the target cache, and the target cache may be overwritten with the previous second remaining amount of the flow control.
Further, in the embodiment of the present application, the target cache may be cleared after the effective duration of the target cache passes. Because the effective duration of the target cache is not less than the duration of the concurrency time period, the target cache is emptied after the effective duration of the target cache, so that the problem that the quantity of the transmitted requests cannot be limited based on the second flow control surplus due to the fact that the target cache is emptied and the second flow control surplus is lost under the condition that the concurrency time period is not finished can be solved.
Optionally, in this embodiment of the present application, a keyword for characterizing an interface identity may be generated according to the service interface information accessed in the request. The service interface information may include names, numbers, and the like of the service interfaces, and keywords of different service interfaces may be different. When the keyword is generated, the service interface information may be directly determined as the keyword of the service interface, or the keyword is obtained after the service interface information is further processed, for example, after a preset character is added.
Accordingly, the operation of writing the second remaining amount of flow control into the target cache allocated to the service interface may specifically include:
and a substep S91 of writing the second remaining flow control amount into a target cache corresponding to the key.
The target cache corresponding to the key may be a target cache allocated for the service interface characterized by the key.
In the embodiment of the application, the keyword for representing the interface identity is generated for the service interface, and the second flow control surplus is written into the target cache corresponding to the keyword based on the keyword, so that the subsequent search for the second flow control surplus of the service interface based on the keyword can be facilitated.
Specifically, the key of the service interface may be used as a key name (key), and the second remaining traffic of the service interface may be used as a key value (value), and the key value may be written into the target cache in the form of a key-value pair. In this way, even when a plurality of service interfaces share a target cache, different service interfaces can be easily distinguished based on key names in key value pairs. Of course, independent target caches may also be allocated to different service interfaces, which is not limited in this embodiment of the present application.
In the prior art, the number of sent requests is not limited, and retries are performed only when a flow control error occurs and an access failure occurs. For example, the retry is performed at the maximum retry number and a fixed interval or an interval selected based on an exponential algorithm, or the retry is performed at a retry parameter or strategy set by a user in a customized manner, or the retry is performed based on several fixed retry strategies corresponding to the error code. In the process of continuous retry, the degree of delay will increase, and further the execution duration of the client task will also increase continuously, which affects the task execution efficiency. And the continuous increase of the retry times can cause a large number of invalid requests to be sent to the server, thereby causing impact on the server.
The same set of access requests is used to access the same service interface of the server. Fig. 7 is a flowchart illustrating an embodiment of the present application, and as shown in fig. 7, for a group of access requests, a client may first determine whether there is an unsent access request. If so, determining whether the second flow control residual quantity in the target cache is larger than the quantity of the unsent access requests. If the value is larger than the preset value, the waiting time is set, and the messages are sent one by one according to the waiting time. If not, the direct transmission mode can be adopted.
After sending the access request, the server side returns response information. And if the first flow control residual quantity carried in the response information is sufficient, and the response information is used for representing the success of the response. The second remaining amount of the streaming control can be calculated, and the second remaining amount of the streaming control obtained by the calculation is written into the target cache. Otherwise, it may wait for another retry in the next concurrent time period. Wherein the first remaining amount of flow control being sufficient may mean that the first remaining amount of flow control is greater than 0.
The first remaining flow control amount may be obtained multiple times within one concurrent time period, so that a new second remaining flow control amount may be obtained through multiple calculations and written into the target cache. After being transmitted one by one according to the waiting time period, the updated second remaining amount of the streaming may be the second remaining amount of the latest writing, and the second remaining amount of the streaming may be overwritten by the second remaining amount of the new writing in the subsequent process. Further, the second amount of traffic remaining obtained multiple times within a concurrent time period tends to vary dynamically as a function of the number of access requests that have been responded to by the service interface. Therefore, in the embodiment of the application, the number of the sent access requests can be correspondingly and dynamically adjusted based on the second flow control residual amount, so that the occurrence of flow control errors is avoided to a greater extent, the occurrence frequency of the flow control errors is reduced, the task execution time length is shortened as much as possible while the task execution success is ensured in a high concurrency scene by the client, and the task execution efficiency is improved.
Further, compared with the mode that the retry duration is adjusted to shorten the retry duration as much as possible to retry for multiple times to improve the retry success rate in the prior art, in the embodiment of the present application, because the occurrence frequency of the flow control error is relatively small, the retry can be performed within the next concurrence time period after the flow control error occurs every time, so that the retry success rate is ensured, and the multiple retries are avoided.
It should be noted that, in the embodiment of the present application, a controller for processing access requests for accessing the same service interface may be established, and the controller controls the sending process of the access requests according to the remaining amount of the flow control and the number of the access requests, so as to avoid a large number of flow control errors as far as possible. The residual flow control amount may be a first residual flow control amount or a second residual flow control amount. In the embodiment of the application, the sending can be performed according to a default mode when the sending is performed for the first time, and the concurrence is reduced after a flow control error is triggered once. The concurrent downgrading may refer to acquiring a first remaining amount of flow control of the service interface, and determining the sent access request according to the first remaining amount of flow control.
Referring to fig. 8, there is shown a flow chart of steps of another request processing method of the present application, which may be applied to a client, the method comprising:
step 201, receiving a cloud resource processing task.
The cloud resource processing task may be a resource orchestration task initiated by a user at a client.
Step 202, generating at least one group of access requests according to the cloud resource processing tasks; the same group of access requests are used for accessing the same service interface of the service end, and the service end has at least one service interface.
The request parameters of the access request may include interface information for characterizing a service interface to be accessed, and the access request with consistent interface information may be regarded as a group of access requests.
Step 203, for a group of access requests, under the condition that an unsent access request exists, acquiring a first flow control residual amount of a corresponding service interface in a concurrency time period from a server; the first flow control residual amount is used for representing the request residual amount of the service interface which can successfully respond to the access request in the concurrent time period.
Specifically, for any group of access requests, the first flow control residual amount of the service interface required to be accessed by the group of access requests in the concurrent time period may be obtained. Or, for part of the group access requests, acquiring a first flow control residual quantity of the service interfaces required to be accessed by the group access requests in a concurrent time period.
Step 204, according to the first flow control surplus of the service interface, sending the access request to the service end to access the service interface; wherein the number of the transmitted access requests is not greater than the first amount of the streaming remaining.
Specifically, the implementation manner of each step may refer to the foregoing related description, and is not described herein again.
It should be noted that the data and other information, signals or data used in the embodiments of the present application are performed under the premise of complying with the corresponding data protection regulation policy of the country of the location and obtaining the authorization given by the owner of the corresponding device.
To sum up, the request processing method provided by the embodiment of the application receives a cloud resource processing task. And generating at least one group of access requests according to the cloud resource processing tasks. The same group of access requests are used for accessing the same service interface of the service end, and the service end has at least one service interface. For a group of access requests, under the condition that unsent access requests exist, acquiring a first flow control residual quantity of a corresponding service interface in a concurrent time period from a service end. The first flow control residual amount is used for representing the residual amount of requests of the service interface which can successfully respond to the access request in the concurrent time period. And sending an access request to the service end to access the service interface according to the first flow control residual quantity of the service interface. Wherein the number of the transmitted access requests is not greater than the first amount of the streaming remaining. Therefore, the problems that the number of requests of the service interface needing to be accessed exceeds the flow control threshold value due to excessive sent access requests can be avoided to a certain extent, the service interface cannot be accessed normally, and the access requests cannot be responded successfully, and further the problems that processing resources are wasted and a load is caused to a service end due to the fact that an invalid request is sent for retrying are avoided.
Referring to fig. 9, which shows a block diagram of a request processing device of the present application, the device 30 may include:
a first obtaining module 301, configured to obtain, when there is an access request that is not sent, a first flow control residual amount of a service interface that needs to be accessed by the access request in a concurrent time period; the first flow control residual quantity is used for representing the request residual quantity of the service interface which can successfully respond to the access request in the concurrent time period;
a sending module 302, configured to send, to the service interface, an access request that needs to access the service interface according to the first flow control remaining amount of the service interface; wherein the number of the transmitted access requests is not greater than the first amount of the streaming remaining.
In summary, the request processing apparatus provided in the embodiment of the present application obtains, when there is an unsent access request, a first flow control remaining amount of a service interface that needs to be accessed by the access request in a concurrency time period, where the first flow control remaining amount is used to represent a request remaining amount that the service interface can successfully respond to the access request in the concurrency time period. And sending an access request needing to access the service interface to the service interface according to the first flow control residual quantity of the service interface. Wherein the number of the transmitted access requests is not greater than the first amount of the streaming remaining. Therefore, the problems that the number of requests of the service interface needing to be accessed exceeds the flow control threshold value due to excessive sent access requests can be avoided to a certain extent, the service interface cannot be accessed normally, and the access requests cannot be responded successfully, and further the problems that processing resources are wasted and burden is caused to the service interface due to the fact that invalid requests are sent for retrying are avoided.
Optionally, the sending module 302 is specifically configured to:
adjusting the first flow control residual quantity to obtain a second flow control residual quantity; the second flow control remaining amount is less than the first flow control remaining amount;
and sending an access request needing to access the service interface to the service interface based on the second flow control residual quantity.
Optionally, the sending module 302 is further specifically configured to:
adjusting the first flow control surplus according to a preset first adjusting weight to obtain a second flow control surplus;
or determining a second adjustment weight of the first flow control surplus according to the first flow control surplus of the service interface in the concurrent time period and a flow control threshold of the service interface in the concurrent time period; adjusting the first flow control residual quantity to be low based on the second adjusting weight to obtain a second flow control residual quantity; wherein the second adjustment weight is positively correlated with the first flow control residual amount.
Optionally, the sending module 302 is further specifically configured to:
setting waiting time for an access request needing to access the service interface; wherein, at least part of the access requests have different waiting time lengths;
sending the access request to the service interface according to the waiting duration of the access request; wherein the number of access requests sent is not greater than the second amount of traffic remaining.
Optionally, the sending module 302 is further specifically configured to:
setting waiting time for waiting for the next access request after the last access request is sent for the access request needing to access the same service interface;
after the last access request is sent, selecting another access request to send through the waiting time length until the number of the sent access requests reaches the target number or the concurrency time period is ended; wherein the target number is not greater than the second flow control residual amount.
Optionally, the sending module 302 is further specifically configured to:
randomly selecting a value from a preset time length value range, and setting the selected value as the waiting time length of the access request; and the maximum end value of the time length value range is smaller than the time length of the concurrent time period.
Optionally, the apparatus 30 further comprises:
the second obtaining module is used for obtaining a concurrent time period, a lower limit weight value and an upper limit weight value of the service interface;
and the determining module is used for determining the time length value range according to the lower limit weight value, the upper limit weight value and the concurrency time period.
Optionally, the apparatus 30 further comprises:
an updating module, configured to update the second flow control remaining amount after the access request is sent;
and the stopping module is used for stopping sending the access request under the condition that the second flow control surplus reaches a first preset threshold and the time is still in the concurrent time period.
Optionally, the apparatus 30 further comprises:
the third acquisition module is used for acquiring a target ratio; the target ratio is a ratio between the number of access requests needing to access the service interface and the second flow control residual quantity, or the target ratio is a ratio between the second flow control residual quantity and a flow control threshold value of the service interface;
when the target ratio is greater than or equal to a preset ratio threshold, entering a step of setting a waiting time for an access request needing to access the service interface;
and under the condition that the target ratio is smaller than the preset ratio threshold, directly sending the access request needing to access the service interface to the service interface.
Optionally, the apparatus 30 further comprises:
a write-in module, configured to write the second flow control surplus into a target cache allocated to the service interface;
the update module is specifically configured to:
updating the second flow control surplus in the target cache; the effective duration of the target cache is not less than the duration of the concurrent time period;
the device 30 further comprises: and the emptying module is used for emptying the target cache after the effective duration.
Optionally, the apparatus 30 further comprises:
the generating module is used for generating keywords for representing the interface identity according to the accessed service interface information in the request;
the write module is specifically configured to:
and writing the second flow control residual quantity into a target cache corresponding to the keyword.
Optionally, the first obtaining module 301 is specifically configured to:
receiving response information returned by the service interface for the access request; the response information comprises a first flow control residual amount of the service interface in the concurrent time period;
and extracting the first flow control residual quantity from the response information.
Optionally, the apparatus 30 further comprises:
a fourth obtaining module, configured to, when the first flow control residual amount is not greater than a second preset threshold and/or received response information returned by the service interface is used to characterize that the service interface response fails, obtain the first flow control residual amount again within a next concurrent time period, and send, according to the obtained first flow control residual amount, the access request that needs to access the service interface to the service interface;
and the execution module is used for executing the step of sending an access request needing to access the service interface to the service interface according to the first flow control surplus of the service interface when the first flow control surplus is larger than the second preset threshold.
Optionally, in a case that there are at least two service interfaces, flow control thresholds of at least some of the service interfaces are different.
Referring to fig. 10, which shows a block diagram of another request processing device of the present application, applied to a client, the device 40 may include:
a receiving module 401, configured to receive a cloud resource processing task;
a generating module 402, configured to generate at least one group of access requests according to the cloud resource processing task; the method comprises the following steps that a same group of access requests are used for accessing a same service interface of a service end, and the service end has at least one service interface;
an obtaining module 403, configured to, for a set of access requests, obtain, from a server, a first flow control remaining amount of a corresponding service interface in a concurrency time period when there is an access request that is not sent; the first flow control residual quantity is used for representing the request residual quantity of the service interface which can successfully respond to the access request in the concurrent time period;
a sending module 404, configured to send the access request to the server to access the service interface according to the first flow control remaining amount of the service interface; wherein the number of the transmitted access requests is not greater than the first amount of the streaming remaining.
To sum up, the request processing device provided in the embodiment of the present application receives a cloud resource processing task. And generating at least one group of access requests according to the cloud resource processing tasks. The same group of access requests are used for accessing the same service interface of the service end, and the service end has at least one service interface. For a group of access requests, under the condition that unsent access requests exist, acquiring a first flow control residual quantity of a corresponding service interface in a concurrent time period from a service end. The first flow control residual amount is used for representing the residual amount of requests of the service interface which can successfully respond to the access request in the concurrent time period. And sending an access request to the service end to access the service interface according to the first flow control residual quantity of the service interface. Wherein the number of the transmitted access requests is not greater than the first amount of the streaming remaining. Therefore, the problems that the number of the requests of the service interface needing to be accessed exceeds the flow control threshold value due to excessive access requests sent, the service interface cannot be normally accessed, and the access requests cannot be successfully responded to can be avoided to a certain extent, and the problems that processing resources are wasted and a server side is burdened due to the fact that invalid requests are sent for retry are further avoided.
For the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and reference may be made to the partial description of the method embodiment for relevant points.
Fig. 11 is a schematic structural diagram of an apparatus according to an embodiment of the present disclosure. Referring to fig. 11, a server 800 may be used to implement the request processing method provided in the above-described embodiment. The server 800 may vary widely in configuration or performance and may include one or more processors (CPUs) 822 (e.g., one or more processors) and memory 832, one or more storage media 830 (e.g., one or more mass storage devices) storing applications 842 or data 844. Memory 832 and storage medium 830 may be transient or persistent storage, among other things. The program stored in the storage medium 830 may include one or more modules (not shown), each of which may include a series of instruction operations for the server. Further, the processor 822 may be configured to communicate with the storage medium 830 and execute a series of instruction operations in the storage medium 830 on the server 800.
The server 800 may also include one or more power supplies 826, one or more wired or wireless network interfaces 850, one or more input-output interfaces 858, one or more keyboards 856, and/or one or more operating systems 841, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc. Among other things, processor 822 may execute instructions on server 800 to:
under the condition that an unsent access request exists, acquiring a first flow control residual quantity of a service interface which needs to be accessed by the access request in a concurrent time period; the first flow control residual quantity is used for representing the request residual quantity of the service interface which can successfully respond to the access request in the concurrent time period;
sending an access request needing to access the service interface to the service interface according to the first flow control surplus of the service interface; wherein the number of the transmitted access requests is not greater than the first amount of the flow control residue.
The present application also provides one or more machine-readable media having instructions stored thereon, which when executed by one or more processors, cause an apparatus to perform the above-described methods.
The present application provides an apparatus, one or more machine-readable media having instructions stored thereon, which when executed by the one or more processors, cause the apparatus to perform the above-described method.
The present application also provides one or more machine-readable media having instructions stored thereon, which when executed by one or more processors, cause an apparatus to perform the above-described methods.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one of skill in the art, embodiments of the present application may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present application have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including the preferred embodiment and all changes and modifications that fall within the true scope of the embodiments of the present application.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The method and apparatus provided by the present application are introduced in detail, and specific examples are applied herein to explain the principle and the implementation of the present application, and the descriptions of the above examples are only used to help understand the method and the core idea of the present application; the detailed description and the application scope may vary according to the concept of the present application for a person skilled in the art, and in view of the above, the content of the present specification should not be construed as limiting the present application.

Claims (14)

1. A method for processing a request, the method comprising:
under the condition that an unsent access request exists, acquiring a first flow control residual quantity of a service interface which needs to be accessed by the access request in a concurrent time period; the first flow control residual quantity is used for representing the request residual quantity of the service interface which can successfully respond to the access request in the concurrent time period;
sending an access request needing to access the service interface to the service interface according to the first flow control surplus of the service interface; wherein the number of the transmitted access requests is not greater than the first amount of the flow control residue.
2. The method according to claim 1, wherein the sending an access request requiring access to the service interface according to the first flow control remaining amount of the service interface comprises:
adjusting the first flow control residual quantity to obtain a second flow control residual quantity; the second flow control remaining amount is less than the first flow control remaining amount;
and sending an access request needing to access the service interface to the service interface based on the second flow control residual quantity.
3. The method of claim 2, wherein the adjusting the first remaining amount of flow control to obtain a second remaining amount of flow control comprises:
adjusting the first flow control surplus according to a preset first adjusting weight to obtain a second flow control surplus;
or determining a second adjustment weight of the first flow control surplus according to the first flow control surplus of the service interface in the concurrent time period and a flow control threshold of the service interface in the concurrent time period; reducing the first flow control residual quantity based on the second adjusting weight to obtain a second flow control residual quantity; wherein the second adjustment weight is positively correlated with the first flow control residual amount.
4. The method according to claim 2 or 3, wherein the sending an access request requiring access to the service interface based on the second flow control residual amount comprises:
setting waiting time for an access request needing to access the service interface; wherein, at least part of the access requests have different waiting time lengths;
sending the access request to the service interface according to the waiting duration of the access request; wherein the number of access requests sent is not greater than the second amount of traffic remaining.
5. The method of claim 4, wherein setting a wait duration for an access request requiring access to the service interface comprises:
setting waiting time for waiting for the next access request after the last access request is sent for the access request needing to access the same service interface;
the sending the access request to the service interface according to the waiting duration of the access request includes:
after the last access request is sent, selecting one access request again for sending through the waiting time length until the number of the sent access requests reaches the target number or the concurrency time period is ended; wherein the target number is not greater than the second flow control residual amount.
6. The method of claim 4, wherein setting a wait duration for an access request requiring access to the service interface comprises:
randomly selecting a value from a preset time length value range, and setting the selected value as the waiting time length of the access request; and the maximum end value of the time length value range is less than the time length of the concurrent time period.
7. The method of claim 6, further comprising:
acquiring a concurrency time period, a lower limit weight value and an upper limit weight value of the service interface;
and determining the time length value range according to the lower limit weight value, the upper limit weight value and the concurrency time period.
8. The method of claim 5, further comprising:
updating the second amount of streaming remaining after the access request is sent;
and under the condition that the second flow control residual quantity reaches a first preset threshold value and the time is still in the concurrent time period, stopping sending the access request.
9. The method of claim 4, further comprising:
acquiring a target ratio; the target ratio is a ratio between the number of access requests needing to access the service interface and the second flow control residual quantity, or the target ratio is a ratio between the second flow control residual quantity and a flow control threshold value of the service interface;
under the condition that the target ratio is greater than or equal to a preset ratio threshold, setting a waiting time for an access request needing to access the service interface;
and under the condition that the target ratio is smaller than the preset ratio threshold, directly sending the access request needing to access the service interface to the service interface.
10. A request processing method is applied to a client, and is characterized in that the method comprises the following steps:
receiving a cloud resource processing task;
generating at least one group of access requests according to the cloud resource processing task; the method comprises the following steps that a same group of access requests are used for accessing a same service interface of a server, and the server has at least one service interface;
for a group of access requests, under the condition that unsent access requests exist, acquiring a first flow control residual quantity of a corresponding service interface in a concurrent time period from a server; the first flow control residual quantity is used for representing the request residual quantity of the service interface which can successfully respond to the access request in the concurrent time period;
according to the first flow control surplus of the service interface, sending the access request to the service end to access the service interface; wherein the number of the transmitted access requests is not greater than the first amount of the streaming remaining.
11. A request processing apparatus, characterized in that the apparatus comprises:
the first acquisition module is used for acquiring a first flow control residual quantity of a service interface which needs to be accessed by an access request in a concurrent time period under the condition that the unsent access request exists; the first flow control residual quantity is used for representing the request residual quantity of the service interface which can successfully respond to the access request in the concurrent time period;
the sending module is used for sending an access request needing to access the service interface to the service interface according to the first flow control surplus of the service interface; wherein the number of the transmitted access requests is not greater than the first amount of the streaming remaining.
12. A request processing apparatus applied to a client, the apparatus comprising:
the receiving module is used for receiving the cloud resource processing task;
the generating module is used for generating at least one group of access requests according to the cloud resource processing tasks; the method comprises the following steps that a same group of access requests are used for accessing a same service interface of a server, and the server has at least one service interface;
the acquisition module is used for acquiring a first flow control residual quantity of a corresponding service interface in a concurrent time period from a server under the condition that an unsent access request exists for a group of access requests; the first flow control residual quantity is used for representing the request residual quantity of the service interface which can successfully respond to the access request in the concurrent time period;
the sending module is used for sending the access request to the server side according to the first flow control surplus of the service interface so as to access the service interface; wherein the number of the transmitted access requests is not greater than the first amount of the streaming remaining.
13. An apparatus, comprising:
one or more processors; and
one or more machine-readable media having instructions stored thereon that, when executed by the one or more processors, cause the apparatus to perform the methods of claims 1-10.
14. One or more machine-readable media having instructions stored thereon which, when executed by one or more processors, perform the method of claims 1-10.
CN202210493178.9A 2022-05-07 2022-05-07 Request processing method and device and readable medium Pending CN115002225A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210493178.9A CN115002225A (en) 2022-05-07 2022-05-07 Request processing method and device and readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210493178.9A CN115002225A (en) 2022-05-07 2022-05-07 Request processing method and device and readable medium

Publications (1)

Publication Number Publication Date
CN115002225A true CN115002225A (en) 2022-09-02

Family

ID=83025397

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210493178.9A Pending CN115002225A (en) 2022-05-07 2022-05-07 Request processing method and device and readable medium

Country Status (1)

Country Link
CN (1) CN115002225A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104408088A (en) * 2014-11-11 2015-03-11 北京奇虎科技有限公司 Control method and device for concurrent requests
CN108683604A (en) * 2018-04-03 2018-10-19 平安科技(深圳)有限公司 concurrent access control method, terminal device and medium
CN108874948A (en) * 2018-06-05 2018-11-23 中国农业银行股份有限公司 A kind of site resource access method and device
CN109962855A (en) * 2017-12-14 2019-07-02 深圳市融汇通金科技有限公司 A kind of current-limiting method of WEB server, current-limiting apparatus and terminal device
CN110120973A (en) * 2019-04-28 2019-08-13 华为技术有限公司 A kind of request control method, relevant device and computer storage medium
WO2020083189A1 (en) * 2018-10-24 2020-04-30 北京金山云网络技术有限公司 Request processing method and device, api gateway, and readable storage medium
CN111858046A (en) * 2020-07-13 2020-10-30 海尔优家智能科技(北京)有限公司 Service request processing method and device, storage medium and electronic device
CN114238037A (en) * 2022-02-28 2022-03-25 北京金堤科技有限公司 High-concurrency service request result storage method and device, electronic equipment and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104408088A (en) * 2014-11-11 2015-03-11 北京奇虎科技有限公司 Control method and device for concurrent requests
CN109962855A (en) * 2017-12-14 2019-07-02 深圳市融汇通金科技有限公司 A kind of current-limiting method of WEB server, current-limiting apparatus and terminal device
CN108683604A (en) * 2018-04-03 2018-10-19 平安科技(深圳)有限公司 concurrent access control method, terminal device and medium
CN108874948A (en) * 2018-06-05 2018-11-23 中国农业银行股份有限公司 A kind of site resource access method and device
WO2020083189A1 (en) * 2018-10-24 2020-04-30 北京金山云网络技术有限公司 Request processing method and device, api gateway, and readable storage medium
CN110120973A (en) * 2019-04-28 2019-08-13 华为技术有限公司 A kind of request control method, relevant device and computer storage medium
CN111858046A (en) * 2020-07-13 2020-10-30 海尔优家智能科技(北京)有限公司 Service request processing method and device, storage medium and electronic device
CN114238037A (en) * 2022-02-28 2022-03-25 北京金堤科技有限公司 High-concurrency service request result storage method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US9984013B2 (en) Method, controller, and system for service flow control in object-based storage system
CN110489447B (en) Data query method and device, computer equipment and storage medium
US8386512B2 (en) System for managing data collection processes
JP4028674B2 (en) Method and apparatus for controlling the number of servers in a multi-system cluster
CN112269641B (en) Scheduling method, scheduling device, electronic equipment and storage medium
CN107451853B (en) Method, device and system for real-time red packet distribution and storage medium
US10884667B2 (en) Storage controller and IO request processing method
US11102289B2 (en) Method for managing resource state information and system for downloading resource
CN112068934B (en) Control system and method for shrinking container cloud service instance
CN112165436A (en) Flow control method, device and system
CN104618493A (en) Data request processing method and device
CN116150160A (en) Adjustment method and device for database cluster processing nodes and storage medium
CN106973091B (en) Distributed memory data redistribution method and system, and master control server
US9135064B2 (en) Fine grained adaptive throttling of background processes
CN111078386A (en) Control method and control device of distributed scheduling system
CN115002225A (en) Request processing method and device and readable medium
CN109582460B (en) Redis memory data elimination method and device
CN111176848B (en) Cluster task processing method, device, equipment and storage medium
CN117519953B (en) Separated memory management method for server-oriented non-perception calculation
CN112463754B (en) Data node switching method and device in HDFS (Hadoop distributed File System) and computer equipment
CN112559142B (en) Container control method, device, edge computing system, medium and equipment
CN112783627A (en) Batch processing method and device
CN117724849A (en) Connection pool management method, device, electronic equipment and computer readable storage medium
CN116561143A (en) Database pre-writing log method and device based on multiple queues
CN114390058A (en) Service management system, method, device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination