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

API distributed current limiting implementation method

A distributed and current-limiting technology, which is applied in inter-program communication, program control design, digital data authentication, 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: 2019-09-24
必成汇(成都)科技有限公司
View PDF5 Cites 18 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
  • API distributed current limiting implementation method

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 current limiting control method, and belongs to the field of network financial transactions. The method comprises: respectively configuring the interface and the user-level access current-limiting rule into a database according to the current-limiting frequency; after receiving the API request sent by the user, the server side carrying out signature verification on the API parameters; after the verification is passed, according to a user identification key in the API parameters, inquiring a current limiting strategy corresponding to the ordering interface of the user in the current limiting assembly through Realm; through a cluster Redis lua script, obtaining tokens of the user level and the interface level in the Redis cluster for current limiting; and judging whether the interface call conforms to the interface permission and the current limit of the user or not. The problems that in the prior art, the server performance is low, interfaces cannot be matched, and the server availability is low when multiple users concurrently exist are solved, and the purpose of high-performance and high-availability API distributed flow limiting is achieved.

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 Applications(China)
IPC IPC(8): G06F21/31G06F21/45G06F9/54H04L12/801H04L12/819H04L47/21
CPCG06F21/31G06F21/45G06F9/547H04L47/10H04L47/215G06F2221/2141G06F2209/549
Inventor 李勇张斌
Owner 必成汇(成都)科技有限公司