Current limiting and automatic expansion and contraction methods for multi-service gateways
A multi-service and gateway technology, applied in the computer field, can solve problems such as slow service, illogical, unusable, etc., and achieve the effect of reducing costs and ensuring normal business
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0034] Example 1: see figure 1 , figure 1 A flow chart of a multi-service gateway-oriented current limiting and automatic capacity expansion / reduction method provided by the present invention; a multi-service gateway-oriented current limiting and automatic capacity expansion / reduction method provided by the present invention includes the steps:
[0035] In step 101, OpenResty is provided, and a plug-in interface is provided for the Lua script running on nginx, and the plug-in interface includes: a current-limiting plug-in interface, a feature anti-brush plug-in interface, an access control plug-in interface, a firewall plug-in interface, and a SQL anti-injection plug-in interface;
[0036] When the traffic is too large, the traffic is restricted to prevent the upstream of the gateway from denying access; for the overflowed traffic, the gateway service queues and does not directly discard it; the frequency of IP access is limited.
[0037] Feature anti-brush means that certain...
Embodiment 2
[0054] continue to see figure 1 , figure 1 A flow chart of a method for current limiting and automatic capacity expansion and contraction for a multi-service gateway provided by the present invention; a method for current limitation and automatic capacity expansion and contraction for a multi-service gateway provided by the present invention, comprising steps:
[0055] In step 101, OpenResty is provided, and a plug-in interface is provided for the Lua script running on nginx, and the plug-in interface includes: a current-limiting plug-in interface, a feature anti-brush plug-in interface, an access control plug-in interface, a firewall plug-in interface, and a SQL anti-injection plug-in interface;
[0056] When the traffic is too large, the traffic is restricted to prevent the upstream of the gateway from denying access; for the overflowed traffic, the gateway service queues and does not directly discard it; the frequency of IP access is limited.
[0057] Feature anti-brush me...
Embodiment 3
[0085] This embodiment is an application embodiment:
[0086] Another method for current limiting and automatic capacity expansion and contraction for multi-service gateways provided by the present invention includes the steps of:
[0087] In step 301, OpenResty is provided. OpenResty itself only encapsulates Nginx and integrates the Lua environment. Its core service is Nginx. Nginx configures various services and APIs through the nginx.conf file. The traditional method of Nginx supporting multiple services is in nginx. The conf file is configured with locations corresponding to multiple servers and APIs. The present invention designs a template and a conf generating module for generating the nginx.conf file, and generates the nginx.conf file for each service independently.
[0088] Step 302 , when the cluster makefile is being compiled, the OpenResty gateway program of the service is generated by specifying parameters to the Makefile and a service file corresponding to the pa...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


