CN114979273B - Request current limiting method and device, storage medium and electronic equipment - Google Patents

Request current limiting method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN114979273B
CN114979273B CN202210374356.6A CN202210374356A CN114979273B CN 114979273 B CN114979273 B CN 114979273B CN 202210374356 A CN202210374356 A CN 202210374356A CN 114979273 B CN114979273 B CN 114979273B
Authority
CN
China
Prior art keywords
target
current limiting
instance
request
determining
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
CN202210374356.6A
Other languages
Chinese (zh)
Other versions
CN114979273A (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.)
Peoples Insurance Company of China
Original Assignee
Peoples Insurance Company of China
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 Peoples Insurance Company of China filed Critical Peoples Insurance Company of China
Priority to CN202210374356.6A priority Critical patent/CN114979273B/en
Publication of CN114979273A publication Critical patent/CN114979273A/en
Application granted granted Critical
Publication of CN114979273B publication Critical patent/CN114979273B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/54Organization of routing tables
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/20Traffic policing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/625Queue scheduling characterised by scheduling criteria for service slots or service orders
    • H04L47/627Queue scheduling characterised by scheduling criteria for service slots or service orders policing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer And Data Communications (AREA)

Abstract

The application discloses a request current limiting method and device, a storage medium and electronic equipment, wherein the method comprises the following steps: analyzing the request information of the client to obtain a target naming space, and determining an instance corresponding to the target naming space as a target instance in a plurality of instances according to the naming space of each instance; determining a target current limiting strategy in a plurality of current limiting strategies according to the target naming space; and determining a target current limiting operation according to the target current limiting strategy, and executing the target current limiting operation on the request corresponding to the request information by using the gateway so that the client accesses the target instance according to the target current limiting strategy. The method solves the problems of complex configuration and low efficiency caused by the fact that the current limiting strategy is configured for each example independently in the prior art.

Description

Request current limiting method and device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of micro-service current limiting technologies, and in particular, to a requested current limiting method, apparatus, storage medium, and electronic device.
Background
The flow limiting is that service request calls need to be queued, only one thread pool is required to be counted, and the service requests wait beyond the total number of thread pools, and even if instantaneous requests are concurrent and bigger, the service requests need to enter slowly. Service throttling is the operation of an overall micro-service architecture that is not affected by anomalies or performance issues that occur for a single API interface service, and sacrificing or denying access to one service tends to ensure that more services can be consumed and invoked normally.
In the existing current flow limiting method, in the scenario of accessing a plurality of different instances, different flow limiting strategies (as shown in fig. 1) need to be configured for each instance respectively, the configuration operation is complex, and the efficiency is low.
Disclosure of Invention
In view of this, the present application provides a method, apparatus, medium and device for limiting a request, which solves the problems of complex configuration and low efficiency caused by separately configuring a current limiting policy for each instance in the prior art.
According to one aspect of the present application, there is provided a method of throttling a request, comprising:
analyzing request information of a client to obtain a target naming space, and determining an instance corresponding to the target naming space as a target instance in a plurality of instances according to the naming space of each instance;
determining a target current limiting strategy in a plurality of current limiting strategies according to the target naming space;
and determining a target current limiting operation according to the target current limiting strategy, and executing the target current limiting operation on a request corresponding to the request information by using a gateway so that the client accesses the target instance according to the target current limiting strategy.
Optionally, before determining the target current limiting policy in the plurality of current limiting policies according to the target namespace, the method further includes:
acquiring a current limiting rule for each naming space respectively;
and configuring the current limiting strategy on the gateway according to the current limiting rule.
Optionally, the current limiting rule includes a current limiting condition and a current limiting operation;
wherein, the current limiting condition is: the current limiting parameter reaches a preset current limiting condition threshold;
wherein the current limiting operation is one of: directly releasing the request corresponding to the request information, adding the request information to a queuing queue, and rejecting the request corresponding to the request information.
Optionally, before determining, according to the namespace of each instance, that an instance corresponding to the target namespace is a target instance in a plurality of instances, the method further includes:
and defining a naming space for each instance, and generating an instance list, wherein the instance list comprises each instance and the naming space corresponding to each instance.
Optionally, the determining, among the multiple instances, that the instance corresponding to the target namespace is a target instance specifically includes:
according to the instance list, adding the instance and the name space corresponding to the instance into a routing list;
performing a polling operation on the routing list, wherein an instance in which one namespace is determined to be the target namespace in the routing list is determined to be the target instance;
and if no name space corresponding to the instance in the routing list is the target name space, generating abnormal information.
Optionally, the request information includes identity information of the client;
before the request information of the client is analyzed to obtain the target name space, the method further comprises the following steps:
authenticating the client according to the identity information;
if the authentication is not passed, rejecting the request corresponding to the request information and ending.
Optionally, the request information includes a request address, wherein the request address includes the gateway and the target namespace.
According to another aspect of the present application, there is provided a requested current limiting apparatus, comprising:
the first determining module is used for analyzing the request information of the client to obtain a target naming space, and determining an instance corresponding to the target naming space as a target instance in a plurality of instances;
the second determining module is used for determining a target current limiting strategy in a plurality of current limiting strategies according to the target name space;
and the execution module is used for determining a target current limiting operation according to the target current limiting strategy, and executing the target current limiting operation on a request corresponding to the request information by utilizing a gateway so that the client accesses the target instance according to the target current limiting strategy.
Optionally, the apparatus further comprises a configuration module, specifically configured to:
acquiring a current limiting rule for each naming space respectively;
and configuring the current limiting strategy on the gateway according to the current limiting rule.
Optionally, the current limiting rule includes a current limiting condition and a current limiting operation;
wherein, the current limiting condition is: the current limiting parameter reaches a preset current limiting condition threshold;
wherein the current limiting operation is one of: directly releasing the request corresponding to the request information, adding the request information to a queuing queue, and rejecting the request corresponding to the request information.
Optionally, the apparatus further comprises a definition module, specifically configured to:
and defining a naming space for each instance, and generating an instance list, wherein the instance list comprises each instance and the naming space corresponding to each instance.
Optionally, the first determining module is specifically configured to:
according to the instance list, adding the instance and the name space corresponding to the instance into a routing list;
performing a polling operation on the routing list, wherein an instance in which one namespace is determined to be the target namespace in the routing list is determined to be the target instance;
and if no name space corresponding to the instance in the routing list is the target name space, generating abnormal information.
Optionally, the request information includes identity information of the client;
the device also comprises an authentication module, which is specifically used for:
authenticating the client according to the identity information;
if the authentication is not passed, rejecting the request corresponding to the request information and ending.
Optionally, the request information includes a request address, wherein the request address includes the gateway and the target namespace.
According to yet another aspect of the present application, there is provided a storage medium having stored thereon a computer program which, when executed by a processor, implements the above-described requested current limiting method.
According to still another aspect of the present application, there is provided an electronic device including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, the processor implementing the above-described requested current limiting method when executing the computer program.
By means of the technical scheme, each namespace has a corresponding current limiting strategy, after receiving the request information of the client, the target namespaces are obtained through analysis, the target current limiting strategy is further determined, and corresponding operation is executed according to the target current limiting strategy. Therefore, the current limiting strategy is only required to be configured for each naming space, and the number of the naming spaces is smaller than or equal to the number of the instances because different instances can correspond to the same naming space, so that the operation of configuring the current limiting strategy for each naming space is simpler than the operation of configuring the current limiting strategy for each instance. The method for independently configuring the current limiting strategy for each example is abandoned, the configuration operation is simplified, and the efficiency is improved.
The foregoing description is only an overview of the technical solutions of the present application, and may be implemented according to the content of the specification in order to make the technical means of the present application more clearly understood, and in order to make the above-mentioned and other objects, features and advantages of the present application more clearly understood, the following detailed description of the present application will be given.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute an undue limitation to the application. In the drawings:
FIG. 1 is a flow diagram of a prior art method of limiting flow of requests;
FIG. 2 is a flow chart of a method for limiting flow of requests according to an embodiment of the present application;
FIG. 3 is a flow chart illustrating another method of limiting flow of requests provided by embodiments of the present application;
FIG. 4 illustrates a diagram of namespaces of another method of throttling requests provided by an embodiment of the present application;
FIG. 5 is a flow chart illustrating another method of limiting flow of requests provided by embodiments of the present application;
FIG. 6 is a flow chart illustrating another method of limiting flow of requests provided by embodiments of the present application;
FIG. 7 is a schematic diagram of a method for limiting flow of requests provided by an embodiment of the present application;
fig. 8 shows a block diagram of a requested current limiting device according to an embodiment of the present application.
Detailed Description
In this embodiment, a method for limiting the flow of a request is provided, as shown in fig. 2, and the method includes:
step 101, analyzing request information of a client to obtain a target naming space, and determining an instance corresponding to the target naming space as a target instance in a plurality of instances according to the naming space of each instance;
the request flow limiting method provided by the embodiment of the application can be used in a scene with a plurality of examples. Based on the corresponding relation between the instance and the naming space, after receiving the request information sent by the client, the request information can be analyzed to obtain a target naming space, and then the instance, namely the target instance, of the client requesting access is determined according to the target naming space.
Wherein, different examples can correspond to the same name space, and can also correspond to different name spaces, and the name spaces realize isolation of different examples.
Step 102, determining a target current limiting strategy in a plurality of current limiting strategies according to the target naming space;
in this embodiment, unlike the existing way of configuring a current limiting policy for each instance separately so that an instance corresponds to a current limiting policy one-to-one, the namespaces in this embodiment correspond to a current limiting policy, and thus a target current limiting policy can be determined according to a target namespace. Specifically, analyzing the namespaces corresponding to each current limiting strategy, screening out the current limiting strategy with the namespaces being the target namespaces, and taking the screened current limiting strategy as the target current limiting strategy.
Step 103, determining a target current limiting operation according to the target current limiting strategy, and executing the target current limiting operation on the request corresponding to the request information by using the gateway so that the client accesses the target instance according to the target current limiting strategy.
In this embodiment, a target throttling operation performed on a request from a client is determined according to a target policy, and the target throttling operation is performed using a gateway. For example, if the target current limiting operation is determined to be a request corresponding to the direct release request information according to the target policy, the gateway directly releases the request, and the request of the client is directly sent to the server, that is, the client directly accesses the target instance; if the target current limiting operation is determined to be the request corresponding to the refusing request information according to the target policy, the gateway directly refuses the request, and the request of the client is not sent to the server, namely the client cannot access the target instance.
By applying the technical scheme of the embodiment, each namespace has a corresponding current limiting policy, after receiving the request information of the client, the target namespaces are obtained through analysis, the target current limiting policies are further determined, and corresponding operations are executed according to the target current limiting policies. Therefore, the embodiment only needs to configure the current limiting policy for each namespace, and because different instances can correspond to the same namespace, the number of namespaces is smaller than or equal to the number of instances, and the operation of configuring the current limiting policy for each namespace is simpler than the operation of configuring the current limiting policy for each instance. The embodiment eliminates the method of independently configuring the current limiting strategy for each example, simplifies the configuration operation and improves the efficiency.
Further, as a refinement and extension of the foregoing embodiment, to fully describe the implementation process of this embodiment, another request current limiting method is provided, as shown in fig. 3, before determining, according to the target namespace, a target current limiting policy from a plurality of current limiting policies, further including:
step 201, obtaining a current limiting rule for each naming space respectively;
step 202, configuring a current limiting strategy on the gateway according to the current limiting rule.
In this embodiment, each namespace corresponds to a preset current limit rule, where the current limit rules corresponding to different namespaces may be the same or different. And acquiring the current limiting rule corresponding to each name space and configuring the current limiting rule on the gateway. The gateway can be used to implement the throttling operation since the client requests are routed to the instance only through the gateway.
According to the embodiment, the current limiting strategy is uniformly configured at the gateway, and independent configuration at each client is not needed, so that decoupling of the service system is realized. At the same time, the current limiting policy is configured for each namespace, rather than requiring separate configuration for each instance, simplifying configuration operations.
Further, in another requested current limiting method, the current limiting rule includes a current limiting condition and a current limiting operation;
wherein, the current limiting condition is: the current limiting parameter reaches a preset current limiting condition threshold;
wherein the current limiting operation is one of: directly releasing the request corresponding to the request information, adding the request information to a queuing queue, and rejecting the request corresponding to the request information.
In this embodiment, the current limit rule includes a current limit condition and a current limit operation, and when the current limit condition is reached, the current limit operation corresponding to the current limit condition may be performed.
The current limiting condition is that the current limiting parameter reaches a preset current limiting condition threshold value. In particular, the throttling parameter may be the number of requests in the queuing queue, the request frequency of the target namespace, and so forth. Of course, the flow limiting parameter may be other parameters, which are not limited herein. While the throttling operation may be one of direct release, joining a queuing queue, and rejecting the request.
Combining the current limiting conditions with the current limiting operation, a current limiting rule may be obtained, for example: combining the current limiting conditions and the current limiting operation to obtain the following current limiting rule: and if the number of the requests in the queuing queue is greater than a preset limiting condition threshold, rejecting the request corresponding to the request information. After receiving the request information of the client, if the request information of the client is judged to meet the current limiting condition, executing corresponding current limiting operation, namely rejecting the request of the client.
The embodiment obtains the current limiting rule by combining the current limiting condition and the current limiting operation, has high flexibility and higher standardization degree.
Further, in another method for limiting the current request, before determining that an instance corresponding to the target namespace is the target instance in the multiple instances according to the namespace of each instance, the method further includes:
a namespace is defined for each instance, and an instance list is generated, wherein the instance list includes each instance and the namespace corresponding to each instance.
FIG. 4 shows a schematic diagram of defining namespaces for instances, as shown, with four instances (API Provider) on a service, each defining a namespace for each instance, where the namespaces of the first two instances are each defined as p02-1 and the namespaces of the last two instances are each defined as p02-2.
In this embodiment, a namespace is defined for each instance, the different instances are grouped and segregated by namespace, and an instance list is generated from the instances and the corresponding namespaces. And further, after receiving the request information of the client, the instance corresponding to the target name space can be determined as the target instance only by searching the instance list, so that the access of the request to the target instance is limited.
Further, in another method for limiting the current request, as shown in fig. 5, determining, among a plurality of instances, an instance corresponding to the target namespace as a target instance specifically includes:
step 301, adding an instance and a namespace corresponding to the instance into a routing list according to the instance list;
step 302, performing a polling operation on the routing list, and determining an instance in the routing list in which a namespace is a target namespace as a target instance;
in step 303, if no namespace corresponding to the instance in the routing list is the target namespace, abnormal information is generated.
In this embodiment, the instances in the instance list and their corresponding namespaces are integrated and added to the routing list to enable assignment and hopping of destination addresses using routing functionality. Specifically, an instance in the routing list where the namespace is determined to be the target namespace is the target instance. Because different instances can correspond to the same naming space, a plurality of instances with the naming space being the target naming space can be provided, based on the fact that polling operation is performed on the routing list, the target instance is determined in a polling mode, and the situation that a plurality of target instances are selected and the jump to which target instance cannot be determined is avoided.
In addition, if the namespaces corresponding to all the instances in the routing list are not target namespaces, the target namespaces in the request information are not matched with namespaces available by the server, and in this case, abnormal information is generated to prompt that the request information of the client may be wrong.
Further, in another method of limiting the flow of requests, the request information includes identity information of the client; as shown in fig. 6, before resolving the request information of the client to obtain the target namespace, the method further includes:
step 401, authenticating the client according to the identity information;
if the authentication is not passed, the request corresponding to the request information is rejected and ended, step 402.
In this embodiment, the request information includes identity information of the client, and before the current limiting operation is performed on the request of the client, the client may be authenticated according to the identity information, that is, whether the client has permission to access the target instance is determined. If the authentication is passed, the client is considered to have access to the target instance, so that the step of analyzing the request information of the client to obtain a target name space can be executed; if the authentication is not passed, the client is considered to have no right to access the target instance, so that the request corresponding to the request information sent by the client is refused, and the client cannot access the target instance.
Specifically, for example, the header of the request information may include the identity information of the client, where the identity information may use a field in a format of a key-value pair, such as "token" = "xxxxxxxx", where the key is token, and the value is the specific identity information of the client.
According to the embodiment, before the request information is analyzed to obtain the name space, the request information is analyzed to obtain the identity information, the authority of the client is analyzed according to the identity information, the client without the authority is prevented from accessing the target instance, and the safety is improved.
Further, in another method of throttling requests, the request information includes a request address, wherein the request address includes a gateway and a target namespace.
In this embodiment, the request information includes a request address from which the client can access the target instance. Specifically, the request address includes a gateway and a target namespace, the request information sent by the client reaches the gateway, and is routed to the target instance corresponding to the target namespace at the gateway, so that data transmission from the request information to the target instance is realized, that is, access to the target instance by the client is realized.
Specifically, the format of the request address may be http:// gateway IP gateway port/namespace (p 02-1/p 02-2)/provider/api, wherein gateway IP is the IP address of the gateway; the gateway port is the port number of the gateway, and if a default port is configured, the gateway port can be omitted; the namespaces are target namespaces in the request information, such as p02-1, p02-2, etc. in the previous embodiment can be used as target namespaces; provider is a target instance; api is the port name required for the transmission of the request information.
Further, fig. 7 is a schematic diagram of request flow restriction in another request flow restriction method, where as shown in the drawing, request information of three clients (consumer 1, consumer2 and consumer 3) is received, the request information is parsed to obtain identity information, authentication is performed in a unified user center according to the identity information, if the request is not passed, the request is directly rejected, and if the authentication is passed, a subsequent operation is performed.
If the authentication is passed, the request information is analyzed to obtain a target namespace, and then the target current limiting operation is executed according to the target current limiting strategy, specifically, if the parameter reaches the current limiting condition in the target current limiting strategy, the corresponding current limiting operation is executed.
For example, when the target namespace of the request information of the consumer1 is p02-1, if the threads of the server are all busy responding, the new connection will enter the queue for queuing, and if the new connection exceeds the queuing size, the connection is refused; when the target namespace of the request information of the consumer3 is p02-2, if the request exceeds the maximum request number in unit time, the connection is disconnected.
If the request information is responded, a target instance corresponding to the target namespace, such as a target instance corresponding to p02-1, may be accessed.
Further, as a specific implementation of the above-mentioned request current limiting method, the embodiment of the present application provides a request current limiting device, as shown in fig. 8, where the request current limiting device includes: the device comprises a first determining module, a second determining module and an executing module.
The first determining module is used for analyzing the request information of the client to obtain a target naming space, and determining an instance corresponding to the target naming space as a target instance in a plurality of instances;
the second determining module is used for determining a target current limiting strategy in a plurality of current limiting strategies according to the target naming space;
and the execution module is used for determining a target current limiting operation according to the target current limiting strategy, and executing the target current limiting operation on the request corresponding to the request information by utilizing the gateway so that the client accesses the target instance according to the target current limiting strategy.
In a specific application scenario, optionally, the apparatus further includes a configuration module, specifically configured to:
respectively acquiring a current limiting rule for each naming space;
and configuring a current limiting strategy on the gateway according to the current limiting rule.
In a specific application scenario, optionally, the current limiting rule includes a current limiting condition and a current limiting operation;
wherein, the current limiting condition is: the current limiting parameter reaches a preset current limiting condition threshold;
wherein the current limiting operation is one of: directly releasing the request corresponding to the request information, adding the request information to a queuing queue, and rejecting the request corresponding to the request information.
In a specific application scenario, optionally, the apparatus further includes a definition module, specifically configured to:
a namespace is defined for each instance, and an instance list is generated, wherein the instance list includes each instance and the namespace corresponding to each instance.
In a specific application scenario, optionally, the first determining module is specifically configured to:
according to the instance list, adding the instance and the name space corresponding to the instance into a routing list;
performing polling operation on the routing list, and determining an instance with a namespace being a target namespace as a target instance in the routing list;
if no name space corresponding to the instance in the routing list is the target name space, generating abnormal information.
In a specific application scenario, optionally, the request information includes identity information of the client;
the device also comprises an authentication module, which is specifically used for:
authenticating the client according to the identity information;
if the authentication is not passed, rejecting the request corresponding to the request information and ending.
In a specific application scenario, optionally, the request information includes a request address, where the request address includes a gateway and a target namespace.
According to yet another aspect of the present application, there is provided a storage medium having stored thereon a computer program, the program or instructions, when executed by a processor, implementing the above-described requested current limiting method.
According to still another aspect of the present application, there is provided an electronic device including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, the processor implementing the above-described requested current limiting method when executing the program.
It should be noted that, for other corresponding descriptions of each functional module related to the requested current limiting device provided in the embodiment of the present application, reference may be made to corresponding descriptions in fig. 1 to fig. 7, and no further description is given here.
Based on the above-described methods shown in fig. 1 to 7, correspondingly, the embodiments of the present application further provide a storage medium having a computer program stored thereon, where the program, when executed by a processor, implements the above-described requested current limiting method shown in fig. 1 to 7.
Based on such understanding, the technical solution of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.), and includes several instructions for causing an electronic device (may be a personal computer, a server, or a network device, etc.) to perform the methods described in various implementation scenarios of the present application.
In order to achieve the above object, the present embodiment further provides an electronic device, which may specifically be a personal computer, a server, a network device, etc., based on the method shown in fig. 1 to 7 and the requested current limiting device embodiment shown in fig. 8, where the electronic device includes a storage medium and a processor; a storage medium storing a computer program; a processor for executing a computer program to implement the above-described requested throttling method as shown in fig. 1 to 7.
Optionally, the electronic device may also include a user interface, a network interface, a camera, radio frequency (RadioFrequency, RF) circuitry, sensors, audio circuitry, WI-FI modules, and the like. The user interface may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (e.g., bluetooth interface, WI-FI interface), etc.
It will be appreciated by those skilled in the art that the structure of the electronic device provided in this embodiment is not limited to the electronic device, and may include more or fewer components, or may be combined with certain components, or may be arranged with different components.
The storage medium may further include an operating device and a network communication module. The operating means is a program that manages and saves electronic device hardware and software resources, supporting the execution of information handling programs and other software and/or programs. The network communication module is used for realizing communication among all the controls in the storage medium and communication with other hardware and software in the entity equipment.
From the above description of the embodiments, it will be apparent to those skilled in the art that the present application may be implemented by means of software plus necessary general hardware platforms, or may be implemented by hardware.
Those skilled in the art will appreciate that the drawings are merely schematic illustrations of one preferred implementation scenario, and that the elements or processes in the drawings are not necessarily required to practice the present application. Those skilled in the art will appreciate that elements of an apparatus in an implementation may be distributed throughout the apparatus in an implementation as described in the implementation, or that corresponding variations may be located in one or more apparatuses other than the present implementation. The units of the implementation scenario may be combined into one unit, or may be further split into a plurality of sub-units.
The foregoing application serial numbers are merely for description, and do not represent advantages or disadvantages of the implementation scenario. The foregoing disclosure is merely a few specific implementations of the present application, but the present application is not limited thereto and any variations that can be considered by a person skilled in the art shall fall within the protection scope of the present application.

Claims (10)

1. A method of throttling a request, the method comprising:
analyzing request information of a client to obtain a target naming space, and determining an instance corresponding to the target naming space as a target instance in a plurality of instances according to the naming space of each instance;
determining a target current limiting strategy in a plurality of current limiting strategies according to the target naming space;
and determining a target current limiting operation according to the target current limiting strategy, and executing the target current limiting operation on a request corresponding to the request information by using a gateway so that the client accesses the target instance according to the target current limiting strategy.
2. The method of claim 1, wherein the determining a target current limit policy from the target namespace prior to determining a target current limit policy from a plurality of current limit policies further comprises:
acquiring a current limiting rule for each naming space respectively;
and configuring the current limiting strategy on the gateway according to the current limiting rule.
3. The method of claim 2, wherein the current limit rule comprises a current limit condition and a current limit operation;
wherein, the current limiting condition is: the current limiting parameter reaches a preset current limiting condition threshold;
wherein the current limiting operation is one of: directly releasing the request corresponding to the request information, adding the request information to a queuing queue, and rejecting the request corresponding to the request information.
4. The method according to claim 1, wherein the determining, according to the namespace of each instance, before determining, among the plurality of instances, that an instance corresponding to the target namespace is a target instance, further comprises:
and defining a naming space for each instance, and generating an instance list, wherein the instance list comprises each instance and the naming space corresponding to each instance.
5. The method according to claim 4, wherein determining, among the plurality of instances, that the instance corresponding to the target namespace is a target instance, specifically comprises:
according to the instance list, adding the instance and the name space corresponding to the instance into a routing list;
performing a polling operation on the routing list, wherein an instance in which one namespace is determined to be the target namespace in the routing list is determined to be the target instance;
and if no name space corresponding to the instance in the routing list is the target name space, generating abnormal information.
6. The method of claim 1, wherein the request information includes identity information of the client;
before the request information of the client is analyzed to obtain the target name space, the method further comprises the following steps:
authenticating the client according to the identity information;
if the authentication is not passed, rejecting the request corresponding to the request information and ending.
7. The method of claim 1, wherein the request information comprises a request address, wherein the request address comprises the gateway and the target namespace.
8. A requested current limiting device, the device comprising:
the first determining module is used for analyzing the request information of the client to obtain a target naming space, and determining an instance corresponding to the target naming space as a target instance in a plurality of instances;
the second determining module is used for determining a target current limiting strategy in a plurality of current limiting strategies according to the target name space;
and the execution module is used for determining a target current limiting operation according to the target current limiting strategy, and executing the target current limiting operation on a request corresponding to the request information by utilizing a gateway so that the client accesses the target instance according to the target current limiting strategy.
9. A storage medium having stored thereon a program or instructions which, when executed by a processor, implement the steps of the method of any of claims 1 to 7.
10. An electronic device comprising a storage medium, a processor and a computer program stored on the storage medium and executable on the processor, characterized in that the processor implements the method of any one of claims 1 to 7 when executing the program.
CN202210374356.6A 2022-04-11 2022-04-11 Request current limiting method and device, storage medium and electronic equipment Active CN114979273B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210374356.6A CN114979273B (en) 2022-04-11 2022-04-11 Request current limiting method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210374356.6A CN114979273B (en) 2022-04-11 2022-04-11 Request current limiting method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN114979273A CN114979273A (en) 2022-08-30
CN114979273B true CN114979273B (en) 2024-03-29

Family

ID=82976840

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210374356.6A Active CN114979273B (en) 2022-04-11 2022-04-11 Request current limiting method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN114979273B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108200038A (en) * 2017-12-28 2018-06-22 山东浪潮云服务信息科技有限公司 A kind of secure virtual machine means of defence, device, readable medium and storage control
CN110535777A (en) * 2019-08-12 2019-12-03 新华三大数据技术有限公司 Access request control method, device, electronic equipment and readable storage medium storing program for executing
CN112134954A (en) * 2020-09-22 2020-12-25 京东数字科技控股股份有限公司 Service request processing method and device, electronic equipment and storage medium
CN112437006A (en) * 2020-11-20 2021-03-02 北京百度网讯科技有限公司 Request control method and device based on API gateway, electronic equipment and storage medium
CN112995166A (en) * 2021-02-10 2021-06-18 北京金山云网络技术有限公司 Resource access authentication method and device, storage medium and electronic equipment
CN113645310A (en) * 2021-08-20 2021-11-12 北京高途云集教育科技有限公司 Data current limiting method and device, electronic equipment and readable storage medium
CN114143263A (en) * 2021-11-23 2022-03-04 浪潮通用软件有限公司 Method, device and medium for limiting current of user request

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2019441820B2 (en) * 2019-07-01 2022-05-19 Citrix Systems, Inc. Systems and methods for using namespaces to access computing resources

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108200038A (en) * 2017-12-28 2018-06-22 山东浪潮云服务信息科技有限公司 A kind of secure virtual machine means of defence, device, readable medium and storage control
CN110535777A (en) * 2019-08-12 2019-12-03 新华三大数据技术有限公司 Access request control method, device, electronic equipment and readable storage medium storing program for executing
CN112134954A (en) * 2020-09-22 2020-12-25 京东数字科技控股股份有限公司 Service request processing method and device, electronic equipment and storage medium
CN112437006A (en) * 2020-11-20 2021-03-02 北京百度网讯科技有限公司 Request control method and device based on API gateway, electronic equipment and storage medium
CN112995166A (en) * 2021-02-10 2021-06-18 北京金山云网络技术有限公司 Resource access authentication method and device, storage medium and electronic equipment
CN113645310A (en) * 2021-08-20 2021-11-12 北京高途云集教育科技有限公司 Data current limiting method and device, electronic equipment and readable storage medium
CN114143263A (en) * 2021-11-23 2022-03-04 浪潮通用软件有限公司 Method, device and medium for limiting current of user request

Also Published As

Publication number Publication date
CN114979273A (en) 2022-08-30

Similar Documents

Publication Publication Date Title
US9477528B2 (en) System and method for providing a rest-based management service in a traffic director environment
US7720464B2 (en) System and method for providing differentiated service levels to wireless devices in a wireless network
US9794227B2 (en) Automatic detection of authentication methods by a gateway
US8978100B2 (en) Policy-based authentication
AU2015289493B2 (en) Tiered connection pooling methods, systems and computer readable storage media
US8533724B1 (en) Virtual resource provisioning by assigning colors to virtual resources in multi-tenant resource pool
CN109688186B (en) Data interaction method, device, equipment and readable storage medium
CN112653681B (en) Multi-feature fusion user login access method, device and system
US10757089B1 (en) Mobile phone client application authentication through media access gateway (MAG)
CN111194035B (en) Network connection method, device and storage medium
EP3881574A1 (en) Methods and apparatuses for network function selection in 5g for a user
US9787678B2 (en) Multifactor authentication for mail server access
CN113630266B (en) Method and device for instantiating edge application server
CN110035128B (en) Live broadcast scheduling method and device, live broadcast system and storage medium
CN111935757B (en) Communication method and device
CN110891056A (en) HTTPS request authentication method and device, electronic equipment and storage medium
CN114979273B (en) Request current limiting method and device, storage medium and electronic equipment
CN112217910B (en) Video service access method, device, network equipment and storage medium
JP2023514779A (en) Managing network interception portals for network devices with persistent and non-persistent identifiers
US20230262558A1 (en) Ue route selection method and related products
CN109327517B (en) Method and equipment for acquiring network state of wireless access point
CN113014565A (en) Zero trust architecture for realizing port scanning prevention and service port access method and equipment
CN112398851B (en) Data processing method, data processing device, storage medium and electronic equipment
CN114338438B (en) Internet surfing behavior management method, system storage medium and equipment
US20240137269A1 (en) Method for instantiating edge application server and apparatus

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