API (Application Program Interface) flow control method and device
The invention relates to an API (Application Program Interface) flow control method and device. The method comprises the following steps: receiving a user request of a client through a WEB server; the user request comprises a client ID and a product ID; determining a traffic limiting key according t...
Gespeichert in:
1. Verfasser: | |
---|---|
Format: | Patent |
Sprache: | chi ; eng |
Schlagworte: | |
Online-Zugang: | Volltext bestellen |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
Zusammenfassung: | The invention relates to an API (Application Program Interface) flow control method and device. The method comprises the following steps: receiving a user request of a client through a WEB server; the user request comprises a client ID and a product ID; determining a traffic limiting key according to the user request, performing progressive increase operation on the traffic limiting key, and returning a numerical value after progressive increase; and querying a corresponding flow limiting rule of the user request in the mysql database, comparing the progressively increased value with a flow limiting threshold in the flow limiting rule, and determining whether to limit the flow or not according to a comparison result. According to the method, the mysql database and the redis database are combined, so that addition of the dynamic flow limiting rule is realized, and multi-granularity flow limiting control can be realized.
本发明涉及一种API流量控制方法及装置,所述方法包括通过WEB服务器接收客户端的用户请求;所述用户请求包括客户端ID和产品ID;根据所述用户请求确定限流key,对所述限流key进行递 |
---|