CN109087055B - Service request control method and device - Google Patents

Service request control method and device Download PDF

Info

Publication number
CN109087055B
CN109087055B CN201810575104.3A CN201810575104A CN109087055B CN 109087055 B CN109087055 B CN 109087055B CN 201810575104 A CN201810575104 A CN 201810575104A CN 109087055 B CN109087055 B CN 109087055B
Authority
CN
China
Prior art keywords
service
service interface
qps
preset
target
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.)
Active
Application number
CN201810575104.3A
Other languages
Chinese (zh)
Other versions
CN109087055A (en
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.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology 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 Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN201810575104.3A priority Critical patent/CN109087055B/en
Publication of CN109087055A publication Critical patent/CN109087055A/en
Application granted granted Critical
Publication of CN109087055B publication Critical patent/CN109087055B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/10Office automation; Time management
    • G06Q10/103Workflow collaboration or project management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0633Lists, e.g. purchase orders, compilation or processing
    • G06Q30/0635Processing of requisition or of purchase orders

Abstract

The invention provides a method and a device for controlling a service request, wherein the method comprises the following steps: when a service interface receives a service request, the Redis server performs quantity self-increment on a QPS index corresponding to the service interface; judging whether the QPS indexes corresponding to the service interfaces with the self-increased number exceed a preset QPS threshold of the service interfaces or not; when the QPS index corresponding to the service interface after the self-increment exceeds the preset QPS threshold value of the service interface, the Redis server returns first preset error information to the service server corresponding to the service interface, wherein the first preset error information is used for indicating that the subsequent service logic is forbidden to be executed for the service request currently received by the service interface. The invention realizes the control of distributed flow and the timely response to the highly concurrent service request, and ensures the atomization of the accessed service resources.

Description

Service request control method and device
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for controlling a service request.
Background
The traffic limitation is frequently used in background service design, and the purpose is to reduce the influence of upper layer service requests on lower layer core services and prevent the core services from being unavailable. Specifically, when there is a huge amount of access to the same service resource suddenly, the system is prone to down and crash, so that any service access request cannot be processed.
In addition, in a highly concurrent scenario, when a large number of services request access to the same limited service resource, there is also a problem of request superissue. For example, during the twenty-one period, the amount of orders from the customer is large, and the inventory of a certain product is limited, so when the product is robbed, the system can receive a large number of order requests for the product at the same time, which often results in the actual inventory being insufficient or zero, but the system still responds to multiple orders received at the same time to complete multiple orders, and the atomicity of the accessed resource cannot be guaranteed.
Therefore, the processing scheme of the service request in the prior art obviously has the problems that the service request with high concurrency cannot be handled, and the atomization of the accessed service resource cannot be ensured.
Disclosure of Invention
The invention provides a method and a device for controlling a service request, which are used for solving the problems that a service request processing scheme in the prior art cannot deal with highly concurrent service requests and cannot ensure the atomization of accessed service resources.
In order to solve the above problem, according to an aspect of the present invention, the present invention discloses a method for controlling a service request, including:
when a service interface receives a service request, the Redis server performs quantity self-increment on a QPS index corresponding to the service interface;
judging whether the QPS indexes corresponding to the service interfaces with the self-increased number exceed a preset QPS threshold of the service interfaces or not;
when the QPS index corresponding to the service interface after the self-increment exceeds the preset QPS threshold value of the service interface, the Redis server returns first preset error information to the service server corresponding to the service interface, wherein the first preset error information is used for indicating that the subsequent service logic is forbidden to be executed for the service request currently received by the service interface.
In a possible implementation manner, the Redis server stores a QPS value of each service interface by using a key-value, wherein the Redis server allocates a key to each service interface in advance, and a value corresponding to each key is used for storing a QPS value of a corresponding service interface, wherein a data type of the value is a hash table, and the hash table is a mapping table of a field and a field value;
when the service interface receives a service request, the Redis server performs quantity self-increment on the QPS index corresponding to the service interface, including:
when a service interface receives a service request, a Redis server determines a target key corresponding to the service interface and a receiving time point of the service request, wherein the minimum time unit of the receiving time point is second;
the Redis server calculates a target field of the target key according to the receiving time point;
the Redis server adds one to a target field value corresponding to the target field in the hash table of the target key;
when the QPS index corresponding to the service interface after the number increase exceeds the preset QPS threshold of the service interface, the Redis server returns first preset error information to the service server corresponding to the service interface, including:
and when the target field value exceeds a preset QPS threshold of a service interface corresponding to the target key, the Redis server returns first preset error information to the service server corresponding to the service interface.
In a possible implementation manner, the Redis server adding one to a target field value corresponding to the target field in the hash table of the target key, including:
when a target field does not exist in a hash table corresponding to a target key of the Redis server, adding the target field to the hash table of the target key by the Redis server, and adding one to a target field value corresponding to the target field from zero;
and when a target field exists in the hash table corresponding to the target key of the Redis server, the Redis server adds one to the target field value corresponding to the target field in the hash table of the target key from the existing numerical value.
In a possible implementation manner, after the Redis server returns first preset error information to the service server corresponding to the service interface when the target field value exceeds a preset QPS threshold of the service interface corresponding to the target key, the method further includes:
and when the service interface receives a service request again and the field corresponding to the receiving time point of the service request received again is the same as the target field, the Redis server returns second preset error information to the service server corresponding to the service interface, wherein the second preset error information is used for indicating that the service request currently received by the service interface is rejected.
In a possible implementation manner, after the Redis server returns first preset error information to the service server corresponding to the service interface when the target field value exceeds a preset QPS threshold of the service interface corresponding to the target key, the method further includes:
the Redis server clears data in a target hash table according to a preset time period, wherein the target hash table is a hash table of which the receiving time point corresponding to the field is located before the current time point.
In a possible implementation manner, when a service interface receives a service request, the Redis server performs number self-increment on a QPS index corresponding to the service interface, including:
and when the service interface receives a service request, the Redis server adopts the Lua script to perform quantity self-increment on the QPS index corresponding to the service interface.
In one possible embodiment, the method further comprises:
the Redis server receives an updated preset QPS threshold value aiming at each service interface from the Zookeeper in real time from the service server;
and the Redis server updates the preset QPS threshold of the corresponding service interface by adopting the updated preset QPS threshold.
According to another aspect of the present invention, the present invention further discloses a control device for service request, which is applied to a Redis server, and the control device includes:
the self-increment module is used for carrying out quantity self-increment on a QPS index corresponding to a service interface when the service interface receives a service request;
the judging module is used for judging whether the QPS indexes corresponding to the service interfaces with the self-increased number exceed a preset QPS threshold of the service interfaces or not;
and the first returning module is used for returning first preset error information to the service server corresponding to the service interface when the QPS index corresponding to the service interface after the self-increment exceeds a preset QPS threshold of the service interface, wherein the first preset error information is used for indicating that the subsequent service logic is forbidden to be executed for the service request currently received by the service interface.
In a possible implementation manner, the Redis server stores a QPS value of each service interface by using a key-value, wherein the Redis server allocates a key to each service interface in advance, and a value corresponding to each key is used for storing a QPS value of a corresponding service interface, wherein a data type of the value is a hash table, and the hash table is a mapping table of a field and a field value;
the auto-increment module comprises:
the determining submodule is used for determining a target key corresponding to a service interface and a receiving time point of the service request when the service interface receives the service request, wherein the minimum time unit of the receiving time point is second;
the calculation submodule is used for calculating a target field of the target key according to the receiving time point;
the self-increment module is used for adding one to a target field value corresponding to the target field in the hash table of the target key;
the first returning module is further configured to return a first preset error message to a service server corresponding to the service interface when the target field value exceeds a preset QPS threshold of the service interface corresponding to the target key.
In one possible embodiment, the self-increment module includes:
a first adding unit, configured to add a target field to a hash table of a target key of the Redis server when the target field does not exist in the hash table corresponding to the target key, and add one to a value of the target field corresponding to the target field from zero;
and a second adding unit, configured to add one to a target field value corresponding to the target field in the hash table of the target key from an existing numerical value when the target field exists in the hash table corresponding to the target key of the Redis server.
In a possible embodiment, the apparatus further comprises:
and the second returning module is used for returning second preset error information to the service server corresponding to the service interface when the service interface receives a service request again and the field corresponding to the receiving time point of the service request received again is the same as the target field, wherein the second preset error information is used for indicating that the response to the service request currently received by the service interface is rejected.
In a possible embodiment, the apparatus further comprises:
and the clearing module is used for clearing data in the target hash table according to a preset time period, wherein the target hash table is a hash table of which the receiving time point corresponding to the field is positioned before the current time point.
In a possible implementation manner, the adding module is further configured to add the number of the QPS indexes corresponding to the service interfaces by using a Lua script when the service interfaces receive a service request.
In a possible embodiment, the apparatus further comprises:
the receiving module is used for receiving the updated preset QPS threshold aiming at each service interface from the Zookeeper in real time from the service server;
and the updating module is used for updating the preset QPS threshold of the corresponding service interface by adopting the updated preset QPS threshold.
According to still another aspect of the present invention, the present invention also discloses a Redis server, comprising: the system comprises a memory, a processor and a control program of service request stored on the memory and capable of running on the processor, wherein the control program of service request realizes the steps of the control method of service request in any one of the above embodiments when executed by the processor.
According to another aspect of the present invention, the present invention also discloses a computer-readable storage medium, on which a control program of a service request is stored, and when the control program of the service request is executed by a processor, the steps in the control method of the service request in any one of the above-mentioned embodiments are implemented.
Compared with the prior art, the invention has the following advantages:
the embodiment of the invention utilizes the characteristics of a single thread model of the Redis server to enable the Redis server to monitor the service interface, and under the condition that the service interface receives a service request, the Redis server can perform quantity self-increment on a QPS index of the service interface and preset a QPS threshold value of each service interface; if the QPS index of a certain service interface after the self-increment exceeds the QPS threshold corresponding to the service interface, returning error information to the service server corresponding to the service interface, realizing the control of distributed flow, timely responding to high-concurrency service requests and ensuring the atomization of accessed service resources.
Drawings
FIG. 1 is a block diagram of an embodiment of a service request control system according to the present invention;
FIG. 2 is a flowchart illustrating steps of an embodiment of a method for controlling a service request according to the present invention;
fig. 3 is a block diagram of a control device for service request according to an embodiment of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
Referring to fig. 1, a block diagram of a structure of an embodiment of a service request control system according to the present invention is shown, which may specifically include:
a client, a service interface (here, service interface1, service interface2 …, service interface N), a service server cluster, a Redis server cluster, and a Zookeeper cluster.
The service server cluster comprises a plurality of service servers, the Redis server cluster comprises a plurality of Redis servers, and the Zookeeper cluster comprises a plurality of Zookeeper.
Since the functions of the servers in the server cluster are the same, the control system according to the embodiment of the present invention will be described by taking a single server as an example.
The service server can process a plurality of services, each service can correspond to M service interfaces (M is greater than or equal to 1 and less than N), the client communicates with the service server through the service interfaces, and the client sends a service request to the service server through the service interfaces so as to acquire resources;
however, since any resource for access is limited, in order to handle a highly concurrent service request and ensure atomization of the accessed service resource, the service request control system according to the embodiment of the present invention further includes a Redis server and a Zookeeper.
The Redis server has the single-thread atomic characteristic, so that the counting accuracy of the service requests received by each service interface under the high concurrency scene of a distributed environment can be ensured;
redis is an open source, BSD (Berkeley Software distribution) enabled, advanced "Key-Value (Value)" caching and storage. It is often referred to as a data structure server that supports relatively more Value types stored, including string, list, set, zset, and hash. Since Redis is an open-source Key-Value cache and storage, deployment is extremely simple, and then the service request control of the embodiment of the invention can be realized through Lua scripts. The Lua script is a lightweight and small scripting language, is written in a standard C language and is opened in a source code form, and is designed to be embedded in an application program, so that flexible extension and customized functions are provided for the application program. The embodiment of the invention can compile the control method for the Lua according to the actual control requirement of the service request and embed the compiled Lua into the Redis server.
In order to ensure atomization of the accessed service resource, the embodiment of the present invention may manually configure a QPS (Query Per Second) value for each service interface, where QPS is a measure of how much traffic is processed by a Query server in a specified time. And storing the manually configured QPS value of each service interface in the Zookeeper.
The Zookeeper is a distributed and open-source distributed application program coordination service, is an open-source implementation of Chubby of Google, and is an important component of Hadoop and Hbase. It is a software that provides a consistent service for distributed applications, and the functions provided include: configuration maintenance, domain name service, distributed synchronization, group service, etc. The ZooKeeper is configured with a good availability and a notification mechanism for concurrent update, and listens to a change of a value (that is, a QPS threshold) of a QPS configured for each service interface through a listener, wherein, since the QPS can be artificially and dynamically modified, once the ZooKeeper listens to a change of a configuration value of a certain QPS through the listener, the ZooKeeper timely notifies a Redis server of a latest QPS configuration value of each service interface through the service server, thereby realizing automatic reminding of the latest QPS configuration value. Then, the Redis server can utilize the latest QPS threshold value of each service interface from the Zookeeper, which is forwarded by the service server, to control the service request of each service interface, so that the high-concurrency service request of each service interface can be well responded, and the atomization of the accessed service resource is ensured.
In a possible implementation manner, the Zookeeper may also be replaced by a database, that is, in the embodiment of the present invention, the latest QPS values of the manually configured service interfaces may be stored in the database, so that when specifically performing control of a service request, the Redis server is required to query the latest QPS values in the database through the service server every time the configuration values of the QPS are changed, and only by using the manner of storing the configured QPS values by using the database, the updated latest QPS values cannot be automatically reminded to the Redis server, and the Redis server is required to actively obtain the latest QPS values.
With reference to the control system shown in fig. 1 and referring to fig. 2, a flowchart of steps of an embodiment of a method for controlling a service request according to the present invention is shown, and specifically, the method may include the following steps:
step 101, when a service interface receives a service request, a Redis server performs quantity self-increment on a QPS index corresponding to the service interface;
the service interface may be any one of the service interfaces in the control system shown in fig. 1.
When the Redis server detects that a certain service interface receives a service request, the Redis server performs quantity self-increment on the QPS index of the service interface.
In a possible implementation manner, when step 101 is executed and a service interface receives a service request, the Redis server may perform a quantitative increase on the QPS index corresponding to the service interface by using a Lua script.
That is to say, as described in the embodiment shown in fig. 1, the Redis server may use the Lua script to write the control method according to the embodiment of the present invention, and therefore, the Redis server may perform the number increasing operation of the QPS index through the Lua script.
The method comprises the steps that a Lua script is used for controlling the flow of a distributed flow, and the Redis server is used for controlling the flow of the distributed flow.
In a possible implementation manner, as described in the embodiment shown in fig. 1, the Redis server may store a QPS Value of each traffic interface by using a Key-Value (Value); the Redis server may assign a Key to each service interface in advance. For example, interface1key is allocated to service interface1, and interface2key is allocated to service interface 2; the Value corresponding to each Key is used for storing a QPS Value of the corresponding service interface, that is, the Value corresponding to the interface1Key is used for storing a QPS Value of the service interface 1; value corresponding to interface2key is used to store QPS Value of service interface 2.
While there are many data types supported by Value, specifically referring to the above embodiment, in this embodiment, the data type of Value is a hash table, and the hash table is a mapping table of field (field) and Value (field Value); that is, the QPS value of each traffic interface is stored in the hash table of the corresponding Key. For example, the QPS value of service interface1 is stored in the hash1 table corresponding to interface1key, and for example, the QPS value of service interface2 is stored in the hash2 table corresponding to interface2 key.
It should be noted that Value here indicates a Value corresponding to a key of a storage structure of Redis, and Value indicates a field Value of a corresponding field in the hash table.
Then, when step 101 is executed, it can be implemented as follows:
when a service interface receives a service request, a Redis server determines a target Key corresponding to the service interface and a receiving time point of the service request;
for example, if the service interface1 receives a service request, the Redis server may determine a target Key (target Key) previously allocated to the service interface1, that is, an interface1 Key; furthermore, the Redis server may also determine a receiving time point of the service request, for example, 12 points, 30 minutes and 30 seconds, wherein the minimum time unit of the receiving time point is seconds since the QPS index describes the query rate per second.
The Redis server calculates a target field (target field) of the target Key according to the receiving time point;
the storage structure of data in the Redis server is Key-Value (where Value is in a hash form), one service interface corresponds to one hash table, and the hash table stores the total number of service requests received by the service interface at each time point (time unit is second) at which the service request is received.
In order to distinguish the total number of service requests received at different time points (time unit is second), the Redis server may calculate the field of each receiving time point according to HHMMSS (i.e. hour-minute-second), for example, the receiving time point of service interface1 receiving the service request is 12 points, 30 minutes and 30 seconds, and 123030 may be used as the field corresponding to interface1 key.
The Redis server adds one to a target value (target field value) corresponding to the target field in a hash table of the target Key;
wherein, the value corresponding to the field value 123030 stores the number of service requests received by the service interface1 in the second of 12 o' clock, 30 minutes and 30 seconds.
Therefore, when it is detected that the service interface1 receives a service interface, it may operate the record with field of 123030 in the hash table of interface1key, specifically, add 1 to the value corresponding to 123030.
The instruction embodied in this step may be a hint interface1key 1230301, where the hint command is used to add a specified increment value (here, 1) to the field value (here, value corresponding to 123030) in the hash table.
Table 1 illustrates a data storage structure of Key-Value (where Value is a hash table in the form of field-Value) according to an embodiment of the present invention, and here shows statistics of service requests received by each second of service interface1 and service interface2 from 12 o 'clock 30 min 30 sec to 12 o' clock 30 min 32 sec.
Figure BDA0001687338550000101
TABLE 1
In a possible implementation manner, when the Redis server adds one time to a target value corresponding to the target field in the hash table of the target Key, the execution may be performed in two cases:
if the target field does not exist in the hash table corresponding to the target Key of the Redis server, adding the target field to the hash table of the target Key by the Redis server, and adding one to the target value corresponding to the target field from zero;
taking the service interface1 as an example, for example, if the system time of the Redis server is just finished from a second of 12 o 30 s, and enters a next second of 12 o 30 s 31 s, then the hash table of the interface1key in the Redis server obviously does not have a field with a value of 123031, so a record needs to be added to the hash table corresponding to the interface1key, where the field is 123031, and the value corresponding to 123031 is zero, and when the command hint interface1key 1230311 is executed, the value corresponding to 123031 of the interface1key is added from zero to one.
That is, when the system time of the Redis server exceeds 12 o ' clock, 30 min and 30 sec, and enters 12 o ' clock, 30 min and 31 sec, the value corresponding to 12 o ' clock, 30 min and 31 sec is automatically increased from zero and is increased by one each time.
And if the target field exists in the hash table corresponding to the target Key of the Redis server, the Redis server adds one to the target value corresponding to the target field in the hash table of the target Key from the existing numerical value.
Continuing to explain by taking the service interface1 as an example, for example, if the system time of the Redis server is still within a second of 12 o' clock 30 min 30 sec, and the 1 sec has not yet ended, it can be known by querying the stored data in the Redis server that a field corresponding to interface1key exists, that is, 123030, then a value corresponding to 123030 can be further incremented, that is, 1000 is incremented by 1, so that the value corresponding to 123030 becomes 1001.
Thus, in the embodiment of the present invention, a Key-Value storage structure is set in the Redis server, the data type of the Value is a hash table, a Key and a corresponding hash table are allocated to each service interface, and a plurality of records in the hash table respectively store statistics of service requests received by the service interface every second, so that the number of the service requests received by each service interface every second is counted in this way, and the quantity of the concurrent requests can be accurately counted, thereby facilitating subsequent concurrent request control and ensuring atomicity of accessed resources.
Step 102, judging whether the QPS indexes corresponding to the service interfaces with self-increased number exceed a preset QPS threshold of the service interfaces;
as described in the embodiment of fig. 1, the method according to the embodiment of the present invention may allocate and configure a QPS threshold to each service interface, that is, the maximum number of service requests that each service interface can respond to in one second, and after each service interface receives one service request in each second, the method according to the embodiment of the present invention may perform number auto-increment on a QPS index of the corresponding service interface, and compare the auto-incremented QPS index of the service interface in this second with the QPS threshold of the service interface, to determine whether the auto-incremented QPS index exceeds the QPS threshold of the service interface.
Step 103, when the QPS index corresponding to the service interface after the number increase exceeds the preset QPS threshold of the service interface, the Redis server returns first preset error information to the service server corresponding to the service interface, where the first preset error information is used to indicate that execution of subsequent service logic is prohibited for the service request currently received by the service interface.
Then if the self-increased QPS index (i.e. the statistic of the service request) of the service interface exceeds the QPS threshold configured for the service interface, it means that the total amount of the service requests received by the service interface in the second exceeds the maximum number that can be responded by the service interface. Therefore, after receiving the first preset error information from the Redis server, the service server may prohibit the service request currently received by the service interface from executing subsequent service logic, for example, prohibit ordering processing.
The Redis server may return a first preset error message (e.g., -1) to the service server corresponding to the service interface, so that the service server prohibits execution of subsequent service logic for the currently received service request, for example, the service interface is an ordering interface, and the service server may prohibit execution of the ordering logic for the ordering request of the service interface, thereby avoiding a problem that the order quantity exceeds the commodity stock quantity.
In a first embodiment, when step 103 is executed, if the target value exceeds a preset QPS threshold of a service interface corresponding to the target Key, the Redis server returns a first preset error message to the service server corresponding to the service interface.
For example, if a QPS threshold preconfigured for the service interface1 is 1000, in a first embodiment, after an operation is performed on a value corresponding to 123030 in a hash table of the interface1key, the value is changed from 1000 to 1001, and then the value 1001 of the target value already exceeds the preset QPS threshold 1000 of the service interface1, and then the Redis server returns a first preset error message to the service server corresponding to the service interface.
In a possible implementation manner, after the Redis server returns first preset error information to the service server corresponding to the service interface if the target value exceeds a preset QPS threshold of the service interface corresponding to the target Key, the method according to the embodiment of the present invention may further include:
and if the service interface receives a service request again and the field corresponding to the receiving time point of the service request received again is the same as the target field, the Redis server returns second preset error information to the service server corresponding to the service interface.
The second preset error information is used for indicating a reject response to the service request currently received by the service interface, so that the service server can reject a response to the service request received by the service interface again within the second after receiving the second preset error information from the Redis server.
Continuing with the description of the embodiment, after the self-increment operation, the value corresponding to the field value 123030 in the hash table of the service interface1 is changed from 1000 to 1001, that is, the service request amount of the service interface1 in the second 123030 has exceeded the upper limit, but the second 12 o 'clock 30 s and 30 s has not ended yet, that is, the current time is still in the second 12 o' clock 30 s and 30 s, the next second is not entered, and the service interface1 receives a service request again, for the service interface that has exceeded the limit in the second, the Redis server returns second preset error information (for example, the error code 400) to the service server corresponding to the service interface1, so that the service server rejects a response to the service request currently received by the service interface.
The determination method of the field of the service request received again is similar to the determination method of the target field in the above embodiment, and is also calculated according to the receiving time point of the service request, which is specifically referred to above and is not described herein again.
Thus, for the case that the service request volume within a certain second exceeds the QPS threshold of the service interface within the second, if the service interface continues to receive the service request within the second, the method of the embodiment of the invention can directly cause the service server to refuse the execution of the service request, i.e., respond, to avoid continuing to respond to the traffic that is continuously received by the service interface whose traffic has exceeded the limit, and well respond to the highly concurrent service request, and ensure the atomization of the accessed service resource corresponding to the service interface, thereby avoiding system disorder and downtime.
In a possible implementation manner, after the Redis server returns first preset error information to the service server corresponding to the service interface if the target value exceeds a preset QPS threshold of the service interface corresponding to the target Key, the method according to the embodiment of the present invention may further include:
the Redis server clears the data in the target hash table according to a preset time period, wherein the target hash table is a hash table of which the receiving time point corresponding to the field is located before the current time point.
With continued reference to table 1, the Redis server side according to the embodiment of the present invention may preset a time period for clearing the memory data, for example, the time period T is 2 seconds, then the Redis may clear the expired field and the data in the corresponding field value every two seconds, for example, the current time point is 12 o 'clock 30 minutes 32 seconds, the last time memory is 12 o' clock 30 minutes 30 seconds, and then the data stored in the memory in the Redis server is as shown in table 1, and the service request statistics of the service interface1 and the service interface2 at two seconds, that is, 12 o 'clock 30 seconds and 12 o' clock 30 minutes 31 seconds, are respectively stored.
Obviously, 12 o ' clock 30 min 30 sec and 12 o ' clock 30 min 31 sec have expired relative to the current time 12 o ' clock 30 min 32 sec, so that the field value 123030 and the corresponding value 1000 in the hash table for interface1key in table 1, and the field value 123031 and the corresponding value 1 in the hash table for interface1key can be both cleared here; the value 123030 of field and the corresponding value 2500 in the hash table for interface2key are both cleared, and the value 123031 of field and the corresponding value 3000 in the hash table for interface2key are both cleared.
Therefore, by regularly clearing the expired field value and the corresponding service request statistic value, the memory of the Redis server can be ensured not to be expanded, the system pressure of the Redis server and the counting pressure of the Lua script are reduced, and the efficiency of flow limitation in a distributed environment is improved.
In one possible implementation, the method according to the embodiment of the present invention may further include:
the Redis server receives an updated preset QPS threshold value aiming at each service interface from the Zookeeper in real time from the service server;
and the Redis server updates the preset QPS threshold of the corresponding service interface by adopting the updated preset QPS threshold.
That is to say, in the above embodiment, when the Redis server determines whether the total receiving amount of the service requests of each service interface in a certain second exceeds the limit value, the limit value is sent to the Redis server by the Zookeeper through the service server, and specifically refer to the description about the Zookeeper in the embodiment shown in fig. 1.
Because the QPS threshold configured for each service interface can be modified manually at any time, the Zookeeper can send the updated QPS threshold to the Redis server in real time, and thus the Redis server can timely know which preset QPS thresholds of the service interfaces have changed and the new QPS thresholds after the change. The Redis server may update the preset QPS threshold of the corresponding service interface by using the updated preset QPS threshold.
For example, if the preset QPS threshold of the user for the service interface1 at 12 o' clock 30 min 31 sec is modified from 2000 to 3000, the Redis server receives the latest preset QPS threshold of the service interface1 as 3000, and modifies the local preset QPS threshold for the service interface1 from 2000 to 3000, the time of these processes is in millisecond level, and the occupied time is negligible relative to the time of receiving the service request.
Then if the service interface1 receives the service request at 12 o' clock 30 min 31 sec, the Redis server may modify the hash table of interface1key, specifically, add 1 to the value 1 of value corresponding to field 123031 in the hash table of interface1key, so that the value is modified to 2, and after modifying the value, when comparing with the preset QPS threshold of the service interface1, compare with 3000 instead of the previous 2000.
In this way, the Redis server in the embodiment of the present invention receives the updated preset QPS threshold for each service interface from the Zookeeper in real time, and updates the QPS threshold of the corresponding service interface by using the updated preset QPS threshold, so that when the Redis server counts the received amount of the service request of each service interface per second and compares the received amount with the preset QPS threshold of the corresponding service interface, the received amount can be compared with the latest QPS threshold of the service interface. Since the update value of the QPS threshold is adjusted according to the concurrency amount and system performance of the actual application scenario, the service system performance can be optimized for the same service interface by the difference between preset QPS thresholds at different seconds, and the concurrent service request can be processed with the optimal performance at each second.
By means of the technical solution of the above embodiment of the present invention, the embodiment of the present invention utilizes the characteristics of a single thread model of the Redis server to monitor the service interface, and the Redis server can perform quantity self-increment on a QPS index of the service interface and preset a QPS threshold for each service interface when the service interface receives a service request; if the QPS index of a certain service interface after the self-increment exceeds the QPS threshold corresponding to the service interface, returning error information to the service server corresponding to the service interface, realizing the control of distributed flow, timely responding to high-concurrency service requests and ensuring the atomization of accessed service resources.
In a possible implementation manner, after judging that a QPS index of a certain service interface exceeds a preset QPS threshold of the service interface, the Lua script may send information that the service interface is in an early warning state to a front-end access layer; when the front-end access layer receives the service request sent to the service interface again, the service request may be forwarded to another machine (another service interface with the same function as the service interface may be understood) for processing. Due to atomicity, the accuracy of concurrence can be guaranteed.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Corresponding to the method provided by the foregoing embodiment of the present invention, referring to fig. 3, a block diagram of a structure of an embodiment of a control device 20 for a service request according to the present invention is shown, and is applied to a Redis server 200, where the device may specifically include the following modules:
the self-increment module 21 is configured to, when a service interface receives a service request, perform quantity self-increment on a QPS index corresponding to the service interface;
a determining module 22, configured to determine whether a QPS index corresponding to the self-increased number of the service interfaces exceeds a preset QPS threshold of the service interfaces;
the first returning module 23 is configured to, when the QPS index corresponding to the service interface after the number increase exceeds a preset QPS threshold of the service interface, return a first preset error message to the service server corresponding to the service interface, where the first preset error message is used to indicate that execution of subsequent service logic is prohibited for a service request currently received by the service interface.
In a possible embodiment, the Redis server 200 stores a QPS Value of each service interface by using a Key (Key) -Value (Value), where the Redis server 200 assigns a Key (Key) to each service interface in advance, and the Value (Value) corresponding to each Key is used to store the QPS Value of the corresponding service interface, where the data type of the Value is a hash table, and the hash table is a mapping table between a field (field) and a Value (field Value);
the self-adding module 21 includes:
the system comprises a determining submodule and a processing submodule, wherein the determining submodule is used for determining a target Key (namely a target Key) corresponding to a service interface and a receiving time point of the service request when the service interface receives the service request, and the minimum time unit of the receiving time point is second;
a calculation sub-module, configured to calculate a target field (i.e., a target field) of the target Key according to the receiving time point;
a self-increment module, configured to increment a target value (i.e., a target field value) corresponding to the target field in the hash table of the target Key by one;
the first returning module 23 is further configured to return a first preset error message to the service server corresponding to the service interface if the target value exceeds a preset QPS threshold of the service interface corresponding to the target Key.
In one possible embodiment, the self-increment module includes:
a first self-adding unit, configured to add a target field to a hash table of a target Key of the Redis server 200 if the target field does not exist in the hash table corresponding to the target Key, and add one to a target value corresponding to the target field from zero;
a second self-increment unit, configured to add one to a target value corresponding to a target field in a hash table of the target Key of the Redis server 200 from an existing value if the target field exists in the hash table corresponding to the target Key.
In a possible embodiment, the apparatus further comprises:
and the second returning module is used for returning second preset error information to the service server corresponding to the service interface if the service interface receives a service request again and the field corresponding to the receiving time point of the service request received again is the same as the target field, wherein the second preset error information is used for indicating that the service request currently received by the service interface is rejected to respond.
In a possible embodiment, the apparatus further comprises:
and the clearing module is used for clearing data in the target hash table according to a preset time period, wherein the target hash table is a hash table of which the receiving time point corresponding to the field is positioned before the current time point.
In a possible implementation manner, the adding module 21 is further configured to add the quantity of the QPS index corresponding to the service interface by using a Lua script when the service interface receives a service request.
In a possible embodiment, the apparatus further comprises:
the receiving module is used for receiving the updated preset QPS threshold aiming at each service interface from the Zookeeper in real time from the service server;
and the updating module is used for updating the preset QPS threshold of the corresponding service interface by adopting the updated preset QPS threshold.
By means of the technical solution of the above embodiment of the present invention, the embodiment of the present invention utilizes the characteristics of a single thread model of the Redis server to monitor the service interface, and the Redis server can perform quantity self-increment on a QPS index of the service interface and preset a QPS threshold for each service interface when the service interface receives a service request; if the QPS index of a certain service interface after the self-increment exceeds the QPS threshold corresponding to the service interface, returning error information to the service server corresponding to the service interface, realizing the control of distributed flow, timely responding to high-concurrency service requests and ensuring the atomization of accessed service resources.
According to an embodiment of the invention, a Redis server is also provided.
The Redis server includes: the system comprises a memory, a processor and a control program of service request stored on the memory and capable of running on the processor, wherein the control program of service request realizes the steps of the control method of service request according to any one of the above embodiments when being executed by the processor.
According to an embodiment of the present invention, there is also provided a computer-readable storage medium.
The computer readable storage medium stores a control program of a service request, and the control program of the service request realizes the steps in the control method of the service request according to any one of the above embodiments when executed by a processor.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
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 skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention 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 invention 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 invention 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 invention. 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 invention 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 preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
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 for controlling a service request and the device for controlling a service request provided by the present invention are described in detail above, and a specific example is applied in the text to explain the principle and the implementation of the present invention, and the description of the above embodiment is only used to help understanding the method of the present invention and the core idea thereof; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (14)

1. A method for controlling service requests, comprising:
when a service interface receives a service request, the Redis server performs quantity self-increment on a QPS index corresponding to the service interface;
judging whether the QPS indexes corresponding to the service interfaces with the self-increased number exceed a preset QPS threshold of the service interfaces or not; wherein the preset QPS threshold is configured as the maximum number of service requests which can be responded by the service interface within one second, and the service requests are requests for accessing limited service resources;
when the QPS index corresponding to the service interface after the self-increment exceeds a preset QPS threshold value of the service interface, the Redis server returns first preset error information to the service server corresponding to the service interface, wherein the first preset error information is used for indicating that the subsequent service logic is forbidden to be executed for the service request currently received by the service interface;
after the step of the Redis server returning the first preset error information to the service server corresponding to the service interface, the method further includes:
the Redis server sends the information that the service interface is in the early warning state to a front access layer;
when the front-end access layer receives the service request sent to the service interface again, the service request is sent to other service interfaces for processing;
the method further comprises the following steps:
the Redis server receives an updated preset QPS threshold value aiming at each service interface from a Zookeeper in real time from the service server;
and the Redis server updates the preset QPS threshold of the corresponding service interface by adopting the updated preset QPS threshold.
2. The method according to claim 1, wherein the Redis server stores QPS values of each service interface by using key-values, wherein the Redis server assigns a key to each service interface in advance, and the value corresponding to each key is used for storing the QPS values of the corresponding service interface, wherein the data type of the value is a hash table, and the hash table is a mapping table of fields and field values;
when the service interface receives a service request, the Redis server performs quantity self-increment on the QPS index corresponding to the service interface, including:
when a service interface receives a service request, a Redis server determines a target key corresponding to the service interface and a receiving time point of the service request, wherein the minimum time unit of the receiving time point is second;
the Redis server calculates a target field of the target key according to the receiving time point;
the Redis server adds one to a target field value corresponding to the target field in the hash table of the target key;
when the QPS index corresponding to the service interface after the number increase exceeds the preset QPS threshold of the service interface, the Redis server returns first preset error information to the service server corresponding to the service interface, including:
and when the target field value exceeds a preset QPS threshold of a service interface corresponding to the target key, the Redis server returns first preset error information to the service server corresponding to the service interface.
3. The method of claim 2, wherein the Redis server adds one to a target field value corresponding to the target field in the hash table of the target key, comprising:
when a target field does not exist in a hash table corresponding to a target key of the Redis server, adding the target field to the hash table of the target key by the Redis server, and adding one to a target field value corresponding to the target field from zero;
and when a target field exists in the hash table corresponding to the target key of the Redis server, the Redis server adds one to the target field value corresponding to the target field in the hash table of the target key from the existing numerical value.
4. The method according to claim 2, wherein after the Redis server returns a first preset error message to the traffic server corresponding to the traffic interface when the target field value exceeds a preset QPS threshold of the traffic interface corresponding to the target key, the method further comprises:
and when the service interface receives a service request again and the field corresponding to the receiving time point of the service request received again is the same as the target field, the Redis server returns second preset error information to the service server corresponding to the service interface, wherein the second preset error information is used for indicating that the service request currently received by the service interface is rejected.
5. The method according to claim 2, wherein after the Redis server returns a first preset error message to the traffic server corresponding to the traffic interface when the target field value exceeds a preset QPS threshold of the traffic interface corresponding to the target key, the method further comprises:
the Redis server clears data in a target hash table according to a preset time period, wherein the target hash table is a hash table of which the receiving time point corresponding to the field is located before the current time point.
6. The method according to claim 1, wherein the performing, by the Redis server, a quantitative increase on the QPS index corresponding to the service interface when the service interface receives a service request comprises:
and when the service interface receives a service request, the Redis server adopts the Lua script to perform quantity self-increment on the QPS index corresponding to the service interface.
7. A control device for service request, applied to a Redis server, the control device comprising:
the self-increment module is used for carrying out quantity self-increment on a QPS index corresponding to a service interface when the service interface receives a service request;
the judging module is used for judging whether the QPS indexes corresponding to the service interfaces with the self-increased number exceed a preset QPS threshold of the service interfaces or not; wherein the preset QPS threshold is configured as the maximum number of service requests which can be responded by the service interface within one second, and the service requests are requests for accessing limited service resources;
the first returning module is configured to return first preset error information to a service server corresponding to the service interface when a QPS index corresponding to the service interface after the number of self-increment exceeds a preset QPS threshold of the service interface, where the first preset error information is used to indicate that execution of subsequent service logic is prohibited for the service request currently received by the service interface;
wherein the first return module is further configured to:
sending the information that the service interface is in the early warning state to a front access layer;
when the front-end access layer receives the service request sent to the service interface again, the service request is sent to other service interfaces for processing;
the device further comprises:
the receiving module is used for receiving the updated preset QPS threshold aiming at each service interface from the Zookeeper in real time from the service server;
and the updating module is used for updating the preset QPS threshold of the corresponding service interface by adopting the updated preset QPS threshold.
8. The apparatus according to claim 7, wherein the Redis server stores QPS values of each service interface by using key-values, wherein the Redis server assigns a key to each service interface in advance, and the value corresponding to each key is used for storing the QPS values of the corresponding service interface, wherein the data type of the value is a hash table, and the hash table is a mapping table of fields and field values;
the auto-increment module comprises:
the determining submodule is used for determining a target key corresponding to a service interface and a receiving time point of the service request when the service interface receives the service request, wherein the minimum time unit of the receiving time point is second;
the calculation submodule is used for calculating a target field of the target key according to the receiving time point;
the self-increment module is used for adding one to a target field value corresponding to the target field in the hash table of the target key;
the first returning module is further configured to return a first preset error message to a service server corresponding to the service interface when the target field value exceeds a preset QPS threshold of the service interface corresponding to the target key.
9. The apparatus of claim 8, wherein the self-increment module comprises:
a first adding unit, configured to add a target field to a hash table of a target key of the Redis server when the target field does not exist in the hash table corresponding to the target key, and add one to a value of the target field corresponding to the target field from zero;
and a second adding unit, configured to add one to a target field value corresponding to the target field in the hash table of the target key from an existing numerical value when the target field exists in the hash table corresponding to the target key of the Redis server.
10. The apparatus of claim 8, further comprising:
and the second returning module is used for returning second preset error information to the service server corresponding to the service interface when the service interface receives a service request again and the field corresponding to the receiving time point of the service request received again is the same as the target field, wherein the second preset error information is used for indicating that the response to the service request currently received by the service interface is rejected.
11. The apparatus of claim 8, further comprising:
and the clearing module is used for clearing data in the target hash table according to a preset time period, wherein the target hash table is a hash table of which the receiving time point corresponding to the field is positioned before the current time point.
12. The apparatus of claim 7,
and the self-increment module is further configured to, when a service interface receives a service request, perform quantity self-increment on the QPS index corresponding to the service interface by using a Lua script.
13. A Redis server, comprising: memory, a processor and a control program of a service request stored on the memory and executable on the processor, the control program of a service request implementing the steps of the control method of a service request according to any one of claims 1 to 6 when executed by the processor.
14. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a control program of a service request, which when executed by a processor implements the steps in the control method of a service request according to any one of claims 1 to 6.
CN201810575104.3A 2018-06-06 2018-06-06 Service request control method and device Active CN109087055B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810575104.3A CN109087055B (en) 2018-06-06 2018-06-06 Service request control method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810575104.3A CN109087055B (en) 2018-06-06 2018-06-06 Service request control method and device

Publications (2)

Publication Number Publication Date
CN109087055A CN109087055A (en) 2018-12-25
CN109087055B true CN109087055B (en) 2022-04-08

Family

ID=64839393

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810575104.3A Active CN109087055B (en) 2018-06-06 2018-06-06 Service request control method and device

Country Status (1)

Country Link
CN (1) CN109087055B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109800246A (en) * 2019-02-21 2019-05-24 北京阿可科技有限公司 A kind of Data lifecycle management method towards magnanimity scale KV caching
CN110048907B (en) * 2019-03-29 2022-12-30 苏宁易购集团股份有限公司 Global flow control method and device in cluster environment
CN110401579B (en) * 2019-06-18 2022-08-23 平安科技(深圳)有限公司 Full link data sampling method, device and equipment based on hash table and storage medium
CN110708258B (en) * 2019-09-29 2023-04-07 Oppo广东移动通信有限公司 Flow control method, device, server and storage medium
CN110719337A (en) * 2019-10-23 2020-01-21 北京悠易网际科技发展有限公司 Service system, service request processing method, device and server
CN110866200A (en) * 2019-11-12 2020-03-06 北京城市网邻信息技术有限公司 Service interface rendering method and device
CN110865861B (en) * 2019-11-12 2021-06-15 北京城市网邻信息技术有限公司 Service data processing method and device
CN111400032B (en) * 2020-03-02 2023-07-21 杭州迪普信息技术有限公司 Resource allocation method and device
CN113726878A (en) * 2021-08-30 2021-11-30 深圳追一科技有限公司 Session processing method, system, device and storage medium in cluster environment
CN114745329B (en) * 2022-03-30 2024-03-22 青岛海尔科技有限公司 Flow control method and device, storage medium and electronic device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101741892A (en) * 2008-11-21 2010-06-16 北京易路联动技术有限公司 Method, system and subsystem for setting load balance according to threshold value of specific data service
CN104683457A (en) * 2015-02-13 2015-06-03 小米科技有限责任公司 Concurrency control method and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101702180B (en) * 2009-12-04 2013-03-27 金蝶软件(中国)有限公司 Method and system for searching associated field value
CN103150241B (en) * 2013-04-09 2016-04-06 上海市计量测试技术研究院 Multiserver state monitoring and management system and method
CN105100059A (en) * 2015-06-10 2015-11-25 努比亚技术有限公司 Method, device and system for processing high-concurrent requests
CN105760221B (en) * 2016-02-02 2018-12-07 中博信息技术研究院有限公司 The task of distributed computing framework sends system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101741892A (en) * 2008-11-21 2010-06-16 北京易路联动技术有限公司 Method, system and subsystem for setting load balance according to threshold value of specific data service
CN104683457A (en) * 2015-02-13 2015-06-03 小米科技有限责任公司 Concurrency control method and device

Also Published As

Publication number Publication date
CN109087055A (en) 2018-12-25

Similar Documents

Publication Publication Date Title
CN109087055B (en) Service request control method and device
US11586673B2 (en) Data writing and reading method and apparatus, and cloud storage system
US20190081876A1 (en) Real time anomaly detection for data streams
CN109327550B (en) Access request distribution method and device, storage medium and computer equipment
CN106487708B (en) Network access request control method and device
CN113114715B (en) Scheduling method based on edge calculation and edge equipment cluster
US11347808B1 (en) Dynamically-adaptive bloom-filter
CN108111325B (en) Resource allocation method and device
US20220086097A1 (en) Stream allocation using stream credits
CN106708636B (en) Data caching method and device based on cluster
US9489306B1 (en) Performing efficient cache invalidation
US9652151B2 (en) Conflict management for application directed data placement in storage environments
EP3407196B1 (en) Preventing reader starvation during order preserving data stream consumption
CN108268605B (en) Shared space resource management method and system
CN105574008A (en) Task scheduling method and equipment applied to distributed file system
US20200364211A1 (en) Predictive database index modification
US11836528B2 (en) Throttling thread resources of service computing platform
WO2023093194A1 (en) Cloud monitoring method and cloud management platform
CN116489103A (en) Service flow limiting method, device and service processing system
CN115237960A (en) Information pushing method and device, storage medium and electronic equipment
CN115017538A (en) Data processing method and device, electronic equipment and storage medium
CN106598706B (en) Method and device for improving stability of server and server
CN109672563B (en) Gateway configuration method and device and API gateway
CN108255871B (en) Data query method and data query node
CN107196962B (en) User access control method and system

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
GR01 Patent grant
GR01 Patent grant