CN117041046A - Dynamic flow adjustment method and system based on configuration - Google Patents

Dynamic flow adjustment method and system based on configuration Download PDF

Info

Publication number
CN117041046A
CN117041046A CN202311064526.1A CN202311064526A CN117041046A CN 117041046 A CN117041046 A CN 117041046A CN 202311064526 A CN202311064526 A CN 202311064526A CN 117041046 A CN117041046 A CN 117041046A
Authority
CN
China
Prior art keywords
service
application node
weight value
api gateway
adjusted
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.)
Pending
Application number
CN202311064526.1A
Other languages
Chinese (zh)
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.)
CITIC Aibank Corp Ltd
Original Assignee
CITIC Aibank Corp Ltd
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 CITIC Aibank Corp Ltd filed Critical CITIC Aibank Corp Ltd
Priority to CN202311064526.1A priority Critical patent/CN117041046A/en
Publication of CN117041046A publication Critical patent/CN117041046A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/0816Configuration setting characterised by the conditions triggering a change of settings the condition being an adaptation, e.g. in response to network events

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application relates to a dynamic flow adjustment method and system based on configuration, comprising setting service names of all services, monitoring IP, response performance deviation index and weight value to be adjusted in a monitoring system; setting weight values to be adjusted when each application node task starts to run and weight values to be adjusted when the task is completed; when the monitoring system identifies the weight value of the service to be adjusted, sending an adjustment request to an API gateway, and updating the service weight value of the application node corresponding to the service; when the application node executes the task, an adjustment request is sent to an API gateway, and the service weight value of the application node is updated; when the upstream system calls the API gateway, the API gateway routes the service request according to the current service weight value of the application node. The application further reduces the service overall usability reduction caused by the single application node processing performance fluctuation by improving the flow isolation refinement level of the API gateway.

Description

Dynamic flow adjustment method and system based on configuration
Technical Field
The present application relates to the field of computer technologies, and in particular, to a dynamic flow adjustment method and system based on configuration.
Background
In a financial information system, a distributed architecture is more and more popular, and under the distributed architecture system, a large number of information systems can be called mutually, a large number of enterprises adopt an API gateway mode to manage and control the calling among the systems, and a general distribution mode is to uniformly distribute flow based on the condition of a downstream response system.
The downstream application nodes of the distributed system can bear different tasks according to different conditions, namely, the calling processing capacity of each node can be different at the same time. According to the current API gateway flow distribution mode, only when a downstream system generates a large number of timeout requests, the API gateway isolates the flow, and then whether the application recovers performance is judged through detection and activation of a certain mechanism. The timeout time is usually set according to the timeliness requirement of the normal response of the calling scene, so that the mode belongs to the passive isolation measure after the call is damaged, and the service availability is affected.
Disclosure of Invention
In order to solve at least one of the above mentioned background technologies, the present application provides a configuration-based dynamic flow adjustment method and system, which effectively reduce the overall service availability decrease caused by the response performance change of a single application node by improving the flow isolation refinement level of an API gateway: (1) When the upstream system calls the API gateway, the API gateway distributes a weight routing service calling request of the upstream system according to the current corresponding flow according to the IP information which is sent when the downstream system registers the service. (2) The distribution weight parameters are exposed to the external interface by the API gateway, and the application service node and an external monitoring device can actively trigger the calling to realize dynamic adjustment.
In order to achieve the above object, the present application adopts the technical scheme that:
a dynamic flow adjustment method based on configuration, comprising:
setting service names of all services, monitoring IP, response performance deviation index and weight value to be adjusted in a monitoring system;
setting weight values to be adjusted when each application node task starts to run and weight values to be adjusted when the task is completed;
when the monitoring system identifies the weight value of the service to be adjusted, sending an adjustment request to an API gateway, and updating the service weight value of the application node corresponding to the service;
when the application node executes the task, an adjustment request is sent to an API gateway, and the service weight value of the application node is updated;
when the upstream system calls the API gateway, the API gateway routes the service request according to the current service weight value of the application node.
Further, the method further comprises: and when the service performance deviation meets the response performance deviation index, the monitoring system identifies that the service needs to adjust a weight value.
Further, the method further comprises: when the current service weight value of the application node is 1, uniformly routing the service request to each application node;
and when the current service weight value of the application node is 0, the service request is not routed to the application node.
Further, the method further comprises: and after the application node task is executed, the application node sends an adjustment request to an API gateway, and the service weight value of the application node is updated to be 1.
The application also relates to a dynamic flow adjustment system based on configuration, comprising:
the first setting module is used for setting service names, monitoring IPs, response performance deviation indexes and weight values to be adjusted of all services in the monitoring system;
the second setting module is used for setting weight values to be adjusted when the tasks of the application nodes start to run and weight values to be adjusted when the tasks are completed;
the first request module is used for sending an adjustment request to the API gateway when the monitoring system identifies the weight value to be adjusted of the service, and updating the service weight value of the application node corresponding to the service;
the second request module is used for sending an adjustment request to the API gateway when the application node executes the task of the application node, and updating the service weight value of the application node;
and the processing module is used for routing the service request according to the current service weight value of the application node by the API gateway when the upstream system calls the API gateway.
The application also relates to a computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, implements the above-mentioned method.
The application also relates to an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, which processor implements the above-mentioned method when executing the computer program.
The application also relates to a computer program product comprising a computer program and/or instructions, characterized in that the computer program and/or instructions, when executed by a processor, implement the steps of the above-mentioned method.
The beneficial effects of the application are as follows:
by improving the flow isolation refinement level of the API gateway, the service overall usability reduction caused by the response performance change of a single application node is effectively reduced: (1) When the upstream system calls the API gateway, the API gateway distributes a weight routing service calling request of the upstream system according to the current corresponding flow according to the IP information which is sent when the downstream system registers the service. (2) The distribution weight parameters are exposed to the external interface by the API gateway, and the application service node and an external monitoring device can actively trigger the calling to realize dynamic adjustment.
Drawings
FIG. 1 is a flow chart of a dynamic flow adjustment method based on configuration of the present application.
Fig. 2 is a schematic diagram illustrating the operation of a preferred embodiment of the present application.
FIG. 3 is a schematic diagram of a dynamic flow adjustment system based on configuration according to the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
It should be understood that throughout this specification and the claims, unless the context clearly requires otherwise, the words "comprise", "comprising", and the like, are to be construed in an inclusive sense as opposed to an exclusive or exhaustive sense; that is, it is the meaning of "including but not limited to".
It should also be appreciated that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. Furthermore, in the description of the present application, unless otherwise indicated, the meaning of "a plurality" is two or more.
It should be noted that the terms "S1", "S2", and the like are used for the purpose of describing the steps only, and are not intended to be construed to be specific as to the order or sequence of steps, nor are they intended to limit the present application, which is merely used to facilitate the description of the method of the present application, and are not to be construed as indicating the sequence of steps. In addition, the technical solutions of the embodiments may be combined with each other, but it is necessary to base that the technical solutions can be realized by those skilled in the art, and when the technical solutions are contradictory or cannot be realized, the combination of the technical solutions should be considered to be absent and not within the scope of protection claimed in the present application.
The first aspect of the present application relates to a dynamic flow adjustment method based on configuration, including:
setting service names of all services, monitoring IP, response performance deviation index and weight value to be adjusted in a monitoring system;
specifically, in the embodiment of the application, taking a credit order calling wind control system as an example, the credit order calling wind control system is mainly used for evaluating the risk of a credit business of a user, and the wind control system itself has a credit line adjustment and data cleaning batch task and can irregularly select one node to execute. The risk assessment interface of the wind control system is an important online service interface, so that the risk assessment interface is configured in the monitoring system, node weight dynamic adjustment is carried out according to deviation degree identification, data cleaning batch is identified as self service possibly causing performance influence, the weight value of a task execution node is reduced before starting, and the credit limit adjustment task is not identified, so that the configuration is not carried out.
Setting weight values to be adjusted when each application node task starts to run and weight values to be adjusted when the task is completed;
specifically, in the embodiment of the present application, the wind control system has three service nodes 192.168.1.1, 192.168.1.2 and 192.168.1.3, and the service weight is 1 in normal operation, and the api gateway uniformly routes the risk assessment interface of the credit order system to the three service nodes.
When the monitoring system identifies the weight value of the service to be adjusted, sending an adjustment request to an API gateway, and updating the service weight value of the application node corresponding to the service;
specifically, when the service performance deviation meets the response performance deviation index, the monitoring system identifies that the service needs to adjust a weight value.
When the application node executes the task, an adjustment request is sent to an API gateway, and the service weight value of the application node is updated;
when the upstream system calls the API gateway, the API gateway routes the service request according to the current service weight value of the application node.
Specifically, when the current service weight value of the application node is 1, uniformly routing the service request to each application node;
and when the current service weight value of the application node is 0, the service request is not routed to the application node.
And after the application node task is executed, the application node sends an adjustment request to an API gateway, and the service weight value of the application node is updated to be 1.
Specifically, in the embodiment of the present application, a data cleaning batch task is started at the node 192.168.1.1, the task actively sends a request to the API gateway to reduce the node weight to 0, and the API gateway routes the subsequent risk assessment interface service to 192.168.1.2 and 192.168.1.3, and does not route to 192.168.1.1.
The credit line adjustment task is initiated at node 192.168.1.3 because no weight adjustment is set, the routing policy of the API gateway is unchanged, and call requests to the risk assessment interface are routed evenly to 192.168.1.2 and 192.168.1.3.
Because the task occupies resources, the response time of the risk assessment interface of the 192.168.1.3 node is prolonged, the deviation degree set by the monitoring system is achieved, the monitoring system sends a weight value adjustment request to the API gateway, and the weight value of the risk assessment interface of the 192.168.1.3 node is adjusted to 0.5.
The API gateway routes the risk assessment interface of the credit order system to 192.168.1.2 and 192.168.1.3 nodes according to the ratio of 1:0.5 respectively according to the latest weight value.
The 192.168.1.3 node reduces the concurrent request quantity, the interface response time is prolonged, the interface response time is relieved, no service call exceeding the response timeliness requirement appears in the interface response time, and the system availability is not reduced.
The data cleaning task of the 192.168.1.2 node is completed, the node actively initiates a weight adjustment request to the API gateway to restore the weight to 1, and the routing ratio of the API gateway is changed to 1:1:0.5.
And (3) finishing the task of adjusting the credit limit of the 192.168.1.3 node, finding that the deviation degree of the risk assessment interface is eliminated by the monitoring system, recovering the weight of the 192.168.1.3 node to be 1, and changing the proportion of the API gateway route to be 1:1:1.
The application further reduces the possibility of influencing the scheduling due to the fluctuation of the processing performance of a single application node by improving the flow isolation refinement level of the API gateway.
Another aspect of the present application also relates to a dynamic flow adjustment system based on configuration, whose structure is shown in fig. 2, comprising:
the first setting module is used for setting service names, monitoring IPs, response performance deviation indexes and weight values to be adjusted of all services in the monitoring system;
the second setting module is used for setting weight values to be adjusted when the tasks of the application nodes start to run and weight values to be adjusted when the tasks are completed;
the first request module is used for sending an adjustment request to the API gateway when the monitoring system identifies the weight value to be adjusted of the service, and updating the service weight value of the application node corresponding to the service;
the second request module is used for sending an adjustment request to the API gateway when the application node executes the task of the application node, and updating the service weight value of the application node;
and the processing module is used for routing the service request according to the current service weight value of the application node by the API gateway when the upstream system calls the API gateway.
By using the system, the above-mentioned operation processing method can be executed and the corresponding technical effects can be achieved.
The embodiment of the present application also provides a computer-readable storage medium capable of implementing all the steps in the configuration-based dynamic flow adjustment method in the above embodiment, the computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements all the steps in the configuration-based dynamic flow adjustment method in the above embodiment.
The embodiment of the application also provides an electronic device for executing the method, which is used as an implementation device of the method, and at least comprises a processor and a memory, wherein the memory is particularly used for storing data and related computer programs required by executing the method, and the data and the programs in the memory are called by the processor to execute all the steps of the implementation method, so that the corresponding technical effects are obtained.
Preferably, the electronic device may comprise a bus architecture, and the bus may comprise any number of interconnected buses and bridges, the buses linking together various circuits, including the one or more processors and memory. The bus may also link together various other circuits such as peripheral devices, voltage regulators, power management circuits, etc., as are well known in the art and, therefore, will not be further described herein. The bus interface provides an interface between the bus and the receiver and transmitter. The receiver and the transmitter may be the same element, i.e. a transceiver, providing a unit for communicating with various other systems over a transmission medium. The processor is responsible for managing the bus and general processing, while the memory may be used to store data used by the processor in performing operations.
Additionally, the electronic device may further include a communication module, an input unit, an audio processor, a display, a power supply, and the like. The processor (or controllers, operational controls) employed may comprise a microprocessor or other processor device and/or logic devices that receives inputs and controls the operation of the various components of the electronic device; the memory may be one or more of a buffer, a flash memory, a hard drive, a removable medium, a volatile memory, a nonvolatile memory, or other suitable means, may store the above-mentioned related data information, may further store a program for executing the related information, and the processor may execute the program stored in the memory to realize information storage or processing, etc.; the input unit is used for providing input to the processor, and can be a key or a touch input device; the power supply is used for providing power for the electronic equipment; the display is used for displaying display objects such as images and characters, and may be, for example, an LCD display. The communication module is a transmitter/receiver that transmits and receives signals via an antenna. The communication module (transmitter/receiver) is coupled to the processor to provide an input signal and to receive an output signal, which may be the same as in the case of a conventional mobile communication terminal. Based on different communication technologies, a plurality of communication modules, such as a cellular network module, a bluetooth module, and/or a wireless local area network module, etc., may be provided in the same electronic device. The communication module (transmitter/receiver) is also coupled to the speaker and microphone via the audio processor to provide audio output via the speaker and to receive audio input from the microphone to implement the usual telecommunications functions. The audio processor may include any suitable buffers, decoders, amplifiers and so forth. In addition, the audio processor is also coupled to the central processor so that sound can be recorded on the host through the microphone and sound stored on the host can be played through the speaker.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a system for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks. While preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the application.
The foregoing is only a preferred embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions easily contemplated by those skilled in the art within the scope of the present application should be included in the scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims (8)

1. A dynamic flow adjustment method based on configuration, comprising:
setting service names of all services, monitoring IP, response performance deviation index and weight value to be adjusted in a monitoring system;
setting weight values to be adjusted when each application node task starts to run and weight values to be adjusted when the task is completed;
when the monitoring system identifies the weight value of the service to be adjusted, sending an adjustment request to an API gateway, and updating the service weight value of the application node corresponding to the service;
when the application node executes the task, an adjustment request is sent to an API gateway, and the service weight value of the application node is updated;
when the upstream system calls the API gateway, the API gateway routes the service request according to the current service weight value of the application node.
2. The method of claim 1, wherein the method further comprises: and when the service performance deviation meets the response performance deviation index, the monitoring system identifies that the service needs to adjust a weight value.
3. The method of claim 1, wherein the method further comprises: when the current service weight value of the application node is 1, uniformly routing the service request to each application node;
and when the current service weight value of the application node is 0, the service request is not routed to the application node.
4. The method of claim 1, wherein the method further comprises: and after the application node task is executed, the application node sends an adjustment request to an API gateway, and the service weight value of the application node is updated to be 1.
5. A dynamic flow adjustment system based on a configuration, comprising:
the first setting module is used for setting service names, monitoring IPs, response performance deviation indexes and weight values to be adjusted of all services in the monitoring system;
the second setting module is used for setting weight values to be adjusted when the tasks of the application nodes start to run and weight values to be adjusted when the tasks are completed;
the first request module is used for sending an adjustment request to the API gateway when the monitoring system identifies the weight value to be adjusted of the service, and updating the service weight value of the application node corresponding to the service;
the second request module is used for sending an adjustment request to the API gateway when the application node executes the task of the application node, and updating the service weight value of the application node;
and the processing module is used for routing the service request according to the current service weight value of the application node by the API gateway when the upstream system calls the API gateway.
6. A computer readable storage medium, characterized in that the storage medium has stored thereon a computer program which, when executed by a processor, implements the method of any of claims 1 to 4.
7. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of any of claims 1 to 4 when executing the computer program.
8. A computer program product comprising a computer program and/or instructions which, when executed by a processor, implement the steps of the method of any one of claims 1 to 4.
CN202311064526.1A 2023-08-23 2023-08-23 Dynamic flow adjustment method and system based on configuration Pending CN117041046A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311064526.1A CN117041046A (en) 2023-08-23 2023-08-23 Dynamic flow adjustment method and system based on configuration

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311064526.1A CN117041046A (en) 2023-08-23 2023-08-23 Dynamic flow adjustment method and system based on configuration

Publications (1)

Publication Number Publication Date
CN117041046A true CN117041046A (en) 2023-11-10

Family

ID=88622578

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311064526.1A Pending CN117041046A (en) 2023-08-23 2023-08-23 Dynamic flow adjustment method and system based on configuration

Country Status (1)

Country Link
CN (1) CN117041046A (en)

Similar Documents

Publication Publication Date Title
US10491535B2 (en) Adaptive data synchronization
CN108600005A (en) A method of defence micro services avalanche effect
WO2020259354A1 (en) Queue adjustment method, apparatus and device, and computer-readable storage medium
KR20070064669A (en) Efficient multiprocessor system and methods thereof
CN113055479A (en) Self-adaptive processing method, device and system for distributed service cluster load
CN113504974A (en) Service data load balancing method and device
CN111352719B (en) Transaction bookkeeping service data processing method, device and system
CN111858050A (en) Server cluster mixed deployment method, cluster management node and related system
CN115658098A (en) Upgrading method and device for distributed business processing system
US10382630B2 (en) Telecommunication service subscription integration system
CN110515728B (en) Server scheduling method and device, electronic equipment and machine-readable storage medium
CN111338905A (en) Application node data processing method and device
CN114257532A (en) Server side state detection method and device
CN111930624B (en) Test link message data processing method and device
CN114124962A (en) Multi-machine room message load balancing processing method and device
CN112396511B (en) Distributed wind control variable data processing method, device and system
CN112764919A (en) Distributed service self-adaptive load balancing method and device
CN111782260A (en) Gray scale distribution method and gray scale distribution device
CN117041046A (en) Dynamic flow adjustment method and system based on configuration
CN116185755A (en) Data processing method and device for distributed load balancing system
CN115562898A (en) Distributed payment system exception handling method and device
CN114595081A (en) Response type RPC calling method and system based on cache storage
CN113052691A (en) Distributed account checking system service balancing method, node and cluster
CN111930626A (en) Automatic testing method and device based on PaaS cloud service
CN112332947B (en) Data transmission method, mobile terminal and computer storage medium

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