Gateway traffic migration stability guarantee method, device, equipment and medium

By adopting traffic bottoming strategy and pre-migration testing during gateway traffic migration, the problem of incompatibility in gateway technology upgrades is solved, and the stability and lossless migration of gateway upgrade process are achieved.

CN119922134APending Publication Date: 2025-05-02JIANGSU SECURITIES
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510062024.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-15
Publication Date
2025-05-02

AI Technical Summary

Technical Problem

In the process of upgrading gateway technology with enterprise-level large tenants, due to inconsistent development languages ​​of old and new gateways and differences in traffic processing methods and deployment methods, traffic processing is incompatible, lack of systematic migration guarantee ideas, and it is difficult to ensure the stability of gateway upgrades, especially in high concurrency and large traffic scenarios.

Method used

By adopting the traffic guarantee strategy during the migration process, the failed migration traffic is sent to the gateway to be migrated for retry and obtain the problem traffic of the target gateway. At the same time, before migration, tests are performed through traffic mirroring and dual-send comparison to analyze the problems existing in the target gateway to ensure the stability of the migration process.

Benefits of technology

It realizes lossless business traffic during gateway traffic migration, obtains problem traffic of the target gateway, promptly discovers and solves problems in the target gateway, and ensures the stability and reliability of the migration process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119922134A_ABST
    Figure CN119922134A_ABST
Patent Text Reader

Abstract

The invention discloses a gateway traffic migration stability guarantee method, device and equipment and a medium, and belongs to the technical field of traffic scheduling. The method comprises the following steps: when the traffic gray level of a to-be-migrated gateway is migrated to a target gateway, sending the traffic failed in migration to the to-be-migrated gateway for retry through a traffic bottom-out strategy, and obtaining the problem traffic of the target gateway; after the migration is completed, analyzing problems existing in the target gateway based on the problem traffic of the target gateway; the problem traffic of the target gateway is the remaining part of the first problem traffic which fails to migrate to the target gateway, and the second problem traffic which fails to carry out traffic bottom failure is removed from the first problem traffic which fails to migrate to the target gateway. According to the method, the coverage degree of the test before migration is improved through traffic mirroring and double-transmission comparison, automatic traffic bottom taking is achieved for an idempotent interface in the target gateway, problem traffic of the target gateway is subjected to automatic routing inspection and backtracking, suspicious traffic is reloaded in time, and the problems existing in the target gateway are found and solved as far as possible in the gray level stage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of traffic scheduling, and relates to a method, device, equipment and medium for ensuring the stability of gateway traffic migration. Background Art

[0002] During the migration of business traffic for gateway technology upgrades with large enterprise-level tenants, traffic processing incompatibility is prone to occur during the migration process due to the inconsistency of the development language of the new and old gateways, the traffic processing methods, and the deployment methods. The existing gateway traffic migration method lacks a systematic migration guarantee idea, and when problems occur, it can only trigger traffic switching back. How to systematically guarantee the stability of gateway upgrades, especially the upgrade process of gateways with large tenants, high concurrency, and large traffic, has become an urgent problem to be solved. Summary of the invention

[0003] The purpose of the present invention is to overcome the deficiencies in the prior art and to provide a method, device, equipment and medium for ensuring the stability of gateway traffic migration, which can ensure the stability of gateway traffic migration from three aspects: before migration, during migration and after migration.

[0004] To achieve the above object, the present invention is implemented by adopting the following technical solutions:

[0005] In a first aspect, the present invention provides a gateway traffic migration stability assurance method, comprising:

[0006] When the traffic of the gateway to be migrated is migrated to the target gateway, the traffic that failed to migrate is sent to the gateway to be migrated for retry through the traffic backup strategy, and the problem traffic of the target gateway is obtained;

[0007] After the gateway traffic migration is completed, analyzing the problems existing in the target gateway based on the problem traffic of the target gateway;

[0008] The problem traffic of the target gateway is obtained, including:

[0009] Get the first problem traffic that failed to migrate to the target gateway;

[0010] Through the traffic backup strategy, the first problem traffic is sent to the gateway to be migrated for retry, and the second problem traffic that failed the retry is obtained;

[0011] The problem traffic of the target gateway is the remaining portion of the first problem traffic after removing the second problem traffic.

[0012] Furthermore, it also includes: testing before gateway traffic migration, including:

[0013] Obtain traffic data of the gateway to be migrated through traffic mirroring;

[0014] Sending the traffic data to both the target gateway and the gateway to be migrated, and obtaining response results from both gateways;

[0015] According to the preset comparison rules, the response results of the target gateway and the gateway to be migrated are compared to analyze the problems existing in the target gateway.

[0016] Furthermore, obtaining the traffic data of the gateway to be migrated includes: obtaining the traffic data of the gateway to be migrated in a sampling manner.

[0017] Furthermore, the traffic backup strategy includes: configuring Nginx at the entrance of the target gateway and the entrance of the gateway to be migrated to perform traffic forwarding, sending user traffic to the target gateway, and sending traffic that failed to migrate to the gateway to be migrated.

[0018] Furthermore, the traffic that fails to migrate includes an HTTP status code of 4xx or 5xx returned by the target gateway to Nginx.

[0019] Further, analyze the problems existing in the target gateway, including:

[0020] Obtaining traffic data of the target gateway through traffic mirroring;

[0021] The traffic data of the target gateway is replayed to analyze the problems existing in the target gateway.

[0022] In a second aspect, the present invention further provides a gateway traffic migration stability assurance device, the device comprising:

[0023] The traffic backup module is used to send the failed migration traffic to the gateway to be migrated for retry through the traffic backup strategy when the traffic of the gateway to be migrated is migrated to the target gateway, and obtain the problem traffic of the target gateway;

[0024] The target gateway problem analysis module is used to analyze the problems existing in the target gateway based on the problem traffic of the target gateway after the gateway traffic migration is completed.

[0025] Furthermore, the traffic guarantee module also includes:

[0026] A first problem traffic acquisition unit, configured to acquire first problem traffic that fails to migrate to a target gateway;

[0027] A second problem traffic acquisition unit is used to send the first problem traffic to the gateway to be migrated for retry through a traffic backup strategy, and acquire the second problem traffic that failed the retry;

[0028] The target gateway problem traffic acquisition unit is used to remove the same part of the first problem traffic as the second problem traffic to obtain the problem traffic of the target gateway.

[0029] In a third aspect, the present invention further provides a computer device, comprising:

[0030] Memory for storing computer programs;

[0031] A processor is used to execute the computer program to implement the steps of the above-mentioned gateway traffic migration stability assurance method.

[0032] In a fourth aspect, the present invention further provides a computer-readable storage medium having a computer program stored thereon, the program being executed by a processor to implement the steps of the above-mentioned gateway traffic migration stability assurance method.

[0033] Compared with the prior art, the present invention has the following beneficial effects:

[0034] The gateway traffic migration stability guarantee method provided by the present invention smoothly transitions the traffic of the gateway to be migrated to the target gateway by means of grayscale release, and during the gateway traffic migration, the idempotent interface in the target gateway is automatically covered by the traffic cover strategy, so as to achieve lossless service traffic during the migration process as much as possible, and obtain the problem traffic of the target gateway at the same time. After the gateway traffic migration is completed, the problem traffic of the target gateway is automatically inspected and traced back, and the suspicious traffic is reviewed in time. In addition, in the test before the gateway traffic migration, the present invention improves the test coverage by traffic mirroring and double-transmission comparison, so as to find and solve the problems in the target gateway in the grayscale stage as much as possible. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 A flow chart of a method for ensuring the stability of gateway traffic migration provided by an embodiment of the present invention;

[0036] Figure 2 This is a schematic diagram of the structure of the flow guarantee strategy in an embodiment of the present invention;

[0037] Figure 3 This is a schematic diagram of the structure of performing problem traffic analysis on a target gateway in an embodiment of the present invention;

[0038] Figure 4 This is a schematic diagram of the structure of testing before gateway traffic migration in an embodiment of the present invention;

[0039] Figure 5 A schematic diagram of the structure of a gateway traffic migration stability assurance device provided by an embodiment of the present invention;

[0040] Figure 6An internal structure diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0041] The technical solution of the present invention is described in detail below through the accompanying drawings and specific embodiments. The same reference numerals in the accompanying drawings indicate the same or similar components or parts. It should be understood by those skilled in the art that these drawings are not necessarily drawn to scale. The embodiments of the present application and the specific features in the embodiments are detailed descriptions of the technical solution of the present application, rather than limitations on the technical solution of the present application. In the absence of conflict, the embodiments of the present application and the technical features in the embodiments can be combined with each other.

[0042] The term "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0043] Embodiment 1:

[0044] like Figures 1 to 4 As shown, an embodiment of the present invention provides a method for ensuring the stability of gateway traffic migration. Figure 1 The flowchart is a flow chart of the gateway traffic migration stability guarantee method. This flowchart only shows the logical sequence of the method described in this embodiment. Under the premise of no conflict, in other possible embodiments of the present invention, different Figure 1 The steps shown or described are accomplished in the order shown.

[0045] The gateway traffic migration stability assurance method provided in this embodiment can be applied to a terminal, and can be executed by a gateway traffic migration stability assurance device, which can be implemented by software and / or hardware, and the device can be integrated in the terminal.

[0046] See also Figure 1 The specific steps of the method in the embodiment of the present invention are as follows:

[0047] Step 1: When migrating the traffic of the gateway to be migrated to the target gateway, use the traffic backup strategy to send the failed migration traffic to the gateway to be migrated for retry, and obtain the problem traffic of the target gateway.

[0048] Grayscale traffic migration is a technical means of gradually migrating traffic from one environment to another, mainly used to ensure a smooth transition of services and reduce risks.

[0049] Since failed traffic may occur during the grayscale migration of traffic, in order to ensure that the service traffic is intact during the migration process, the present invention performs traffic backup at the entrance of the target gateway. The traffic backup strategy is to automatically retry the failed traffic to the gateway to be migrated at the entrance of the target gateway. Specifically, Figure 2 As shown, Nginx is configured at the entrance of the target gateway and the entrance of the gateway to be migrated to forward traffic, send user traffic to the target gateway, and send traffic that fails to migrate to the gateway to be migrated, and the traffic that fails to migrate includes the HTTP status code 4xx or 5xx returned by the target gateway to Nginx.

[0050] Among them, obtaining the problem traffic of the target gateway includes: obtaining the first problem traffic that fails to migrate to the target gateway; sending the first problem traffic to the gateway to be migrated for retry through a traffic backup strategy, and obtaining the second problem traffic that fails the retry; the problem traffic of the target gateway is the remaining part of the first problem traffic after removing the second problem traffic.

[0051] During the grayscale process of gateway migration, traffic errors may occur, such as problems with input parameters or abnormal backend returns, etc., which are manifested in the gateway as returning 4xx or 5xx status codes. However, it is necessary to clarify whether the failed traffic is caused by problems with the target gateway itself, such as incompatible protocol conversion, or caused by business traffic, such as invalid parameters. Problems caused by business traffic will still fail when the first problem traffic is sent to the gateway to be migrated for retry. Therefore, the remaining part of the first problem traffic minus the second problem traffic is the problem traffic caused by the target gateway itself.

[0052] The present invention not only realizes automatic traffic guarantee for the idempotent interface in the gateway through the traffic guarantee strategy, but also can obtain the problem traffic caused by the target gateway itself.

[0053] Step 2: After the gateway traffic migration is completed, the problem existing in the target gateway is analyzed based on the problem traffic of the target gateway.

[0054] Specifically, Figure 3 As shown, the audit collection includes the target gateway audit and the traffic backup audit. The first problem traffic is obtained through the target gateway audit, and the traffic that still fails after retry, that is, the second problem traffic, is obtained through the traffic backup audit. The first problem traffic and the second problem traffic are compared to finally obtain the problem traffic caused by the target gateway itself. For the specific principles and collection methods, please refer to the above step 1, which will not be repeated here.

[0055] In an embodiment of the present invention, the specific steps of analyzing the problems existing in the target gateway are: obtaining the traffic data of the target gateway through traffic mirroring; replaying the traffic data of the target gateway through a traffic cleaning and playback platform to analyze the specific problems existing in the target gateway; performing subsequent processing and optimization on the specific problems existing in the target gateway to improve the compatibility of the target gateway.

[0056] Before the gateway traffic is migrated, in addition to the functional alignment of the old and new versions of the gateway, sufficient testing is the basic guarantee for migration. However, due to the large number of tenants and the existence of historical legacy interfaces, it is extremely challenging to rely entirely on manual verification. Therefore, the present invention also improves the test coverage through traffic mirroring and dual-transmission comparison in the test before the gateway traffic migration.

[0057] Specifically, Figure 4 As shown, the test steps before gateway traffic migration include: obtaining traffic data of the gateway to be migrated through traffic mirroring; sending the traffic data to both the target gateway and the gateway to be migrated to obtain response results from the two; comparing the response results of the target gateway and the gateway to be migrated according to preset comparison rules to analyze the problems existing in the target gateway.

[0058] The preset comparison rule generally prioritizes the return code and the length of the body in the message, while ignoring dynamically changing fields such as timestamps.

[0059] Traffic mirroring is a network technology, also known as shadow traffic. It refers to copying the real online traffic to a mirror service through certain configurations, so as to perform specific analysis on the traffic or request content without affecting the online service. Its design idea is to only forward without receiving responses.

[0060] There are many traffic mirroring solutions. Traffic mirroring collection based on the TCP layer includes Tcpdump, Tcpcopy, Goreplay, etc., or mirroring capabilities based on 7-layer Http, such as Nginx, Envoy, etc., and even if it is a Java technology stack, Sandbox and other methods can be used for traffic mirroring. When it is actually implemented, the technology selection can be made according to the specific situation. However, the gateway is a CPU and IO intensive component, so when selecting traffic mirroring, you need to pay attention to the impact on the CPU and IO. For example, when collecting traffic through Tcpdump, the corresponding daemon process will be configured to monitor information such as CPU and disk usage. When the usage exceeds the threshold, stop traffic collection.

[0061] In the embodiment of the present invention, a background daemon is started before the pre-migration test is performed, and when the CPU or disk usage exceeds a threshold, traffic mirroring is stopped.

[0062] In addition, if the gateway traffic is large, you can use sampling to mirror the traffic.

[0063] The present invention provides a method for systematically ensuring the stability of traffic migration from three aspects: before, during and after migration when upgrading the technology of an enterprise-level gateway. Before the gateway traffic is migrated, traffic mirroring and dual-transmission comparison methods are used to improve the test coverage; during the gateway traffic migration, combined with the observable implementation of the gateway itself, the traffic failure problem can be discovered and handled in the first time. The present invention realizes automatic bottom-up degradation of idempotent interfaces through grayscale release and traffic bottom-up strategy, ensures the overall stability of the migration, and achieves lossless business traffic during the migration process as much as possible; after the gateway traffic is migrated, the traffic data of the target gateway is replayed to realize automatic inspection and backtracking of the problem traffic caused by the target gateway itself, and the suspicious traffic is reviewed in time to ensure that the problems in the target gateway are discovered and resolved in the grayscale stage.

[0064] Embodiment 2:

[0065] Based on the same inventive concept as Example 1, the embodiment of the present invention also provides a gateway traffic migration stability assurance device for implementing the above-mentioned gateway traffic migration stability assurance method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above-mentioned method, so the specific limitations in the embodiment of the gateway traffic migration stability assurance device provided below can refer to the limitations of the gateway traffic migration stability assurance method above, and will not be repeated here.

[0066] like Figure 5 As shown, an embodiment of the present invention provides a gateway traffic migration stability assurance device, comprising:

[0067] The traffic backup module is used to send the failed migration traffic to the gateway to be migrated for retry through the traffic backup strategy when the traffic of the gateway to be migrated is migrated to the target gateway, and obtain the problem traffic of the target gateway;

[0068] The target gateway problem analysis module is used to analyze the problems existing in the target gateway based on the problem traffic of the target gateway after the gateway traffic migration is completed.

[0069] The flow guarantee module further includes:

[0070] A first problem traffic acquisition unit, configured to acquire first problem traffic that fails to migrate to a target gateway;

[0071] A second problem traffic acquisition unit is used to send the first problem traffic to the gateway to be migrated for retry through a traffic backup strategy, and acquire the second problem traffic that failed the retry;

[0072] The target gateway problem traffic acquisition unit is used to remove the same part of the first problem traffic as the second problem traffic to obtain the problem traffic of the target gateway.

[0073] Embodiment 3:

[0074] The embodiment of the present invention further provides a computer device, which may be a server, and its internal structure diagram may be as shown in FIG. Figure 6 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the gateway traffic migration stability assurance method in the aforementioned embodiment is implemented.

[0075] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0076] Embodiment 4:

[0077] The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the steps of the following method are implemented:

[0078] When the traffic of the gateway to be migrated is migrated to the target gateway, the traffic that failed to migrate is sent to the gateway to be migrated for retry through the traffic backup strategy, and the problem traffic of the target gateway is obtained;

[0079] After the gateway traffic migration is completed, analyzing the problems existing in the target gateway based on the problem traffic of the target gateway;

[0080] The problem traffic of the target gateway is obtained, including:

[0081] Get the first problem traffic that failed to migrate to the target gateway;

[0082] Through the traffic backup strategy, the first problem traffic is sent to the gateway to be migrated for retry, and the second problem traffic that failed the retry is obtained;

[0083] The problem traffic of the target gateway is the remaining portion of the first problem traffic after removing the second problem traffic.

[0084] It should be understood by those skilled in the art that the embodiments of the present invention may be provided as methods, systems, or computer program products, and therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0085] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0086] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0087] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0088] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the enlightenment of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the purpose of the present invention and the claims, which all fall within the protection of the present invention.

Claims

1. A gateway traffic migration stability assurance method, characterized in that: include: When the traffic of the gateway to be migrated is migrated to the target gateway, the traffic that failed to migrate is sent to the gateway to be migrated for retry through the traffic backup strategy, and the problem traffic of the target gateway is obtained; After the gateway traffic migration is completed, analyzing the problems existing in the target gateway based on the problem traffic of the target gateway; The problem traffic of the target gateway is obtained, including: Get the first problem traffic that failed to migrate to the target gateway; Through the traffic backup strategy, the first problem traffic is sent to the gateway to be migrated for retry, and the second problem traffic that failed the retry is obtained; The problem traffic of the target gateway is the remaining portion of the first problem traffic after removing the second problem traffic.

2. The gateway traffic migration stability guarantee method according to claim 1, characterized in that: Also includes: Before migrating gateway traffic, perform tests, including: Obtain traffic data of the gateway to be migrated through traffic mirroring; Sending the traffic data to both the target gateway and the gateway to be migrated, and obtaining response results from both gateways; According to the preset comparison rules, the response results of the target gateway and the gateway to be migrated are compared to analyze the problems existing in the target gateway.

3. The gateway traffic migration stability guarantee method according to claim 2, characterized in that: Obtaining traffic data of the gateway to be migrated, including: obtaining the traffic data of the gateway to be migrated in a sampling manner.

4. The gateway traffic migration stability guarantee method according to claim 1, characterized in that: The traffic backup strategy includes: configuring Nginx at the entrance of the target gateway and the entrance of the gateway to be migrated to forward traffic, sending user traffic to the target gateway, and sending traffic that fails to migrate to the gateway to be migrated.

5. The gateway traffic migration stability guarantee method according to claim 4, characterized in that: The traffic that fails to migrate includes the HTTP status code 4xx or 5xx returned by the target gateway to Nginx.

6. The gateway traffic migration stability guarantee method according to claim 1, characterized in that: Analyze the problems of the target gateway, including: Obtaining traffic data of the target gateway through traffic mirroring; The traffic data of the target gateway is replayed to analyze the problems existing in the target gateway.

7. A gateway traffic migration stability assurance device, characterized in that: include: The traffic backup module is used to send the failed migration traffic to the gateway to be migrated for retry through the traffic backup strategy when the traffic of the gateway to be migrated is migrated to the target gateway, and obtain the problem traffic of the target gateway; The target gateway problem analysis module is used to analyze the problems existing in the target gateway based on the problem traffic of the target gateway after the gateway traffic migration is completed.

8. The gateway traffic migration stability assurance device according to claim 7, characterized in that: The flow guarantee module also includes: A first problem traffic acquisition unit, configured to acquire first problem traffic that fails to migrate to a target gateway; A second problem traffic acquisition unit is used to send the first problem traffic to the gateway to be migrated for retry through a traffic backup strategy, and acquire the second problem traffic that failed the retry; The target gateway problem traffic acquisition unit is used to remove the same part of the first problem traffic as the second problem traffic to obtain the problem traffic of the target gateway.

9. A computer device, characterized in that: include: Memory for storing computer programs; A processor is used to execute the computer program to implement the steps of the gateway traffic migration stability assurance method according to any one of claims 1 to 6.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the gateway traffic migration stability assurance method described in any one of claims 1 to 6 are implemented.