Cloud network equipment traffic grayscale method and equipment

By deploying the updated version of the device in the existing virtual network device cluster and using pre-configured routing tables for traffic forwarding, the problem of high deployment cost of grayscale clusters in the existing technology is solved, and efficient traffic grayscale verification and cost reduction are achieved.

CN118869592BActive Publication Date: 2025-05-16BEIJING VOLCANO ENGINE TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410870040.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2025-05-16
Estimated Expiration
2044-06-28

AI Technical Summary

Technical Problem

Existing virtual network device traffic grayscale technology requires the deployment of grayscale clusters, resulting in high resource and deployment costs.

Method used

By deploying the updated version of the virtual network device in an existing virtual network device cluster, using the pre-configured routing table that supports traffic grayscale, select the next hop virtual network device according to the weight for traffic forwarding, and realize traffic grayscale verification.

Benefits of technology

Reduces the resource and deployment costs required for traffic grayscale, reduces the impact on the associated configuration of upstream and downstream components, and realizes effective comparison of the processing performance of new and old versions and controls the traffic impact range.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118869592B_ABST
    Figure CN118869592B_ABST
Patent Text Reader

Abstract

The disclosed embodiment provides a cloud network device traffic grayscale method and device, including: receiving target traffic sent from a source virtual machine to a destination virtual machine; determining a target network function instance according to the target traffic, querying a preconfigured routing table supporting traffic grayscale, and matching to obtain at least one weighted equivalent route; the routing table is configured to include: when the destination is to the network function instance, the next hop is a route of a first version of a virtual network device in a virtual network device cluster and a corresponding weight, and when the destination is to the network function instance, the next hop is a route of a second version of a virtual network device in a virtual network device cluster and a corresponding weight; each virtual network device in the virtual network device cluster is used to carry at least one network function instance; according to at least one weighted equivalent route, selecting a next hop virtual network device for the target traffic based on the weight, and forwarding the target traffic to the next hop virtual network device. The present application can reduce the cost of traffic grayscale.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of cloud computing technology, and more particularly to a cloud network device traffic grayscale method and device. Background Art

[0002] Virtualization technology is the foundation of the cloud computing industry. When a virtual network device is released, traffic grayscale technology can be used to migrate part of the network traffic from the current network device to the new version of the network device. The purpose of traffic grayscale is to observe and verify the performance of the new version in handling real business traffic under the condition of effectively controlling the scope of impact. When an anomaly occurs, traffic grayscale requires the ability to quickly migrate traffic back; when the new version continues to perform well, the grayscale traffic will be gradually increased, thereby smoothly transitioning to the new version of the network device.

[0003] The existing virtual network device traffic grayscale technology requires the deployment of a grayscale cluster, that is, a new version of the virtual network device cluster. By migrating some network function instances to the grayscale cluster, grayscale verification of traffic can be achieved.

[0004] The inventors have discovered that the prior art has at least the following technical problems: the resource and deployment costs of building a grayscale cluster are high. Summary of the invention

[0005] The embodiments of the present disclosure provide a cloud network device traffic grayscale method and device, which can reduce the cost of grayscale upgrade of network devices.

[0006] In a first aspect, an embodiment of the present disclosure provides a cloud network device traffic grayscale method, including:

[0007] Receive target traffic sent from the source virtual machine to the destination virtual machine;

[0008] Determine the target network function instance according to the target traffic, query the preconfigured routing table supporting traffic grayscale, and match to obtain at least one weighted equivalent route; wherein the routing table is configured to include: the route and corresponding weight of the next hop of the first version of the virtual network device in the virtual network device cluster when the destination is to the network function instance, and the route and corresponding weight of the next hop of the second version of the virtual network device in the virtual network device cluster when the destination is to the network function instance; wherein the second version of the virtual network device is a newly deployed version update in the virtual network device cluster and requires grayscale verification; each virtual network device in the virtual network device cluster is used to carry at least one network function instance;

[0009] According to the at least one weighted equal-cost route, a next-hop virtual network device is selected for the target traffic based on the weight, and the target traffic is forwarded to the next-hop virtual network device.

[0010] In a second aspect, an embodiment of the present disclosure provides a cloud network device traffic grayscale device, including:

[0011] A receiving unit, used for receiving target traffic sent from a source virtual machine to a destination virtual machine;

[0012] A matching unit, configured to determine a target network function instance according to the target traffic, query a preconfigured routing table supporting traffic grayscale, and match to obtain at least one weighted equivalent route; wherein the routing table is configured to include: a route and a corresponding weight whose next hop is a first version virtual network device in a virtual network device cluster when the destination is to the network function instance, and a route and a corresponding weight whose next hop is a second version virtual network device in the virtual network device cluster when the destination is to the network function instance; wherein the second version virtual network device is a newly deployed version update in the virtual network device cluster and requires grayscale verification; each virtual network device in the virtual network device cluster is used to carry at least one network function instance;

[0013] A forwarding unit is used to select a next-hop virtual network device for the target traffic based on the weight according to the at least one weighted equal-cost route, and forward the target traffic to the next-hop virtual network device.

[0014] In a third aspect, an embodiment of the present disclosure provides an electronic device, including: a processor and a memory;

[0015] The memory stores computer-executable instructions;

[0016] The processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the cloud network device traffic grayscale method as described in the first aspect and various possible designs of the first aspect.

[0017] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the cloud network device traffic grayscale method described in the first aspect and various possible designs of the first aspect is implemented.

[0018] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the cloud network device traffic grayscale method as described in the first aspect and various possible designs of the first aspect.

[0019] The cloud network device traffic grayscale method and device provided in this embodiment include: receiving target traffic sent from a source virtual machine to a destination virtual machine; determining a target network function instance according to the target traffic, querying a preconfigured routing table supporting traffic grayscale, and matching to obtain at least one weighted equivalent route; wherein the routing table is configured to include: a route and a corresponding weight in which the next hop is a first version virtual network device in a virtual network device cluster when the destination is to the network function instance, and a route and a corresponding weight in which the next hop is a second version virtual network device in the virtual network device cluster when the destination is to the network function instance; wherein the second version virtual network device is a newly deployed version update in the virtual network device cluster and requires grayscale verification; each virtual network device in the virtual network device cluster is used to carry at least one network function instance; according to at least one weighted equivalent route, a next hop virtual network device is selected for the target traffic based on the weight, and the target traffic is forwarded to the next hop virtual network device. In this technical solution, since the second version of the virtual network device with an updated version and requiring grayscale verification is deployed in the existing virtual network device cluster, there is no need to create a new network device cluster, thereby reducing the resources and deployment costs required for traffic grayscale, and also reducing the impact on the associated configuration of upstream and downstream components; and since the next hop in the routing table is the route and corresponding weight of the first version of the virtual network device in the virtual network device cluster, and the next hop is the route and corresponding weight of the second version of the virtual network device in the virtual network device cluster, it is possible to use similar characteristic traffic under the same network function instance to compare and analyze the processing performance of the new and old versions, and can also effectively control the scope of influence of traffic grayscale on instance traffic. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0021] Figure 1 Schematic diagram of cloud network device traffic grayscale method provided by existing technology Figure 1 ;

[0022] Figure 2 The process of the cloud network device traffic grayscale method provided in the embodiment of the present disclosure Figure 1 ;

[0023] Figure 3 Schematic diagram of the cloud network device traffic grayscale method provided by the embodiment of the present disclosure Figure 1 ;

[0024] Figure 4The process of the cloud network device traffic grayscale method provided in the embodiment of the present disclosure Figure 2 ;

[0025] Figure 5 The process of the cloud network device traffic grayscale method provided in the embodiment of the present disclosure Figure 3 ;

[0026] Figure 6 A schematic diagram of the structure of a cloud network device traffic grayscale device provided in an embodiment of the present disclosure;

[0027] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0028] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.

[0029] Some terms of the embodiments of the present disclosure are explained below:

[0030] Cloud network device traffic grayscale: When a virtual network device is released, traffic grayscale technology is used to migrate part of the network traffic from the current network device to the new version of the network device. The purpose of traffic grayscale is to observe and verify the processing performance of the new version for real business traffic under the condition of effectively controlling the scope of impact. When an abnormality occurs, traffic grayscale requires the ability to quickly migrate traffic back; when the new version continues to perform well, the grayscale traffic will be gradually increased, thereby smoothly transitioning to the new version of cloud network devices.

[0031] In a public cloud environment, each tenant has an independent and isolated virtual network. In order to implement specific network functions, similar to network forwarding devices in traditional networks, the tenant's virtual network contains network function instances, such as NAT gateways and load balancers. The entities that carry these network function instances are virtual network devices of the corresponding functions. Cloud service providers use the same virtual network device to carry network function instances of different tenants to achieve multi-tenant resource reuse.

[0032] In order to meet the requirements of high availability and capacity of services, a network function instance is jointly carried by multiple network devices in a virtual network device cluster. When a virtual switch forwards a data packet to a network function instance, its routing table corresponds to multiple equal-cost routes. The next hops of these route entries are the same, pointing to the network devices in the virtual network device cluster that carry this network function instance. The virtual switch can select the next-hop network device for each data flow based on the ECMP (Equal cost multi-path routing) algorithm, and evenly distribute different data flows of the same network function instance to multiple network devices.

[0033] The existing virtual network device traffic grayscale technology requires the deployment of a grayscale cluster, that is, a new version of the virtual network device cluster. By migrating some network function instances to the grayscale cluster, grayscale verification of traffic can be achieved. Figure 1 As shown, the network function instance 2 is migrated from the existing cluster 1 to the grayscale cluster 2. After the routing information in the network is updated and synchronized, the traffic sent to the network function instance 2 will be directed to the network devices in the grayscale cluster 2.

[0034] The inventors found that the prior art has at least the following technical problems:

[0035] 1. The resource and deployment costs of building a grayscale cluster are high.

[0036] 2. The creation of a new equipment cluster involves many changes in the configuration of upstream and downstream components, which has a significant impact on the overall system.

[0037] 3. The minimum traffic migration unit is the network function instance. Potential errors in the new version affect all traffic under the migrated network function instance, and the impact within the instance range cannot be controlled.

[0038] In response to the technical problems in the prior art, the inventor's technical conception is as follows: reuse the existing virtual network device cluster to perform traffic grayscale verification, and perform grayscale verification through part of the traffic under the network function instance to achieve flexible control of grayscale traffic.

[0039] Accordingly, the specific steps may include: first, receiving the target traffic sent from the source virtual machine to the destination virtual machine. Then, determining the target network function instance according to the target traffic, querying the pre-configured routing table that supports traffic grayscale, and matching to obtain at least one weighted equivalent route; wherein the routing table is configured to include: when the destination is to the network function instance, the next hop is the route and corresponding weight of the first version of the virtual network device in the virtual network device cluster, and when the destination is to the network function instance, the next hop is the route and corresponding weight of the second version of the virtual network device in the virtual network device cluster; wherein the second version of the virtual network device is a newly deployed version update in the virtual network device cluster and requires grayscale verification; each virtual network device in the virtual network device cluster is used to carry at least one network function instance. Finally, according to at least one weighted equivalent route, the next hop virtual network device is selected for the target traffic based on the weight, and the target traffic is forwarded to the next hop virtual network device.

[0040] In this technical solution, a second version of a virtual network device that is updated and requires grayscale verification is deployed in an existing virtual network device cluster without the need to create a new network device cluster, thereby reducing the resources and deployment costs required for traffic grayscale and reducing the impact on the associated configuration of upstream and downstream components; and, since the next hop in the routing table is the route and corresponding weight of the first version of the virtual network device in the virtual network device cluster and the next hop is the route and corresponding weight of the second version of the virtual network device in the virtual network device cluster, it is possible to use similar characteristic traffic under the same network function instance to compare and analyze the processing performance of the new and old versions, and can also effectively control the scope of influence of traffic grayscale on instance traffic.

[0041] The following is a specific implementation process of the cloud network device traffic grayscale method and device involved in the embodiment of the present disclosure. Some examples are only for example and are not limiting. The execution subject of the cloud network device traffic grayscale method involved in the embodiment of the present disclosure is an electronic device, which can be a terminal, a server, etc.

[0042] Figure 2 Schematic diagram of the cloud network device traffic grayscale method process provided by the embodiment of the present disclosure Figure 1 ,like Figure 2 As shown, the cloud network device traffic grayscale method may include:

[0043] 201. Receive target traffic sent from a source virtual machine to a destination virtual machine.

[0044] In the disclosed embodiment, the target traffic may be the traffic corresponding to the same network function instance. When receiving the target traffic sent from the source virtual machine to the destination virtual machine, the processing performance of the new and old versions of the virtual network device may be compared and analyzed using traffic with similar characteristics under the same network function instance.

[0045] 202. Determine the target network function instance according to the target traffic, query the pre-configured routing table that supports traffic grayscale, and match at least one weighted equivalent route; wherein the routing table is configured to include: the route and the corresponding weight of the next hop of the first version of the virtual network device in the virtual network device cluster when the destination is to the network function instance, and the route and the corresponding weight of the next hop of the second version of the virtual network device in the virtual network device cluster when the destination is to the network function instance; wherein the second version of the virtual network device is a newly deployed version update in the virtual network device cluster and requires grayscale verification; each virtual network device in the virtual network device cluster is used to carry at least one network function instance.

[0046] In the embodiment of the present disclosure, the network function instance is used to process the data packet sent by the source virtual machine and send the processed data packet to the destination virtual machine. The destination network function instance may be a network function instance configured with a traffic grayscale policy.

[0047] Optionally, the first version virtual network device is an existing device, and the second version virtual network device is a grayscale device. Adding a grayscale device to an existing virtual network device cluster can reuse the existing virtual network device cluster. It should be noted that one or more network function instances can be configured in the first version virtual network device and the second version virtual network device.

[0048] For example, Figure 3 As shown, the virtual switch determines the target network function instance as network function instance 2 according to the target traffic, queries the pre-configured routing table supporting traffic grayscale, and matches the equivalent routes corresponding to network function instance 2, including the routes with the next hop being the first version of the virtual network device in the virtual network device cluster and the corresponding weights: next hop network device 1, weight (100-X)*M; ...; next hop network device N, weight (100-X)*M; and the routes with the next hop being the second version of the virtual network device in the virtual network device cluster and the corresponding weights: next hop network device N+1, weight X*N; ...; next hop network device N+M, weight X*N. Among them, the number of first version virtual network devices is N, and the number of second version virtual network devices is M.

[0049] 203. According to at least one weighted equal-cost route, select a next-hop virtual network device for the target traffic based on the weight, and forward the target traffic to the next-hop virtual network device.

[0050] Optionally, the second version virtual network device in the virtual network device cluster is configured with a grayscale verification exclusive tag, and the network function instance configured with a traffic grayscale policy is scheduled to the virtual network device carrying the grayscale verification exclusive tag; accordingly, this step may include: when the target network function instance is marked as pre-configured with a traffic grayscale policy, part of the target traffic is scheduled to the second version virtual network device carrying the grayscale verification exclusive tag according to the weight.

[0051] In some embodiments, if the performance index of the second version virtual network device is higher, the range of grayscale traffic can be expanded. Optionally, this step may include: when the index of the second version virtual network device is monitored to be greater than a preset threshold, the number of target network function instances and / or the weight of the target network function instance are increased. The index of the second version virtual network device may be a performance index. For example, the processing efficiency of data processing of data packets.

[0052] In other embodiments, if anomalies in traffic on the grayscale device are observed, the traffic needs to be migrated back from the grayscale device to the original device. The traffic grayscale policy configured for the network function instance is deleted, and the route pointing to the grayscale device is revoked, thereby redirecting the grayscale traffic of the instance to the original device.

[0053] Optionally, this step may include: when an abnormality is detected in the target traffic on the second version virtual network device, migrating the target traffic back to the first version virtual network device corresponding to the network function instance, and deleting the route in the routing table whose next hop from the destination to the network function instance is the second version virtual network device in the virtual network device cluster.

[0054] The disclosed embodiment provides a cloud network device traffic grayscale method: receiving target traffic sent from a source virtual machine to a destination virtual machine; determining a target network function instance according to the target traffic, querying a preconfigured routing table supporting traffic grayscale, and matching to obtain at least one weighted equivalent route; wherein the routing table is configured to include: a route and a corresponding weight in which the next hop is a first version virtual network device in a virtual network device cluster when the destination is to the network function instance, and a route and a corresponding weight in which the next hop is a second version virtual network device in the virtual network device cluster when the destination is to the network function instance; wherein the second version virtual network device is a newly deployed version update in the virtual network device cluster and requires grayscale verification; each virtual network device in the virtual network device cluster is used to carry at least one network function instance; according to at least one weighted equivalent route, a next hop virtual network device is selected for the target traffic based on the weight, and the target traffic is forwarded to the next hop virtual network device. In this technical solution, since the second version of the virtual network device with an updated version and requiring grayscale verification is deployed in the existing virtual network device cluster, there is no need to create a new network device cluster, thereby reducing the resources and deployment costs required for traffic grayscale, and also reducing the impact on the associated configuration of upstream and downstream components; and since the next hop in the routing table is the route and corresponding weight of the first version of the virtual network device in the virtual network device cluster, and the next hop is the route and corresponding weight of the second version of the virtual network device in the virtual network device cluster, it is possible to use similar characteristic traffic under the same network function instance to compare and analyze the processing performance of the new and old versions, and can also effectively control the scope of influence of traffic grayscale on instance traffic.

[0055] Figure 4 Schematic diagram of the cloud network device traffic grayscale method process provided by the embodiment of the present disclosure Figure 2 In the embodiment of the present disclosure, the routing table supporting the grayscale of traffic can be pre-configured. Figure 4 As shown, the method for pre-configuring a routing table supporting traffic grayscale may include:

[0056] S401. Receive traffic grayscale policy configuration information, where the traffic grayscale policy configuration information is used to specify a network function instance that needs to be grayscale verified as a grayscale network function instance and a grayscale traffic ratio corresponding to the grayscale network function instance.

[0057] The grayscale traffic ratio is used to indicate the ratio of traffic for the target network function instance distributed to the second version virtual network device.

[0058] S402, generating a grayscale route whose next hop from the destination to the grayscale network function instance is a second version virtual network device in the virtual network device cluster.

[0059] S403: Convert the grayscale traffic ratio into weights of multiple equal-cost routes of the grayscale network function instance and update them into the routing table.

[0060] In some embodiments, this step may include the following steps (1) to (4):

[0061] (1) Determine the grayscale flow ratio X%, where X is a natural number less than or equal to 100.

[0062] In this step, the grayscale traffic ratio means: X% of the traffic forwarded to this instance is directed to the grayscale device (second version virtual network device) in the device cluster to which the instance belongs, and the remaining (1-X)% of the traffic is still carried by the original device (first version virtual network device) of this cluster.

[0063] In the embodiment of the present disclosure, an initial grayscale flow ratio can be configured first, and then the grayscale flow ratio can be flexibly adjusted according to the performance indicators of the grayscale device. For example, the grayscale flow ratio is configured to be X%, and the initial value of X can be configured to be 10. The value of X can be flexibly adjusted according to the performance indicators of the grayscale device.

[0064] (2) Obtain the number N of first-version virtual network devices included in the virtual network device cluster and the number M of second-version virtual network devices included in the virtual network device cluster.

[0065] (3) Determine that the weight corresponding to the route whose destination is the next hop of the grayscale network function instance and is the first version virtual network device is the product of (100-X) and M.

[0066] For example, Figure 4 As shown, the target network function instance is network function instance 2, and the grayscale traffic ratio of the instance can be X%. Among them, the number of first-version virtual network devices in the virtual network device cluster is N, including: network device 1 to network device N. The number of second-version virtual network devices is M, including: network device N+1 to network device N+M. The weight corresponding to the route whose next hop is the first-version virtual network device is: (100-X)*M.

[0067] (4) Determine that the weight corresponding to the route from the destination to the grayscale network function instance, whose next hop is the second version virtual network device, is the product of X and N.

[0068] For example, Figure 4 As shown, the weight corresponding to the route whose next hop is the second version virtual network device is: X*N.

[0069] In the disclosed embodiment, the routing information corresponding to the target network function instance is configured according to the grayscale traffic ratio corresponding to the target network function instance, and the grayscale traffic ratio is converted into the weights of multiple equivalent routes of this network function instance, thereby achieving distribution of data packets to the original device (i.e., the first version virtual network device) and the grayscale device (i.e., the second version virtual network device) according to the grayscale traffic ratio, thereby improving the accuracy of the grayscale traffic of the cloud network device.

[0070] Figure 5 Schematic diagram of the cloud network device traffic grayscale method process provided by the embodiment of the present disclosure Figure 2 In the embodiment of the present disclosure, the method of selecting a next-hop virtual network device for the target traffic based on the weight according to at least one weighted equal-cost route in S203 and executing the forwarding of the target traffic to the next-hop virtual network device is described in detail. Figure 5 As shown, the method may include:

[0071] S501. Acquire five-tuple information in target traffic, where the five-tuple information includes a source address, a destination address, a source port, a destination port, and a transmission protocol number.

[0072] In the embodiment of the present disclosure, one virtual machine corresponds to one address and multiple ports, wherein the source address and the source port correspond to the address and the port of the source virtual machine, respectively, and the destination address and the destination port correspond to the address and the port of the destination virtual machine, respectively.

[0073] S502: According to the five-tuple information and the weight of at least one weighted equivalent route, a next-hop device in the route with the weight hit is selected through a hash algorithm to forward the target traffic.

[0074] In some embodiments, the routing table includes weights of equivalent-cost routes corresponding to each of the plurality of first-version virtual network devices and weights of equivalent-cost routes corresponding to each of the plurality of second-version virtual network devices; accordingly, this step may include the following steps (1) to (3):

[0075] (1) According to the weights of the equivalent-cost routes corresponding to the plurality of second-version virtual network devices and the weights of the equivalent-cost routes corresponding to the plurality of second-version virtual network devices, the sum of the first I traffic distribution weights ∑ I i=0 W i , and according to the sum of the weights of the first I traffic distributions, determine the M+N hash value intervals as Among them, W0 is 0, Wi represents the weight of the i-th equal-cost route, I=1, 2, ..., N, N+1, ..., N+M, the number of multiple first-version virtual network devices is N, the number of multiple second-version virtual network devices is M, and M and N are positive integers.

[0076] Optionally, the weight of the equivalent-cost routes corresponding to each of the plurality of first-version virtual network devices is: (100-X)*M. The weight of the equivalent-cost routes corresponding to each of the plurality of second-version virtual network devices is X*N; in this embodiment, W0 may be set to 0.

[0077] Exemplarily, let X be 10; the number N of first version virtual network devices (original devices) is 2: first version virtual network device 1 and first version virtual network device 2. The number M of second version virtual network devices (grayscale devices) is 3: second version virtual network device 1, second version virtual network device 2, and second version virtual network device 3.

[0078] Among them, the weight corresponding to the first version of the virtual network device is 90*3=270. The weight corresponding to the second version of the virtual network device is 10*2=20, and the sum of the first I traffic distribution weights (the first 1 to 5 traffic distribution weights) is determined in sequence as follows:

[0079]

[0080] Accordingly, five hash value intervals are determined as: [0, 270), [270, 540), [540, 560), [560, 580), and [580, 600).

[0081] (2) Calculate the hash value of the five-tuple information of the data packet by taking the weights of the equivalent routes corresponding to each of the plurality of second-version virtual network devices and the sum of the weights of the equivalent routes corresponding to each of the plurality of second-version virtual network devices as a modulus.

[0082] The weights of the equivalent-cost routes corresponding to the plurality of second-version virtual network devices and the sum of the weights of the equivalent-cost routes corresponding to the plurality of second-version virtual network devices can be expressed as W: total In some embodiments, the weights of the equivalent-cost routes corresponding to each of the plurality of second-version virtual network devices and the sum of the weights of the equivalent-cost routes corresponding to each of the plurality of second-version virtual network devices are used as a modulus to calculate the hash value of the five-tuple information of the data packet, that is, the remainder obtained by dividing the initial hash value of the five-tuple information by the modulus.

[0083] Exemplarily, the sum of the first traffic distribution weights and the second traffic distribution weights is 100; the five-tuple information of the data packet is hashed to obtain an initial hash value of 1001. With 100 as the modulus, the hash value of the five-tuple information of the data packet is calculated to be 1 (the remainder is 1).

[0084] (3) Determine the target hash value interval where the hash value is located from the M+N hash value intervals, and distribute the data packet to the target virtual network device corresponding to the target hash value interval; wherein the i-th hash value interval corresponds to the i-th network device.

[0085] Exemplarily, let X be 10; the number N of first version virtual network devices (original devices) is 2: first version virtual network device 1 and first version virtual network device 2. The number M of second version virtual network devices (grayscale devices) is 3: second version virtual network device 1, second version virtual network device 2, and second version virtual network device 3. The five determined hash value intervals are: [0, 270), [270, 540), [540, 560), [560, 580), [580, 600); corresponding to first version virtual network device 1 and first version virtual network device 2, second version virtual network device 1, second version virtual network device 2, and second version virtual network device 3, respectively.

[0086] If the hash value of the five-tuple information of the data packet is 1, the target hash value interval where the hash value is located is determined to be [0, 270), that is, the first hash value interval. The data packet is distributed to the target virtual network device corresponding to the first hash value interval (first version virtual network device 1).

[0087] In the disclosed embodiment, a hash algorithm is used to evenly distribute multiple data packets to various network devices, thereby improving the accuracy of data packet distribution.

[0088] Figure 6 A schematic diagram of the structure of a cloud network device traffic grayscale device provided in an embodiment of the present disclosure, such as Figure 6 As shown, the cloud network device traffic grayscale device includes:

[0089] A receiving unit 601 is used to receive target traffic sent from a source virtual machine to a destination virtual machine;

[0090] A matching unit 602 is configured to determine a target network function instance according to the target traffic, query a preconfigured routing table supporting traffic grayscale, and match to obtain at least one weighted equivalent route; wherein the routing table is configured to include: a route and a corresponding weight whose next hop is a first version virtual network device in the virtual network device cluster when the destination is to the network function instance, and a route and a corresponding weight whose next hop is a second version virtual network device in the virtual network device cluster when the destination is to the network function instance; wherein the second version virtual network device is a newly deployed version update in the virtual network device cluster and requires grayscale verification; each virtual network device in the virtual network device cluster is used to carry at least one network function instance;

[0091] The forwarding unit 603 is configured to select a next-hop virtual network device for the target traffic based on the weight according to the at least one weighted equal-cost route, and forward the target traffic to the next-hop virtual network device.

[0092] According to one or more embodiments of the present disclosure, the second version virtual network device in the virtual network device cluster is configured with a grayscale verification exclusive tag, and the network function instance configured with a traffic grayscale policy is scheduled to the virtual network device carrying the grayscale verification exclusive tag; then the forwarding unit 603 selects a next-hop virtual network device for the target traffic based on the weight according to the at least one weighted equivalent route, and executes forwarding of the target traffic to the next-hop virtual network device, specifically including: when the target network function instance is marked as pre-configured with a traffic grayscale policy, scheduling part of the target traffic to the second version virtual network device carrying the grayscale verification exclusive tag according to the weight.

[0093] According to one or more embodiments of the present disclosure, the device also includes: a configuration unit, the configuration unit is used to receive traffic grayscale policy configuration information, the traffic grayscale policy configuration information is used to specify a network function instance that needs to be grayscale verified as a grayscale network function instance and the grayscale traffic ratio corresponding to the grayscale network function instance; generate a grayscale route whose next hop is a second version virtual network device in the virtual network device cluster when the destination is the grayscale network function instance; convert the grayscale traffic ratio into the weights of multiple equivalent routes of the grayscale network function instance and update them into the routing table.

[0094] According to one or more embodiments of the present disclosure, the configuration unit converts the grayscale traffic ratio into the weights of multiple equivalent routes of the grayscale network function instance and updates them into the routing table, specifically including: determining the grayscale traffic ratio X%, where X is a natural number less than or equal to 100; obtaining the number N of first-version virtual network devices included in the virtual network device cluster and the number M of second-version virtual network devices included in the virtual network device cluster; determining that the weight corresponding to the route whose destination to the grayscale network function instance is the first-version virtual network device is the product of (100-X) and M; determining that the weight corresponding to the route whose destination to the grayscale network function instance is the second-version virtual network device is the product of X and N.

[0095] According to one or more embodiments of the present disclosure, the forwarding unit 603 selects a next-hop virtual network device for the target traffic based on the weight according to the at least one weighted equivalent-cost route, and forwards the target traffic to the next-hop virtual network device, specifically including: obtaining five-tuple information in the target traffic, the five-tuple information including the source address, destination address, source port, destination port and transmission protocol number; according to the five-tuple information and the respective weights of the at least one weighted equivalent-cost route, selecting the next-hop device in the route with the weight hit by a hash algorithm to forward the target traffic.

[0096] According to one or more embodiments of the present disclosure, the device also includes: a grayscale traffic adjustment unit; when the grayscale traffic adjustment unit detects that there is an abnormality in the target traffic on the second version virtual network device, the target traffic is migrated back to the first version virtual network device corresponding to the network function instance, and the route in the routing table whose next hop from the destination to the network function instance is the second version virtual network device in the virtual network device cluster is deleted.

[0097] According to one or more embodiments of the present disclosure, the grayscale traffic adjustment unit is also used to increase the number of the target network function instances and / or increase the weight of the target network function instance when it is monitored that the indicator of the second version virtual network device is greater than a preset threshold.

[0098] refer to Figure 7 , which shows a schematic diagram of the structure of an electronic device 700 suitable for implementing the embodiment of the present disclosure, and the electronic device 700 may be a terminal device or a server. The terminal device may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (Portable Android Devices, PADs), portable multimedia players (PMPs), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0099] like Figure 7As shown, the electronic device 700 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 to a random access memory (RAM) 703. Various programs and data required for the operation of the electronic device 700 are also stored in the RAM 703. The processing device 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0100] Typically, the following devices may be connected to the I / O interface 705: input devices 706 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 707 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 708 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 709. The communication devices 709 may allow the electronic device 700 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 7 The electronic device 700 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0101] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 709, or installed from a storage device 708, or installed from a ROM 702. When the computer program is executed by the processing device 701, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0102] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0103] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0104] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.

[0105] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0106] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0107] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".

[0108] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0109] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0110] In a first aspect, according to one or more embodiments of the present disclosure, a cloud network device traffic grayscale method is provided, including:

[0111] Receive target traffic sent from the source virtual machine to the destination virtual machine;

[0112] Determine the target network function instance according to the target traffic, query the preconfigured routing table supporting traffic grayscale, and match to obtain at least one weighted equivalent route; wherein the routing table is configured to include: the route and corresponding weight of the next hop of the first version of the virtual network device in the virtual network device cluster when the destination is to the network function instance, and the route and corresponding weight of the next hop of the second version of the virtual network device in the virtual network device cluster when the destination is to the network function instance; wherein the second version of the virtual network device is a newly deployed version update in the virtual network device cluster and requires grayscale verification; each virtual network device in the virtual network device cluster is used to carry at least one network function instance;

[0113] According to the at least one weighted equal-cost route, a next-hop virtual network device is selected for the target traffic based on the weight, and the target traffic is forwarded to the next-hop virtual network device.

[0114] According to one or more embodiments of the present disclosure, the second version virtual network device in the virtual network device cluster is configured with a grayscale verification exclusive tag, and the network function instance configured with a traffic grayscale policy is scheduled to the virtual network device carrying the grayscale verification exclusive tag; then, according to the at least one weighted equivalent route, the next-hop virtual network device is selected for the target traffic based on the weight, and the target traffic is forwarded to the next-hop virtual network device, including: when the target network function instance is marked as pre-configured with a traffic grayscale policy, part of the target traffic is scheduled to the second version virtual network device carrying the grayscale verification exclusive tag according to the weight.

[0115] According to one or more embodiments of the present disclosure, the method also includes: receiving traffic grayscale policy configuration information, the traffic grayscale policy configuration information is used to specify a network function instance that needs to be grayscale verified as a grayscale network function instance and the grayscale traffic ratio corresponding to the grayscale network function instance; generating a grayscale route whose next hop when the destination is the second version of the virtual network device in the virtual network device cluster; converting the grayscale traffic ratio into weights of multiple equivalent routes of the grayscale network function instance and updating them into a routing table.

[0116] According to one or more embodiments of the present disclosure, converting the grayscale traffic ratio into the weights of multiple equivalent routes of the grayscale network function instance and updating them into the routing table includes: determining the grayscale traffic ratio X%, where X is a natural number less than or equal to 100; obtaining the number N of first-version virtual network devices included in the virtual network device cluster and the number M of second-version virtual network devices included in the virtual network device cluster; determining that the weight corresponding to the route whose destination to the grayscale network function instance is the first-version virtual network device is the product of (100-X) and M; determining that the weight corresponding to the route whose destination to the grayscale network function instance is the second-version virtual network device is the product of X and N.

[0117] According to one or more embodiments of the present disclosure, the method of selecting a next-hop virtual network device for the target traffic based on the weight according to the at least one weighted equivalent-cost route, and forwarding the target traffic to the next-hop virtual network device includes: obtaining five-tuple information in the target traffic, the five-tuple information including source address, destination address, source port, destination port and transmission protocol number; and selecting the next-hop device in the route with the weight hit by a hash algorithm to forward the target traffic according to the five-tuple information and the respective weights of the at least one weighted equivalent-cost route.

[0118] According to one or more embodiments of the present disclosure, the method also includes: when an abnormality is detected in the target traffic on the second version virtual network device, the target traffic is migrated back to the first version virtual network device corresponding to the network function instance, and the route in the routing table whose next hop from the destination to the network function instance is the second version virtual network device in the virtual network device cluster is deleted.

[0119] According to one or more embodiments of the present disclosure, the method further includes: when it is monitored that the indicator of the second version virtual network device is greater than a preset threshold, increasing the number of the target network function instances and / or increasing the weight of the target network function instance.

[0120] In a second aspect, according to one or more embodiments of the present disclosure, a cloud network device traffic grayscale device is provided, including:

[0121] A receiving unit, used for receiving target traffic sent from a source virtual machine to a destination virtual machine;

[0122] A matching unit, configured to determine a target network function instance according to the target traffic, query a preconfigured routing table supporting traffic grayscale, and match to obtain at least one weighted equivalent route; wherein the routing table is configured to include: a route and a corresponding weight whose next hop is a first version virtual network device in the virtual network device cluster when the destination is to the network function instance, and a route and a corresponding weight whose next hop is a second version virtual network device in the virtual network device cluster when the destination is to the network function instance; wherein the second version virtual network device is a newly deployed version update in the virtual network device cluster and requires grayscale verification; each virtual network device in the virtual network device cluster is used to carry at least one network function instance;

[0123] A forwarding unit is used to select a next-hop virtual network device for the target traffic based on the weight according to the at least one weighted equal-cost route, and forward the target traffic to the next-hop virtual network device.

[0124] According to one or more embodiments of the present disclosure, the second version virtual network device in the virtual network device cluster is configured with a grayscale verification exclusive tag, and the network function instance configured with a traffic grayscale policy is scheduled to the virtual network device carrying the grayscale verification exclusive tag; then the forwarding unit, according to the at least one weighted equivalent route, selects the next-hop virtual network device for the target traffic based on the weight, and executes forwarding of the target traffic to the next-hop virtual network device, specifically including: when the target network function instance is marked as pre-configured with a traffic grayscale policy, scheduling part of the target traffic to the second version virtual network device carrying the grayscale verification exclusive tag according to the weight.

[0125] According to one or more embodiments of the present disclosure, the device also includes: a configuration unit, the configuration unit is used to receive traffic grayscale policy configuration information, the traffic grayscale policy configuration information is used to specify a network function instance that needs to be grayscale verified as a grayscale network function instance and the grayscale traffic ratio corresponding to the grayscale network function instance; generate a grayscale route whose next hop is a second version virtual network device in the virtual network device cluster when the destination is the grayscale network function instance; convert the grayscale traffic ratio into the weights of multiple equivalent routes of the grayscale network function instance and update them into the routing table.

[0126] According to one or more embodiments of the present disclosure, the configuration unit converts the grayscale traffic ratio into the weights of multiple equivalent routes of the grayscale network function instance and updates them into the routing table, specifically including: determining the grayscale traffic ratio X%, where X is a natural number less than or equal to 100; obtaining the number N of first-version virtual network devices included in the virtual network device cluster and the number M of second-version virtual network devices included in the virtual network device cluster; determining that the weight corresponding to the route whose destination is the first-version virtual network device as the next hop to the grayscale network function instance is the product of (100-X) and M; determining that the weight corresponding to the route whose destination is the second-version virtual network device as the next hop to the grayscale network function instance is the product of X and N.

[0127] According to one or more embodiments of the present disclosure, the forwarding unit selects a next-hop virtual network device for the target traffic based on the weight according to the at least one weighted equivalent-cost route, and forwards the target traffic to the next-hop virtual network device, specifically including: obtaining five-tuple information in the target traffic, the five-tuple information including the source address, destination address, source port, destination port and transmission protocol number; according to the five-tuple information and the respective weights of the at least one weighted equivalent-cost route, selecting the next-hop device in the route with the weight hit by a hash algorithm to forward the target traffic.

[0128] According to one or more embodiments of the present disclosure, the device also includes: a grayscale traffic adjustment unit; when the grayscale traffic adjustment unit detects that there is an abnormality in the target traffic on the second version virtual network device, the target traffic is migrated back to the first version virtual network device corresponding to the network function instance, and the route in the routing table whose next hop from the destination to the network function instance is the second version virtual network device in the virtual network device cluster is deleted.

[0129] According to one or more embodiments of the present disclosure, the grayscale traffic adjustment unit is also used to increase the number of the target network function instances and / or increase the weight of the target network function instance when it is monitored that the indicator of the second version virtual network device is greater than a preset threshold.

[0130] In a third aspect, according to one or more embodiments of the present disclosure, there is provided an electronic device, comprising: at least one processor and a memory;

[0131] The memory stores computer-executable instructions;

[0132] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the cloud network device traffic grayscale method as described in the first aspect and various possible designs of the first aspect.

[0133] In a fourth aspect, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer execution instructions. When a processor executes the computer execution instructions, the cloud network device traffic grayscale method described in the first aspect and various possible designs of the first aspect is implemented.

[0134] In a fifth aspect, according to one or more embodiments of the present disclosure, a computer program product is provided, including a computer program, which, when executed by a processor, implements the cloud network device traffic grayscale method described in the first aspect and various possible designs of the first aspect.

[0135] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0136] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0137] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. A cloud network device traffic grayscale method, characterized in that: include: Receive target traffic sent from the source virtual machine to the destination virtual machine; Determine the target network function instance according to the target traffic, query the preconfigured routing table that supports traffic grayscale, and match to obtain at least one weighted equivalent route; wherein the routing table is configured to include: the route and corresponding weight of the next hop of the first version virtual network device in the virtual network device cluster when the destination is to the network function instance, and the route and corresponding weight of the next hop of the second version virtual network device in the virtual network device cluster when the destination is to the network function instance; wherein the second version virtual network device is a newly deployed version update in the virtual network device cluster and requires grayscale verification; each virtual network device in the virtual network device cluster is used to carry at least one network function instance; wherein the target traffic is similar feature traffic under the same network function instance, and is used to compare and analyze the processing performance of the first version virtual network device and the second version virtual network device using traffic with similar features under the same network function instance; According to the at least one weighted equal-cost route, a next-hop virtual network device is selected for the target traffic based on the weight, and the target traffic is forwarded to the next-hop virtual network device.

2. The method according to claim 1, characterized in that The second version virtual network device in the virtual network device cluster is configured with a grayscale verification exclusive tag, and the network function instance configured with a traffic grayscale policy is scheduled to the virtual network device carrying the grayscale verification exclusive tag; Then, selecting a next-hop virtual network device for the target traffic based on the weight according to the at least one weighted equal-cost route, and forwarding the target traffic to the next-hop virtual network device includes: When the target network function instance is marked as pre-configured with a traffic grayscale policy, part of the target traffic is scheduled to a second version virtual network device carrying a grayscale verification exclusive tag according to the weight.

3. The method according to claim 1, characterized in that: The method further comprises: Receive traffic grayscale strategy configuration information, where the traffic grayscale strategy configuration information is used to specify a network function instance that needs to be grayscale verified as a grayscale network function instance and a grayscale traffic ratio corresponding to the grayscale network function instance; Generate a grayscale route whose next hop is a second version virtual network device in the virtual network device cluster when the destination is to the grayscale network function instance; The grayscale traffic ratio is converted into weights of multiple equal-cost routes of the grayscale network function instance and updated into a routing table.

4. The method according to claim 3, characterized in that The converting the grayscale traffic ratio into weights of multiple equal-cost routes of the grayscale network function instance and updating them into the routing table includes: Determine the grayscale flow ratio X%, where X is a natural number less than or equal to 100; Obtaining the number N of first-version virtual network devices included in the virtual network device cluster and the number M of second-version virtual network devices included in the virtual network device cluster; Determine that the weight corresponding to the route whose destination is the next hop of the grayscale network function instance as the first version virtual network device is the product of (100-X) and M; Determine that the weight corresponding to the route whose destination is the next hop of the grayscale network function instance as the second version virtual network device is the product of X and N.

5. The method according to claim 1, characterized in that The selecting a next-hop virtual network device for the target traffic based on the weight according to the at least one weighted equal-cost route, and forwarding the target traffic to the next-hop virtual network device includes: Acquire five-tuple information in the target traffic, the five-tuple information including source address, destination address, source port, destination port and transport protocol number; According to the five-tuple information and the weight of each of the at least one weighted equivalent route, a next-hop device in the route with a weight hit is selected through a hash algorithm to forward the target traffic.

6. The method according to claim 1, characterized in that The method further comprises: When an abnormality is detected in the target traffic on the second version virtual network device, the target traffic is migrated back to the first version virtual network device corresponding to the network function instance, and the route in the routing table whose next hop is the second version virtual network device in the virtual network device cluster when the destination is to the network function instance is deleted.

7. The method according to claim 1, characterized in that The method further comprises: When it is monitored that the indicator of the second version virtual network device is greater than a preset threshold, the number of the target network function instances is increased and / or the weight of the target network function instance is increased.

8. A cloud network device traffic grayscale device, characterized in that: include: A receiving unit, used for receiving target traffic sent from a source virtual machine to a destination virtual machine; A matching unit, configured to determine a target network function instance according to the target traffic, query a preconfigured routing table supporting traffic grayscale, and match to obtain at least one weighted equivalent route; wherein the routing table is configured to include: a route and a corresponding weight whose next hop is a first version virtual network device in a virtual network device cluster when the destination is to the network function instance, and a route and a corresponding weight whose next hop is a second version virtual network device in the virtual network device cluster when the destination is to the network function instance; wherein the second version virtual network device is a newly deployed version update in the virtual network device cluster and requires grayscale verification; each virtual network device in the virtual network device cluster is used to carry at least one network function instance; wherein the target traffic is traffic with similar characteristics under the same network function instance, and is used to compare and analyze the processing performance of the first version virtual network device and the second version virtual network device using traffic with similar characteristics under the same network function instance; A forwarding unit is used to select a next-hop virtual network device for the target traffic based on the weight according to the at least one weighted equal-cost route, and forward the target traffic to the next-hop virtual network device.

9. An electronic device, characterized in that: include: Processor and memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor executes the cloud network device traffic grayscale method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions. When the processor executes the computer-executable instructions, the cloud network device traffic grayscale method as described in any one of claims 1 to 7 is implemented.

11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the cloud network device traffic grayscale method as described in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • API grayscale release method and apparatus based on cloud gateway, and computer device

    WO2022100393A1