CN117278394B - Gateway traffic migration method, device and system - Google Patents

Gateway traffic migration method, device and system Download PDF

Info

Publication number
CN117278394B
CN117278394B CN202311554453.4A CN202311554453A CN117278394B CN 117278394 B CN117278394 B CN 117278394B CN 202311554453 A CN202311554453 A CN 202311554453A CN 117278394 B CN117278394 B CN 117278394B
Authority
CN
China
Prior art keywords
target
gateway
tangential
server
flow
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
CN202311554453.4A
Other languages
Chinese (zh)
Other versions
CN117278394A (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.)
Jingdong Technology Information Technology Co Ltd
Original Assignee
Jingdong Technology Information Technology Co 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 Jingdong Technology Information Technology Co Ltd filed Critical Jingdong Technology Information Technology Co Ltd
Priority to CN202311554453.4A priority Critical patent/CN117278394B/en
Publication of CN117278394A publication Critical patent/CN117278394A/en
Application granted granted Critical
Publication of CN117278394B publication Critical patent/CN117278394B/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
    • 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/0889Techniques to speed-up the configuration process
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
    • 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/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
    • 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/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering

Landscapes

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

Abstract

The application discloses a gateway traffic migration method, device and system, and relates to the technical field of traffic scheduling. One embodiment of the method comprises the following steps: in response to detecting the gateway data migration instruction, migrating gateway data of the old gateway to the new gateway; acquiring target tangential flow information in response to determining that gateway data migration is completed; and sending the target tangential information to the tangential server so that the tangential server generates and loads a configuration file based on the target tangential information. The embodiment realizes flexible configuration of the tangential flow strategy and saves configuration cost.

Description

Gateway traffic migration method, device and system
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method, an apparatus, and a system for gateway traffic migration.
Background
The gateway fusion under the high concurrency scene needs to migrate the traffic to the scene of a new gateway, and most of the technologies used in the market at present use a load layer of nginx to make manual modification, directly drive the traffic into the new gateway, or use a new address by the new gateway, so that clients replace the gateway address with the new gateway address in batches.
The gateway traffic migration process has overlarge risk, traffic forwarding is directly carried out on the load layer, a gray scale process is lacked, and if the traffic migration process has a request error reporting condition, the traffic is required to be switched back to an old gateway, the load layer is required to be manually modified, and the time cost is huge. Likewise, significant time costs are incurred if the client is allowed to modify the gateway address migration.
Disclosure of Invention
The embodiment of the application provides a gateway traffic migration method, device, system, equipment and storage medium.
According to a first aspect, an embodiment of the present application provides a gateway traffic migration method, including: in response to detecting the gateway data migration instruction, migrating gateway data of the old gateway to the new gateway; acquiring target tangential flow information in response to determining that gateway data migration is completed; and sending the target tangential information to the tangential server so that the tangential server generates and loads a configuration file based on the target tangential information.
According to a second aspect, an embodiment of the present application provides a gateway traffic migration method, including: generating a configuration file based on the target tangential information in response to receiving the target tangential information sent by the control tangential server; and loading the configuration file.
According to a third aspect, an embodiment of the present application provides a gateway traffic migration apparatus, including: a detection module configured to migrate gateway data of the old gateway to the new gateway in response to detecting the gateway data migration instruction; an acquisition module configured to acquire target tangential flow information in response to determining that gateway data migration is complete; and the generating module is configured to send the target tangential information to the tangential server so that the tangential server generates and loads the configuration file based on the target tangential information.
According to a fourth aspect, an embodiment of the present application provides a gateway traffic migration apparatus, including: a configuration module configured to generate a configuration file based on the target cut information in response to receiving the target cut information sent by the control cut server; and the loading module is configured to load the configuration file.
According to a fifth aspect, an embodiment of the present application provides a gateway traffic migration system, including: a control tangential flow server for executing the gateway traffic migration method of any embodiment of the first aspect; and the tangential flow server is used for executing the gateway traffic migration method of any embodiment of the second aspect.
According to a sixth aspect, embodiments of the present application provide an electronic device comprising one or more processors; and a storage device having one or more programs stored thereon, which when executed by the one or more processors, cause the one or more processors to implement a gateway traffic migration method as in any embodiment of the first or second aspects.
According to a seventh aspect, embodiments of the present application provide a computer readable medium having stored thereon a computer program which when executed by a processor implements a gateway traffic migration method as in any of the embodiments of the first or second aspects.
In response to detecting a gateway data migration instruction, migrating gateway data of an old gateway to a new gateway; acquiring target tangential flow information in response to determining that gateway data migration is completed; and the target tangential information is sent to the tangential server, so that the tangential server generates and loads a configuration file based on the target tangential information, and the flexible configuration of the tangential strategy is realized and the configuration cost is saved in the gateway upgrading process.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
FIG. 1 is an exemplary system architecture diagram in which the present application may be applied;
FIG. 2a is a flow chart of one embodiment of a gateway traffic migration method according to the present application;
FIG. 2b is a schematic diagram of yet another embodiment of a gateway traffic migration method according to the present application;
FIG. 3 is a flow chart of yet another embodiment of a gateway traffic migration method according to the present application;
FIG. 4 is a flow chart of one embodiment of a gateway traffic migration apparatus according to the present application;
FIG. 5 is a flow chart of yet another embodiment of a gateway traffic migration apparatus according to the present application;
FIG. 6a is a flow chart of one embodiment of a gateway traffic migration system according to the present application;
FIG. 6b is a schematic diagram of one embodiment of a gateway traffic migration system according to the present application;
FIG. 7 is a schematic diagram of a computer system suitable for use in implementing embodiments of the present application.
Detailed Description
Exemplary embodiments of the present application are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present application to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It should be noted that, in the case of no conflict, the embodiments and features in the embodiments may be combined with each other. The present application will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 illustrates an exemplary system architecture 100 to which embodiments of gateway traffic migration methods of the present application may be applied.
As shown in fig. 1, the system architecture 100 may include a control tangential server 101, a network 102, and tangential servers 103, 104. The network 102 is used to provide a medium for communication links between the control of the tangential server 101 and the tangential servers 103, 104. Network 102 may include various connection types such as wired, wireless communication links, or fiber optic cables, among others.
The tangential servers 103, 104 interact with the control tangential server 101 through the network 102 to receive the target tangential information sent by the control tangential server 101 and generate a configuration file based on the target tangential information.
Wherein the control tangential server 101 may be a server providing various services, for example, migrating gateway data of an old gateway to a new gateway in response to detecting a gateway data migration instruction; acquiring target tangential flow information in response to determining that gateway data migration is completed; and sending the target tangential information to the tangential server so that the tangential server generates and loads a configuration file based on the target tangential information.
The tangential servers 103, 104 may be servers providing various services, for example, generating a configuration file based on the target tangential information in response to receiving the target tangential information transmitted by the control tangential server; and loading the configuration file.
It should be understood that the control of the number of tangential servers and tangential servers in fig. 1 is merely illustrative. There may be any number of source devices, intermediate devices, exit devices, and servers, as desired for implementation.
Fig. 2a shows a flow 200 of an embodiment of a gateway traffic migration method that may be applied to the present application. In this embodiment, the gateway traffic migration method is applied to control a tangential flow server, and specifically includes the following steps:
in response to detecting the gateway data migration instruction, the gateway data of the old gateway is migrated to the new gateway, step 201.
In this embodiment, the executing entity (such as the control-tangential server 101 shown in fig. 1) may monitor the gateway data migration instructions in real time or periodically, and migrate the gateway data of the old gateway to the new gateway in response to monitoring the gateway data migration instructions.
The execution body may first determine whether the data structures of the new gateway and the old gateway are matched, if so, may directly migrate the gateway data of the old gateway to the new gateway, and if not, may perform data structure conversion on the gateway data of the old gateway, and migrate the converted data to the new gateway.
In some alternatives, migrating gateway data of the old gateway to the new gateway includes: responding to the fact that the data structures of the new gateway and the old gateway are not matched, and performing data structure conversion on the gateway data of the old gateway to obtain an API description file of the new gateway; based on the API description, the gateway data of the old gateway is migrated to the new gateway.
In this implementation manner, the execution body may receive a data migration instruction input by a user through the migration management and control platform, in response to receiving the data migration instruction, the execution body may determine whether the data structures of the new gateway and the old gateway are matched, if not, may use programming languages, such as Python, MVEL2.0 expression languages, etc., capable of implementing data structure conversion in the existing technology or future development technology, perform data structure conversion on gateway data of the old gateway, obtain an API (Application Programming Interface ) description file of the new gateway, send the API description file to the new gateway console in a Message Queue (MQ) form, control the new gateway console to parse the API description file, insert parsed data into a database of the new gateway, and automatically trigger deployment logic to complete compatibility migration of data.
The migration management and control platform is a webpage presented to a user, is connected with a data source of the old gateway, can inquire the data of the old gateway, and receives a data migration instruction input by the user.
Here, the MVEL2.0 expression is custom filled and can be used as a medium for converting old gateway data into a data structure suitable for new gateway storage.
The implementation mode is to obtain an API description file of the new gateway by converting the data structure of the gateway data of the old gateway in response to the fact that the data structures of the new gateway and the old gateway are not matched; based on the API description file, the gateway data of the old gateway is migrated to the new gateway, so that the rapid migration of the gateway data is realized when the data structures of the new gateway and the old gateway are not matched.
In some alternatives, migrating gateway data of the old gateway to the new gateway based on the API description file includes: verifying the pre-release environment of the API description file; and responding to the verification, analyzing the API description file, and inserting the analysis result into a database of the new gateway.
In the implementation manner, after the execution main body obtains the API description file of the new gateway, the execution main body responds to the received instruction of pre-issuing verification input by a user through a console of the new gateway, verifies the API description file in a pre-issuing environment, analyzes the API description file if the verification is passed, and inserts the analysis result into a database of the new gateway so as to realize the pretty capacity migration of data.
The new gateway console can be presented to the user in the form of a webpage and is used for receiving the instructions of prefeeded streaming and prefeeded verification input by the user.
The realization mode carries out verification of the pre-release environment on the API description file; and in response to the verification passing, analyzing the API description file, and inserting an analysis result into a database of a new gateway, so that the verification of the gateway data migration prefire environment is realized, and the data migration risk is reduced.
In step 202, in response to determining that the gateway data migration is complete, target tangential flow information is obtained.
In this embodiment, in response to determining that the gateway data migration is complete, the execution body may obtain the target tangential flow information via the tangential flow tool management platform.
The target tangential flow information comprises a target tangential flow strategy and parameters corresponding to the target tangential flow strategy.
Here, the tangential tool control platform may present a specified form for the user to determine the target tangential policy and the corresponding parameters, where the specified form may further include: method name, method description, tangential environment, current state, interface URL (Uniform Resource Locator ), etc.
The target traffic policy may be set according to actual requirements, for example, all flows into the old gateway, the traffic percentage of the new and old gateways, the white list IP traffic, etc., which is not limited in this application.
Specifically, as shown in fig. 2b, the target cut policy is a whitelist IP cut, and parameters corresponding to the target cut policy are: 111.202.148.47,111.202.148.48.
In some alternatives, the target tangential flow strategy may include at least one of: all flows into old gateway, all flows into new gateway, specified equipment number cut flow, white list IP cut flow, new and old gateway split flow percentage, cut flow according to time window.
In this implementation manner, the user may determine, through a specified form presented by the tangential tool management platform for determining the target tangential policy and the corresponding parameters, at least one of the following tangential policies as the target tangential policy: all flows into old gateway, all flows into new gateway, specified equipment number cut flow, white list IP cut flow, new and old gateway split flow percentage, cut flow according to time window.
Here, if the target cut policy is a white list IP cut, the executing body may acquire the cut IP configured by the user through the specified form, and use the cut IP configured by the user as a parameter corresponding to the target cut policy; if the target policy is the diversion percentage of the new gateway and the old gateway, the execution main body can acquire the flow which is configured by the user through the specified form and flows to the new gateway/the flow which flows to the old gateway accounts for the percentage of the total flow, and takes the diversion percentage configured by the user as the parameter corresponding to the target diversion policy; if the target streaming policy is streaming according to the time window, the execution subject may acquire the window start time and the window end time configured by the user through the specified form, and take the window start time and the window end time configured by the user as parameters corresponding to the target streaming policy.
The implementation includes at least one of the following by configuring the target tangential flow strategy: the flow flows into the old gateway, the new gateway, the appointed equipment number, the white list IP flow, the new gateway and the old gateway flow dividing percentage, and the flow dividing according to the time window, thereby improving the flow dividing flexibility and the effectiveness.
And step 203, the target tangential information is sent to the tangential server, so that the tangential server generates and loads a configuration file based on the target tangential information.
In this embodiment, the execution body may encapsulate the target tangential information into a tangential instruction, for example, a json form, and send the tangential instruction to the tangential server, where the tangential server may parse the tangential instruction after receiving the tangential instruction to obtain the target tangential information.
Further, under the specified instruction of the tangential server, a plurality of Lua scripts corresponding to different tangential policies, namely Lua algorithm scripts, may be preconfigured, where each tangential policy corresponds to one Lua algorithm script, the Lua algorithm scripts corresponding to different tangential policies are different, and in response to obtaining the target tangential information, the tangential server may generate a configuration file based on the target tangential information and automatically record the configuration file, and specifically includes: and switching the Lua script under the specified instruction into a target Lua script corresponding to the target tangential flow strategy, and assigning a value to a variable in the target Lua script based on a parameter corresponding to the target tangential flow strategy.
In which Lua is a lightweight and compact scripting language, written in standard C language and open in source code, designed to be embedded in an application program, thereby providing flexible extension and customization functions for the application program.
The streaming server may be a server for streaming in the prior art or in future development technologies, e.g., nmginx, which is a high-performance HTTP and reverse proxy web server, while also providing IMAP (Internet Mail Access Protocol, interactive mail access protocol)/POP 3 (Post Office Protocol-Version 3, post office protocol Version 3)/SMTP (Simple Mail Transfer Protocol ) services.
The specified instruction is a block-level instruction for matching different URL requests, e.g., location in ng ix.
For the tangential server, after loading the configuration file, responding to the acquired flow to be migrated, judging the flow to be migrated based on the specified instruction and the target Lua script, if the condition of the flow to the new gateway determined based on the target Lua script is met, transmitting the flow to the new gateway, namely a group of back-end server clusters of the new gateway, and if the condition of the flow to the new gateway is not met, transmitting the flow to the upstream of the old gateway, namely determining the flow distribution direction through the target Lua script.
Here, it should be noted that, before the execution subject sends the target cut-stream information to the cut-stream server, the execution subject may perform verification of the pre-release environment for the target cut-stream information, and in response to the verification passing, send the target cut-stream information to the cut-stream server, so that the cut-stream server generates and loads a configuration file based on the target cut-stream information.
In some alternatives, before sending the target cut information to the cut server, the method further comprises: verifying a pre-release environment for the target tangential information; and transmitting the target tangential information to a tangential server in response to the verification passing.
In the implementation manner, after obtaining the target tangential information, the executing body responds to receiving a pre-issuing and streaming command input by a user through a console of the new gateway to verify the pre-issuing environment of the target tangential information, and if the target tangential information passes the verification, the executing body sends the target tangential information to the tangential server.
The new gateway console can be presented to the user in the form of a webpage and is used for receiving the instructions of prefeeded streaming and prefeeded verification input by the user.
The realization mode carries out verification of the pre-release environment on the target tangential information; and in response to the verification, the target tangential information is sent to the tangential server, so that the verification of the target tangential information prefoaming environment is realized, and the flow migration risk is reduced.
Fig. 3 illustrates a flow 300 of an embodiment of a gateway traffic migration method that may be applied to the present application. In this embodiment, the gateway traffic migration method is applied to a tangential flow server, and specifically includes the following steps:
in step 301, in response to receiving the target cut information sent by the control cut server, a configuration file is generated based on the target cut information.
In this embodiment, the executing body (such as the tangential servers 103 and 104 shown in fig. 1) may monitor, in real time or periodically, the target tangential information sent by the tangential server, and in response to receiving the target tangential information, may generate a configuration file based on the target tangential information, which specifically includes: and switching the Lua script under the specified instruction into a target Lua script corresponding to the target tangential flow strategy, and assigning a value to a variable in the target Lua script based on a parameter corresponding to the target tangential flow strategy.
Here, it should be noted that, after the execution body acquires the target tangential information, the execution body may save the target tangential information and the specified instruction corresponding to the target tangential information to the local memory, so as to increase data stability.
Specifically, if the target cut policy is white list IP cut, namely according to the appointed IP cut, IP information is stored, and assignment is carried out on the variable of the target Lua script based on the IP information; if the target flow cutting strategy is to cut flow according to the time window, saving the window starting time and the window ending time, and assigning the variable of the target Lua script based on the window starting time and the window ending time.
Step 302, a configuration file is loaded.
In this embodiment, after the execution body generates the configuration file, the execution body may load the configuration file automatically through a load instruction, that is, load the configuration file through a hot restart mode.
In some alternatives, the method further comprises: and determining the flow direction of the flow to be migrated based on the specified instruction and the target Lua script in response to the acquired flow to be migrated.
In this implementation manner, after loading the configuration file, the executing body may determine the flow to be migrated based on the specified instruction and the target Lua script in response to obtaining the flow to be migrated, if the condition of flowing to the new gateway determined based on the target Lua script is met, the flow is transmitted to the up stream of the new gateway, if the condition of flowing to the new gateway is not met, the flow is transmitted to the up stream of the old gateway, that is, the direction of flow distribution is determined by the target Lua script.
According to the implementation method, the flow direction of the flow to be migrated is determined based on the specified instruction and the target Lua script in response to the flow to be migrated, so that flexible migration of the gateway flow is realized.
With further reference to fig. 4, as an implementation of the method shown in the foregoing figures, the present application provides an embodiment of a gateway traffic migration apparatus, where an embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 2, and the apparatus may be specifically applied to control a tangential flow server.
As shown in fig. 4, the gateway traffic migration apparatus 400 of the present embodiment includes: a detection module 401, an acquisition module 402 and a generation module 403.
Wherein the detection module 401 may be configured to migrate gateway data of the old gateway to the new gateway in response to detecting the gateway data migration instruction.
The acquisition module 402 may be configured to acquire the target cut flow information in response to determining that the gateway data migration is complete.
The generating module 403 may be configured to send the target tangential information to the tangential server, so that the tangential server generates and loads a configuration file based on the target tangential information.
In some optional manners of this embodiment, the detection module is further configured to perform data structure conversion on gateway data of the old gateway to obtain an API description file of the new gateway in response to determining that the data structures of the new gateway and the old gateway are not matched; based on the API description, the gateway data of the old gateway is migrated to the new gateway.
In some optional manners of this embodiment, the detection module is further configured to perform verification of the pre-release environment on the API description file; and responding to the verification passing, analyzing the API description file, and inserting the analysis result into a database of the new gateway.
In some optional manners of this embodiment, the apparatus further includes a verification module configured to verify a pre-release environment for the target tangential information; and transmitting the target tangential information to a tangential server in response to the verification passing.
In some alternatives of this embodiment, the target tangential flow strategy may comprise at least one of: all flows into old gateway, all flows into new gateway, specified equipment number cut flow, white list IP cut flow, new and old gateway split flow percentage, cut flow according to time window.
With further reference to fig. 5, as an implementation of the method shown in the foregoing figures, the present application provides an embodiment of a gateway traffic migration apparatus, where an embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 3, and the apparatus may be specifically applied to a tangential flow server.
As shown in fig. 5, the gateway traffic migration apparatus 500 of the present embodiment includes: a configuration module 501 and a loading module 502.
Wherein the configuration module 501 may be configured to generate a configuration file based on the target cut information in response to receiving the target cut information sent by the control cut server.
The loading module 502 may be configured to load a configuration file.
In some optional manners of this embodiment, the apparatus further includes a diversion module configured to determine, in response to obtaining the traffic to be migrated, a flow direction of the traffic to be migrated based on the specified instruction and the target Lua script.
With further reference to fig. 6a, one embodiment of a gateway traffic migration system is provided.
In this embodiment, the system includes a control tangential server 601 and a tangential server 602.
Wherein the tangential server 601 is controlled to perform the gateway traffic migration method as described in the above embodiment 2. The tangential server 602 is configured to perform the gateway traffic migration method described in embodiment 3 above.
It should be understood that the control of the tangential servers 601 in fig. 6a, the number of tangential servers 602 is merely illustrative. There may be any number of control and cut servers, as desired for implementation.
In one specific example, as shown in fig. 6b, the control-tangential server migrates gateway data of the old gateway to the new gateway in response to detecting a gateway data migration instruction. And responding to the completion of gateway data migration, and acquiring target tangential flow information, wherein the target tangential flow information comprises a target tangential flow strategy and corresponding parameters. The target cut information is packaged into a cut instruction and sent to a cut server nginnx, for example jen1 for newly added cut and jen for newly added cut. Specifically, the control tangential server sends a tangential command to jen1, sends a tangential command to jen, and after receiving the tangential command, the tangential server analyzes the tangential command to obtain a target tangential policy and a corresponding parameter, for example, the target tangential policy is a new gateway and old gateway shunting percentage, the parameter corresponding to the target tangential policy is 40%, that is, 40% of the traffic flows to the new gateway, and 60% of the traffic flows to the old gateway.
Here, it should be noted that, before the control cut-flow server sends the target cut-flow instruction to the cut-flow server, the control cut-flow server may perform verification of the pre-issue environment on the target cut-flow instruction by using the pre-issue domain name (e.g., the control cut-flow server may send the cut-flow instruction of the pre-issue environment to the JEN, after receiving the cut-flow instruction, the JEN parses the cut-flow instruction to obtain the target cut-flow policy and the corresponding parameters, the JEN may determine the to-be-migrated flow based on the location and the target Lua script, if the to-be-migrated flow meets the condition that the to-be-migrated flow is determined based on the target Lua script, i.e., if the to-be-migrated flow is the flow meeting the target cut-flow policy, for example, 40% of the flow flows to the new gateway, then the to-be-migrated flow is transmitted to the new gateway, if the to-be-migrated flow is not meeting the target cut-flow policy, then the to the old gateway is transmitted to the gateway, if the verification is passed, and the cut-flow is sent to the cut-flow server to the gateway to the production environment by using the domain name.
Further, based on the target tangential information, generating and loading a configuration file, which specifically comprises: and switching the Lua script under a specified instruction (such as location) into a target Lua script corresponding to the target tangential flow strategy, and assigning a value to a variable in the target Lua script based on a parameter corresponding to the target tangential flow strategy.
Further, in response to obtaining the traffic to be migrated from the LB (load balancing device), the traffic to be migrated may be determined based on the location and the target Lua script, if the traffic to be migrated meets the condition of flowing to the new gateway determined based on the target Lua script, that is, the traffic to be migrated is the traffic meeting the target tangential policy, the traffic to be migrated is transmitted to the upstream (such as the JEN new gateway) of the new gateway, if the traffic to be migrated is not the traffic meeting the target tangential policy, the traffic to be migrated is transmitted to the upstream (such as the JEN machine room A, JEN machine room B) of the old gateway, that is, the direction of traffic distribution is determined by the target Lua script.
The JEN new gateway corresponds to the new gateway, the JEN machine room A, JEN machine room B corresponds to the old gateway, and the traffic to be migrated from the LB can come from a client APP, web, applet and the like.
According to embodiments of the present application, an electronic device and a readable storage medium are also provided.
As shown in fig. 7, a block diagram of an electronic device according to a gateway traffic migration method according to an embodiment of the present application is shown.
700 is a block diagram of an electronic device of a gateway traffic migration method according to an embodiment of the present application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the application described and/or claimed herein.
As shown in fig. 7, the electronic device includes: one or more processors 701, memory 702, and interfaces for connecting the various components, including high-speed interfaces and low-speed interfaces. The various components are interconnected using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions executing within the electronic device, including instructions stored in or on memory to display graphical information of the GUI on an external input/output device, such as a display device coupled to the interface. In other embodiments, multiple processors and/or multiple buses may be used, if desired, along with multiple memories and multiple memories. Also, multiple electronic devices may be connected, each providing a portion of the necessary operations (e.g., as a server array, a set of blade servers, or a multiprocessor system). One processor 701 is illustrated in fig. 7.
Memory 702 is a non-transitory computer-readable storage medium provided herein. The memory stores instructions executable by the at least one processor to cause the at least one processor to perform the gateway traffic migration method provided herein. The non-transitory computer readable storage medium of the present application stores computer instructions for causing a computer to perform the gateway traffic migration methods provided herein.
The memory 702 is used as a non-transitory computer readable storage medium, and may be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules (e.g., the detection module 401, the acquisition module 402, and the generation module 403 shown in fig. 4) corresponding to the gateway traffic migration method in the embodiments of the present application. The processor 701 executes various functional applications of the server and data processing by running non-transitory software programs, instructions, and modules stored in the memory 702, i.e., implements the gateway traffic migration method in the method embodiments described above.
Memory 702 may include a storage program area that may store an operating system, at least one application program required for functionality, and a storage data area; the storage data area may store data created by the use of the gateway traffic migrated electronic device, and the like. In addition, the memory 702 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory 702 may optionally include memory located remotely from processor 701, which may be connected to gateway traffic migrating electronic devices through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The electronic device of the gateway traffic migration method may further include: an input device 703 and an output device 704. The processor 701, the memory 702, the input device 703 and the output device 704 may be connected by a bus or otherwise, in fig. 7 by way of example.
The input device 703 may receive input digital or character information such as a touch screen, a keypad, a mouse, a track pad, a touch pad, a pointer stick, one or more mouse buttons, a track ball, a joystick, and the like. The output device 704 may include a display apparatus, auxiliary lighting devices (e.g., LEDs), and haptic feedback devices (e.g., vibration motors), among others. The display device may include, but is not limited to, a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display, and a plasma display. In some implementations, the display device may be a touch screen.
Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, application specific ASIC (application specific integrated circuit), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
These computing programs (also referred to as programs, software applications, or code) include machine instructions for a programmable processor, and may be implemented in a high-level procedural and/or object-oriented programming language, and/or in assembly/machine language. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, programmable Logic Devices (PLDs)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
According to the technical scheme of the embodiment of the application, the flexible configuration of the tangential flow strategy is realized in the gateway upgrading process, and the configuration cost is saved.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present application may be performed in parallel, sequentially, or in a different order, provided that the desired results of the technical solutions disclosed in the present application can be achieved, and are not limited herein.
The above embodiments do not limit the scope of the application. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application are intended to be included within the scope of the present application.

Claims (12)

1. A gateway traffic migration method applied to a control tangential flow server, the method comprising:
in response to detecting the gateway data migration instruction, migrating gateway data of the old gateway to the new gateway;
responding to the completion of gateway data migration, and acquiring target tangential information, wherein the target tangential information comprises a target tangential strategy and parameters corresponding to the target tangential strategy;
the target tangential information is sent to a tangential server, so that the tangential server generates and loads a configuration file based on the target tangential information, wherein the generating the configuration file based on the target tangential information comprises the following steps: and switching the Lua script under the specified instruction into a target Lua script corresponding to the target tangential flow strategy, and assigning values to variables in the target Lua script based on parameters corresponding to the target tangential flow strategy, wherein the specified instruction is a block-level instruction for matching different URL requests.
2. The method of claim 1, wherein the migrating gateway data of the old gateway to the new gateway comprises:
responding to the fact that the data structures of the new gateway and the old gateway are not matched, and performing data structure conversion on gateway data of the old gateway to obtain an API description file of the new gateway;
and migrating the gateway data of the old gateway to the new gateway based on the API description file.
3. The method of claim 2, wherein the migrating gateway data of the old gateway to the new gateway based on the API description file comprises:
verifying the pre-release environment of the API description file;
and responding to the verification, analyzing the API description file, and inserting the analysis result into a database of the new gateway.
4. The method of claim 1, prior to the sending the target cut information to a cut server, the method further comprising:
verifying the pre-release environment of the target tangential information;
and transmitting the target tangential information to a tangential server in response to the verification passing.
5. The method of any of claims 1-4, wherein the target tangential flow strategy comprises at least one of: all flows into old gateway, all flows into new gateway, specified equipment number cut flow, white list IP cut flow, new and old gateway split flow percentage, cut flow according to time window.
6. A gateway traffic migration method applied to a tangential flow server, the method comprising:
and generating a configuration file based on the target cut information, wherein the configuration file comprises the following components: switching a Lua script under a specified instruction into a target Lua script corresponding to a target tangential flow strategy, and assigning a variable in the target Lua script based on a parameter corresponding to the target tangential flow strategy, wherein the specified instruction is a block-level instruction for matching different URL requests, and the target tangential flow information comprises the target tangential flow strategy and the parameter corresponding to the target tangential flow strategy;
and loading the configuration file.
7. The method of claim 6, the method further comprising:
and responding to the acquired flow to be migrated, and determining the flow direction of the flow to be migrated based on the specified instruction and the target Lua script.
8. A gateway traffic migration apparatus for controlling a tangential flow server, the apparatus comprising:
a detection module configured to migrate gateway data of the old gateway to the new gateway in response to detecting the gateway data migration instruction;
the acquisition module is configured to respond to the determination that the gateway data migration is completed, and acquire target tangential information, wherein the target tangential information comprises a target tangential strategy and parameters corresponding to the target tangential strategy;
the generating module is configured to send the target tangential information to a tangential server, so that the tangential server generates and loads a configuration file based on the target tangential information, wherein the generating the configuration file based on the target tangential information comprises: and switching the Lua script under the specified instruction into a target Lua script corresponding to the target tangential flow strategy, and assigning values to variables in the target Lua script based on parameters corresponding to the target tangential flow strategy, wherein the specified instruction is a block-level instruction for matching different URL requests.
9. A gateway traffic migration apparatus for use with a tangential flow server, the apparatus comprising:
a configuration module configured to generate a configuration file based on target cut information sent by a control cut server in response to receiving the target cut information, comprising: switching a Lua script under a specified instruction into a target Lua script corresponding to a target tangential flow strategy, and assigning a variable in the target Lua script based on a parameter corresponding to the target tangential flow strategy, wherein the specified instruction is a block-level instruction for matching different URL requests, and the target tangential flow information comprises the target tangential flow strategy and the parameter corresponding to the target tangential flow strategy;
and the loading module is configured to load the configuration file.
10. A gateway traffic migration system, the system comprising: controlling a tangential server, the tangential server,
said control tangential server for performing the method according to one of claims 1-5;
the tangential server being adapted to perform the method according to one of claims 6-7.
11. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.
12. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-7.
CN202311554453.4A 2023-11-21 2023-11-21 Gateway traffic migration method, device and system Active CN117278394B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311554453.4A CN117278394B (en) 2023-11-21 2023-11-21 Gateway traffic migration method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311554453.4A CN117278394B (en) 2023-11-21 2023-11-21 Gateway traffic migration method, device and system

Publications (2)

Publication Number Publication Date
CN117278394A CN117278394A (en) 2023-12-22
CN117278394B true CN117278394B (en) 2024-04-05

Family

ID=89201188

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311554453.4A Active CN117278394B (en) 2023-11-21 2023-11-21 Gateway traffic migration method, device and system

Country Status (1)

Country Link
CN (1) CN117278394B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022117550A1 (en) * 2020-12-03 2022-06-09 Koninklijke Kpn N.V. Migration of remote data processing between servers
CN114826824A (en) * 2022-04-01 2022-07-29 阿里云计算有限公司 Traffic migration method, device, medium and product
US11520605B1 (en) * 2022-05-25 2022-12-06 Kong Inc. Dynamically reordering plugin execution order at an API gateway of a microservices application
WO2023134627A1 (en) * 2022-01-13 2023-07-20 中兴通讯股份有限公司 Data migration methods and apparatuses, electronic device, and storage medium
CN116777599A (en) * 2023-06-21 2023-09-19 招商银行股份有限公司 Service decision method, device, terminal equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210389976A1 (en) * 2020-06-11 2021-12-16 Capital One Services, Llc Techniques to facilitate a migration process to cloud storage

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022117550A1 (en) * 2020-12-03 2022-06-09 Koninklijke Kpn N.V. Migration of remote data processing between servers
WO2023134627A1 (en) * 2022-01-13 2023-07-20 中兴通讯股份有限公司 Data migration methods and apparatuses, electronic device, and storage medium
CN114826824A (en) * 2022-04-01 2022-07-29 阿里云计算有限公司 Traffic migration method, device, medium and product
US11520605B1 (en) * 2022-05-25 2022-12-06 Kong Inc. Dynamically reordering plugin execution order at an API gateway of a microservices application
CN116777599A (en) * 2023-06-21 2023-09-19 招商银行股份有限公司 Service decision method, device, terminal equipment and storage medium

Also Published As

Publication number Publication date
CN117278394A (en) 2023-12-22

Similar Documents

Publication Publication Date Title
US11178207B2 (en) Software version control without affecting a deployed container
US10574523B2 (en) Systems and methods for cloud-deployments with imperatives
US10333784B2 (en) Cloud system order and configuration using customized templates
US10430172B2 (en) Re-configuration in cloud computing environments
US11645582B2 (en) Parameter sharing in federated learning
US20170262355A1 (en) Debugging applications
US20170373999A1 (en) Familiarity-based involvement on an online group conversation
CN111770176B (en) Traffic scheduling method and device
CN111885114B (en) Method, device and storage medium for upgrading application program interface module in gateway
CN112925652A (en) Application resource deployment method, device, electronic equipment and medium
US11349729B2 (en) Network service requests
CN111767149B (en) Scheduling method, device, equipment and storage equipment
CN117278394B (en) Gateway traffic migration method, device and system
US10606222B2 (en) Identifying home automation correlated events and creating portable recipes
CN112084000A (en) Container cluster testing method and device
CN109254778B (en) Method and apparatus for deploying an information flow system
CN114661274A (en) Method and device for generating intelligent contract
US11704119B2 (en) Migrating infrastructure as code between different cloud providers
CN115277428A (en) Method and apparatus for configuring a network
CN115639953A (en) Data migration method and device
CN112131095B (en) Pressure testing method and device
CN114338461A (en) Network connection monitoring method and related equipment
CN109271310B (en) Development testing method and device for network function of mobile application program
CN113132447A (en) Reverse proxy method and system
US9424120B1 (en) Prioritizing first failure data capture (FFDC) data for analysis

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