Unlock instant, AI-driven research and patent intelligence for your innovation.

Implementation method of api distributed current limiting

A distributed and current-limiting technology, applied in multi-programming devices, instruments, data exchange networks, etc., can solve problems such as low server performance, unconfigurable interfaces, and low server availability, and achieve the effect of avoiding chain reactions

Inactive Publication Date: 2020-12-22
必成汇(成都)科技有限公司
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] The purpose of the present invention is to provide a control method for API distributed current limiting, which solves the problems of low server performance, unconfigurable interface and low server availability when multiple users are concurrent in the prior art, and realizes high performance and high availability. API distributed current limiting purpose

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Implementation method of api distributed current limiting

Examples

Experimental program
Comparison scheme
Effect test

Embodiment

[0036] a. The system administrator admin configures the order interface flow-limiting rule to allow 4,000 visits per second before the system is running, and the rule for user A to place an order interface is 80 visits per second;

[0037] b. User A initiates an API request to place an order, and the server will perform signature verification on the user key1 information, order quantity, price and other parameters in the request, and then query the user through Realm in the current limiting component according to key1 The corresponding order interface current limiting strategy, after the query is successful, call the cluster Redis lua script to obtain the current limiting token corresponding to user A and the order interface, after the acquisition is successful, it indicates that this call has not yet reached the current limiting bottleneck, and this call passes .

[0038] c. When user A visits the order interface for the 81st time in the current second, he will fail to obtain...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses an API distributed flow limiting control method, which belongs to the field of network financial transactions. Configure the interface and user-level access current limiting rules in the database according to the current limiting frequency; after the server receives the API request sent by the user, it performs signature verification on the API parameters; after the verification is passed, according to the user's Identify the key, and use Realm in the current limiting component to query the current limiting policy corresponding to the user and the order interface; then use the cluster Redis lua script to obtain the token for the user-level and interface-level current limiting in the Redis cluster; judge this interface Whether the call complies with the user's interface authority and current limit. The invention solves the problems of low server performance, unconfigurable interface and low server availability when multiple users are concurrent in the prior art, and realizes the purpose of high-performance and high-availability API distributed flow limiting.

Description

technical field [0001] The invention belongs to the technical field of network financial transactions, and in particular relates to an implementation method of API distributed current limiting. Background technique [0002] In the field of financial transactions, the existing transaction model is the service provider and the service caller. The service provider provides services to the outside world by calling the API interface, and the service caller realizes the service by calling the API interface. The server will have an estimated capacity at the beginning of the system design. If it exceeds the TPS / QPS threshold that the system can withstand for a long time, the system may be overwhelmed, and eventually spread to the entire service, resulting in insufficient service. In order to avoid this situation, it is necessary to limit the request of the API interface. The purpose of rate limiting is to protect the system by limiting the rate of concurrent access requests or the ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): G06F21/31G06F21/45G06F9/54H04L12/801H04L12/819H04L47/21
CPCG06F21/31G06F21/45G06F9/547H04L47/10H04L47/215G06F2221/2141G06F2209/549
Inventor 李勇张斌
Owner 必成汇(成都)科技有限公司