CN114374635A - Route detection method, device, equipment and storage medium - Google Patents

Route detection method, device, equipment and storage medium Download PDF

Info

Publication number
CN114374635A
CN114374635A CN202111529399.9A CN202111529399A CN114374635A CN 114374635 A CN114374635 A CN 114374635A CN 202111529399 A CN202111529399 A CN 202111529399A CN 114374635 A CN114374635 A CN 114374635A
Authority
CN
China
Prior art keywords
routing
information
service request
routing device
node
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111529399.9A
Other languages
Chinese (zh)
Other versions
CN114374635B (en
Inventor
董昱
张义飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba China Co Ltd
Original Assignee
Alibaba China Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba China Co Ltd filed Critical Alibaba China Co Ltd
Priority to CN202111529399.9A priority Critical patent/CN114374635B/en
Publication of CN114374635A publication Critical patent/CN114374635A/en
Application granted granted Critical
Publication of CN114374635B publication Critical patent/CN114374635B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/38Flow based routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0876Network utilisation, e.g. volume of load or congestion level

Landscapes

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

Abstract

The disclosed embodiment relates to a route detection method, a device, equipment and a storage medium, wherein the route information of a service request by a second routing device is obtained by obtaining the flow of a target service and routing the service request in the flow based on the second routing device, the route information comprises the information of a second routing node selected by the second routing device for the service request, and whether the route results of the second routing device and the first routing device are consistent or not is determined based on the information of the second routing node and the information of a first routing node selected by the first routing device for the service request. The embodiment of the disclosure can accurately judge whether the routing capabilities of different routing devices are consistent or not by judging the routing results of the same service request on different routing devices.

Description

Route detection method, device, equipment and storage medium
Technical Field
The embodiment of the disclosure relates to the technical field of resource optimization, and in particular, to a method, an apparatus, a device and a storage medium for detecting a route.
Background
The related art may split the function that belongs to the application program into separate processes, and the split separate processes are referred to as Sidecar. Sidecar is often applied to Service Mesh (Service Mesh) technology to replace a conventional Software Development Kit (SDK) to implement routing functions. However, after replacing the SDK with the Sidecar, how to determine whether the routing capabilities of the Sidecar and the SDK are consistent is an urgent technical problem to be solved.
Disclosure of Invention
In order to solve the foregoing technical problem, embodiments of the present disclosure provide a method, an apparatus, a device, and a storage medium for route detection.
A first aspect of the embodiments of the present disclosure provides a method for detecting a route, including: acquiring the flow of a target service, wherein the flow of the target service comprises a service request and information of a first routing node selected by a first routing device for the service request; routing the service request based on the second routing device to obtain routing information of the service request by the second routing device, wherein the routing information comprises information of a second routing node selected by the second routing device; and determining whether the routing results of the second routing device and the first routing device are consistent or not based on the information of the first routing node and the information of the second routing node.
A second aspect of the embodiments of the present disclosure provides a method for detecting a route, including: acquiring the flow output by the target service on the SDK routing device by routing, wherein the flow comprises a service request and information of a first routing node selected by the SDK routing device for the service request; routing the service request based on the Sidecar routing device to obtain routing information of the service request by the Sidecar routing device, wherein the routing information comprises information of a second routing node selected by the Sidecar routing device; and determining whether the routing results of the SDK routing device and the Sidecar routing device are consistent or not based on the information of the first routing node and the information of the second routing node. The SDK router is a router implemented by SDK, and the Sidecar router is a router implemented by Sidecar.
A third aspect of the embodiments of the present disclosure provides a route detection apparatus, including:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring the flow of a target service, and the flow of the target service comprises a service request and information of a first routing node selected for the service request by a first routing device;
the routing module is used for routing the service request based on the second routing device to obtain the routing information of the service request by the second routing device, wherein the routing information comprises the information of a second routing node selected by the second routing device;
and the first determining module is used for determining whether the routing results of the second routing device and the first routing device are consistent or not based on the information of the first routing node and the information of the second routing node.
A fourth aspect of the embodiments of the present disclosure provides a route detection apparatus, including:
the system comprises an acquisition module, a service request module and a service request module, wherein the acquisition module is used for acquiring the flow output by a target service on an SDK routing device in a routing way, and the flow comprises a service request and information of a first routing node selected by the SDK routing device for the service request;
the routing module is used for routing the service request based on the Sidecar routing device to obtain routing information of the service request by the Sidecar routing device, wherein the routing information comprises information of a second routing node selected by the Sidecar routing device;
and the determining module is used for determining whether the routing results of the SDK routing device and the Sidecar routing device are consistent or not based on the information of the first routing node and the information of the second routing node.
A fifth aspect of embodiments of the present disclosure provides a route detection device, where the machine device includes a memory and a processor, where the memory stores a computer program, and when the computer program is executed by the processor, the method of the first aspect or the second aspect may be implemented.
A sixth aspect of embodiments of the present disclosure provides a computer-readable storage medium having a computer program stored therein, which, when executed by a processor, may implement the method of the first or second aspect described above.
Compared with the prior art, the technical scheme provided by the embodiment of the disclosure has the following advantages:
the embodiment of the disclosure obtains the routing information of the second routing device for the service request by obtaining the traffic of the target service and routing the service request in the traffic based on the second routing device, where the routing information includes information of a second routing node selected by the second routing device for the service request, and determines whether the routing results of the second routing device and the first routing device are consistent based on the information of the second routing node and the information of a first routing node selected by the first routing device for the service request. The embodiment of the disclosure can accurately judge whether the routing capabilities of the second routing device and the first routing device are consistent by routing the acquired service request on the second routing device and judging the routing result and the routing result of the service request on the first routing device.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present disclosure, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is a schematic diagram of a route detection scenario provided by an embodiment of the present disclosure;
fig. 2 is a flowchart of a route detection method provided by an embodiment of the present disclosure;
fig. 3 is a schematic diagram of a traffic acquisition scenario provided by an embodiment of the present disclosure;
fig. 4 is a schematic diagram of another traffic acquisition scenario provided by an embodiment of the present disclosure;
FIG. 5 is a schematic diagram of a scenario for implementing route detection based on FIG. 3;
fig. 6 is a schematic diagram of a routing capability analysis method provided by an embodiment of the present disclosure;
fig. 7 is a schematic diagram of a routing process provided by an embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of a route detection device according to an embodiment of the present disclosure;
fig. 9 is a schematic structural diagram of a route detection device in an embodiment of the present disclosure.
Detailed Description
In order that the above objects, features and advantages of the present disclosure may be more clearly understood, aspects of the present disclosure will be further described below. It should be noted that the embodiments and features of the embodiments of the present disclosure may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure, but the present disclosure may be practiced in other ways than those described herein; it is to be understood that the embodiments disclosed in the specification are only a few embodiments of the present disclosure, and not all embodiments.
To solve the problems in the related art, the embodiments of the present disclosure provide a route detection scheme. Fig. 1 is a schematic diagram of a route detection scenario provided in an embodiment of the present disclosure. The route detection scenario shown in fig. 1 includes a route detection device and a second route device. The route detection device may be understood as an exemplary device having data transceiving capability and data processing capability. The device may be a hardware device, or may be a functional module implemented based on software.
In the scenario of fig. 1, the route detection module may actively acquire or passively receive traffic of a target service, and analyze the traffic to obtain a service request and information of a first routing node selected by the first routing node for the service request.
After obtaining the service request and the information of the first routing node, the routing detection device sends the service request to the second routing device, so that the second routing device routes the service request and feeds back routing information, wherein the routing information comprises information of a second routing node selected by the second routing device for the service request.
The second routing device and the first routing device may be understood as two routing devices implemented in the same manner or different manners, for example, the first routing device may be a routing device implemented by an SDK, and the second routing device may be a routing device implemented by a sidecar, but the first routing device and the second routing device are not limited to being implemented by an SDK or a sidecar.
Further, after receiving the routing information fed back by the second routing device, the routing detection device may determine whether the routing results of the second routing device and the first routing device are consistent based on the information of the second routing node in the routing information and the information of the first routing node carried in the traffic. For example, in some embodiments, when the first routing node and the second routing node satisfy at least one condition of being the same, belonging to the same machine room, belonging to the same packet, and belonging to the same routing unit, it may be determined that the routing results of the first routing node and the second routing node are consistent, and otherwise, it may be determined that the routing results of the first routing node and the second routing node are inconsistent.
Considering that there is a scenario in which one routing device replaces another routing device in an actual scenario, it is generally required in such a scenario that the routing capabilities of the two routing devices are consistent, that is, when the same routing task is performed, it is to be ensured that the routing results of the two routing devices are consistent. According to the embodiment of the disclosure, after the routing result of the first routing device for the service request is obtained, the same service request is routed based on the second routing device, and consistency judgment is performed on the routing results (i.e., the selected routing nodes) of the second routing device and the first routing device, so that whether the routing capabilities of the first routing device and the second routing device are consistent or not can be accurately determined, and thus, the service expectation and the routing capabilities of the second routing device and the first routing device are consistent.
It should be noted that fig. 1 is only an exemplary illustration of the embodiment of the present disclosure, and is not a limiting limitation, and in other embodiments, modifications and extensions may be made on the basis of the embodiment of fig. 1.
The embodiment of fig. 1 and some variants of the embodiment of fig. 1 are explained and illustrated below with reference to exemplary embodiments.
For example, fig. 2 is a flowchart of a route detection method provided in an embodiment of the present disclosure, where the method may be performed by a route detection apparatus, and the route detection apparatus may be embodied as any device having data transceiving capability and processing capability. The device may be in the form of hardware or software, and is not particularly limited in this embodiment. As shown in fig. 2, in some embodiments, a route detection method provided in an embodiment of the present disclosure includes:
step 201, obtaining a traffic of a target service, where the traffic of the target service includes a service request and information of a first routing node selected by a first routing device for the service request.
The target service referred to in the embodiments of the present disclosure may be understood as any specified service. In some scenarios, the user may send the information of the target service to the route detection device through the user client, or the information of the target service may be configured in advance and stored in the route detection device.
In an implementation manner of the embodiment of the present disclosure, the flow referred to in the embodiment of the present disclosure may be understood as a mirror flow obtained by performing flow mirroring on real flow by means of flow mirroring. For example, fig. 3 is a schematic diagram of a traffic acquisition scenario provided in the embodiment of the present disclosure. In fig. 3, the route detection apparatus and the first routing apparatus are exemplarily mounted on the same machine device, and an Application (APP) of a target service runs on the machine device. As shown in fig. 3, in an embodiment, a user may initiate a traffic mirroring request through a client, and carry at least one of information such as a mirroring operation duration and an Internet Protocol (IP) address of a machine device in the traffic mirroring request. After receiving the traffic mirroring request, the route detection device performs traffic mirroring on traffic of the target service on the first routing device (that is, traffic sent by the first routing device, where the traffic includes the service request of the APP and information of a first routing node (not shown in fig. 3) selected by the first routing device for the service request), so as to obtain mirrored traffic of the target service. When the traffic mirroring is performed, for example, the traffic of the target service may be grabbed by a grabbing tool (such as Tcpdump, but not limited to Tcpdump).
It should be noted that the scenario shown in fig. 3 is only an exemplary scenario and not a unique scenario, and actually, the route detection device may not be disposed on the machine device where the first routing device is located, but may be independent from the machine device where the first routing device is located.
In another implementation manner of the embodiment of the present disclosure, the flow rate referred to in the embodiment of the present disclosure may also be understood as a simulated flow rate obtained by simulation through a simulation means. For example, fig. 4 is a schematic view of another traffic acquisition scenario provided by the embodiment of the present disclosure, and in the scenario of fig. 4, information such as an identifier, a service name, a method, a parameter, a service request, and a routing node, which are carried by traffic of a target service, may be simulated by a preset simulation platform, so as to obtain simulated traffic of the target service. The route detection device may receive the simulated traffic for the target service from the simulation platform.
It should be noted that the two manners of acquiring the traffic of the target service are only exemplary manners, and are not unique manners, and actually, the manner of acquiring the traffic may be configured according to needs in an actual scenario.
Step 202, performing routing on the service request based on the second routing device to obtain routing information of the service request by the second routing device, where the routing information includes information of the second routing node selected by the second routing device.
In the embodiments of the present disclosure, the second routing device may be exemplarily understood as a routing device for replacing the first routing device. The second routing device may be implemented in the same manner as the first routing device (e.g., both implemented by SDK or both implemented by sidecar), or may be implemented differently. For ease of understanding, embodiments of the present disclosure assume that the first routing device is implemented by the SDK and the second routing device is implemented by the sidecar.
Fig. 5 is a schematic diagram of a scenario for implementing route detection based on fig. 3. As shown in fig. 5, in a routing detection scenario according to the embodiment of the present disclosure, after obtaining a traffic of a target service, a routing detection apparatus first analyzes the traffic to obtain a service request in the traffic and information of a first routing node. Then, the information of the first routing node is stored locally, and the service request is sent to the second routing device.
For example, since the traffic of the target service is already sent to the first routing node by the first routing device in the scenario shown in fig. 5, in order to avoid duplication, in an exemplary embodiment, the route detection device may further add a target flag bit to the service request before sending the service request to the second routing device, where the target flag bit is used to instruct the second routing device to calculate the routing node of the service request, but not send the service request. After receiving the service request, the second routing device calculates according to a preset routing rule to obtain a second routing node selected for the service request, and feeds back routing information containing information of the second routing node to the routing detection device, so that the routing detection device determines whether routing results of the second routing device and the first routing device are consistent or not based on the information of the first routing node and the information of the second routing node, but does not send the service request to the second routing node.
Step 203, determining whether the routing results of the second routing device and the first routing device are consistent or not based on the information of the first routing node and the information of the second routing node.
In this embodiment of the present disclosure, when the first routing node and the second routing node satisfy at least one of the following conditions, it is determined that the routing results of the second routing device and the first routing device are consistent, otherwise, they are inconsistent: belonging to the same machine room, the same group and the same routing unit.
When the routing results of the second routing device and the first routing device are consistent, the capabilities of the second routing device and the first routing device may be considered to be the same, and when the routing results of the second routing device and the first routing device are inconsistent, the capabilities of the second routing device and the first routing device may be considered to be different.
The embodiment of the disclosure obtains the routing information of the second routing device for the service request by obtaining the traffic of the target service and routing the service request in the traffic based on the second routing device, where the routing information includes information of a second routing node selected by the second routing device for the service request, and determines whether the routing results of the second routing device and the first routing device are consistent based on the information of the second routing node and the information of a first routing node selected by the first routing device for the service request. The embodiment of the disclosure can accurately judge whether the routing capabilities of the second routing device and the first routing device are consistent by routing the acquired service request on the second routing device and judging the routing result and the routing result of the service request on the first routing device.
For example, in some embodiments of the present disclosure, a result of multiple routing detections may be statistically analyzed in a probabilistic manner, so as to obtain a more accurate detection result.
For example, fig. 6 is a schematic diagram of a routing capability analysis method provided in an embodiment of the present disclosure. As shown in fig. 6, the method includes:
step 601, performing multiple routing detections within a preset time period to obtain multiple detection results, where the detection results are used to indicate whether the routing results of the first routing device and the second routing device are consistent.
Step 602, if the ratio of the results indicating that the routing results are consistent among the plurality of detection results is greater than or equal to a preset threshold, determining that the routing capabilities of the first routing device and the second routing device are consistent.
Specifically, in an implementation manner of the embodiment of the present disclosure, the route detection device performs multiple route detection operations within a preset time period (for a specific detection process, see fig. 2, which is not described herein again), and performs an operation of determining whether the routing results of the first routing device and the second routing device are consistent in each detection operation, and obtains a corresponding result.
After the preset time period, the routing detection device carries out statistical analysis on a plurality of detection results obtained in the preset time period, and if the proportion of consistent routing results is larger than or equal to a preset threshold value, the routing capabilities of the first routing device and the second routing device are determined to be consistent. Otherwise, the routing capabilities of the first routing device and the second routing device are determined to be inconsistent.
According to the embodiment of the invention, by carrying out multiple times of route detection and carrying out statistical analysis on the results of the multiple times of route detection, the influence of random events on the detection results can be avoided, and the accuracy of the route capability detection is improved.
For example, in some implementations of the embodiment of the present disclosure, the routing message fed back by the second routing device to the route detection device may further include information of a routing procedure. After step 203, may further include:
and 204, if the routing results of the first routing node and the second routing node are inconsistent, drawing a routing process diagram based on the information of the routing process fed back by the second routing device.
In the embodiment of the disclosure, at least one routing rule is preset in the second routing device. After receiving the service request, the second routing device calculates each routing rule in turn to obtain a routing result corresponding to each routing rule. The second routing device sends the corresponding relation between each routing rule and the routing result obtained based on the routing rule to the routing detection device as a routing process.
And when the routing results of the first routing device and the second routing device are inconsistent, the routing detection device draws a routing process schematic diagram based on the routing process information fed back by the second routing device to obtain a visual result of the routing process.
Fig. 7 is a schematic diagram of a routing process provided by an embodiment of the present disclosure. In fig. 7, the first routing rule, the second routing rule, and the third routing rule are exemplarily set in the second routing apparatus. After receiving the service request, the second routing device first selects from the preset routing nodes 1, 2, 3 and 4 based on the first routing rule. Assuming that the routing nodes selected based on the first routing rule are routing node 1, routing node 2, and routing node 3, the second routing apparatus continues to select among routing node 1, routing node 2, and routing node 3 based on the second routing rule, and if the routing node 1 and routing node 2 are obtained based on the second routing rule, further selects among routing node 1 and routing node 2 based on the third routing rule, and obtains routing node 1. The routing node 1 is a routing node selected by the second routing device for the service request. The process of selecting the routing node 1, the routing node 2 and the routing node 3 through the first routing rule, the process of selecting the routing node 1 and the routing node 2 through the second routing rule and the process of selecting the routing node 1 through the third routing rule are the routing process of the second routing device. The information of the routing process of the second routing device is sent to the routing detection device, and the routing detection device can draw a routing process diagram of the second routing device.
It should be noted that the method for sending information of the routing process to the route detection device may also be applied to the embodiment of fig. 6. When it is determined that the routing capabilities of the first routing device and the second routing device are not consistent based on the method in the embodiment of fig. 6, multiple routing processes within a preset time period may be plotted on one graph based on the similar method.
According to the embodiment of the disclosure, the information of the routing process of the second routing device is also reported to the routing detection device, so that when the routing detection device detects that the routing capabilities of the second routing device and the first routing device are inconsistent, the routing process diagram of the second routing device is drawn, a technician can be helped to quickly locate the position of the routing rule causing the error, and the routing rule locating efficiency and accuracy are improved.
The embodiment of the present disclosure further provides a method for detecting a route, which may exemplarily include:
s1, obtaining the flow output by the target service on the SDK router, wherein the flow includes the service request and the information of the first routing node selected by the SDK router for the service request.
The SDK routing device is a routing device implemented by an SDK.
S2, routing the service request based on the sdecar routing apparatus to obtain routing information of the sdecar routing apparatus for the service request, where the routing information includes information of the second routing node selected by the sdecar routing apparatus.
Here, the Sidecar (Sidecar) routing device is a routing device implemented by Sidecar.
S3, based on the information of the first routing node and the information of the second routing node, determining whether the routing results of the SDK routing device and the Sidecar routing device are consistent.
The execution manner and the beneficial effect of S1 to S3 may refer to the method in any one of fig. 2 to 7, and are not described herein again.
Fig. 8 is a schematic structural diagram of a route detection device according to an embodiment of the present disclosure, and as shown in fig. 8, the route detection device 80 includes:
an obtaining module 81, configured to obtain a traffic of a target service, where the traffic includes a service request and information of a first routing node selected by a first routing device for the service request;
a routing module 82, configured to perform routing on the service request based on a second routing apparatus, to obtain routing information of the service request by the second routing apparatus, where the routing information includes information of a second routing node selected by the second routing apparatus;
a first determining module 83, configured to determine whether the routing results of the second routing device and the first routing device are consistent based on the information of the first routing node and the information of the second routing node.
In one embodiment, the routing information of the service request by the second routing device further includes information of a routing process;
the route detection device 80 may further include:
and the drawing module is used for drawing a routing process diagram based on the information of the routing process when the routing results of the first routing node and the second routing node are inconsistent.
In one embodiment, the traffic of the target service is mirror traffic;
a first acquisition module comprising:
and the mirror image submodule is used for carrying out flow mirror image on the flow of the target service on the first routing device to obtain the mirror image flow of the target service.
In one embodiment, the traffic of the target service is simulation traffic;
a first acquisition module comprising:
and the receiving submodule is used for receiving the simulation flow sent by the simulation platform.
In one embodiment, the route detection device 80 may further include:
a processing module, configured to add a target flag bit in the service request, where the target flag bit is used to instruct the second routing device to calculate a routing node of the service request, but not send the service request.
In an embodiment, the determining module is configured to determine that the routing results of the second routing device and the first routing device are consistent if the first routing node and the second routing node satisfy at least one of the following conditions:
belong to the same machine room;
belong to the same group;
belong to the same routing unit.
In one embodiment, the route detection device 80 performs multiple route detections within a preset time period to obtain multiple detection results, where the detection results are used to indicate whether the routing results of the first routing device and the second routing device are consistent;
the route detection device 80 includes:
and a second determining module, configured to determine that the routing capabilities of the first routing device and the second routing device are consistent if a ratio of results indicating that the routing results are consistent in the multiple detection results is greater than or equal to a preset threshold.
The device provided by the embodiment of the present disclosure can execute the method of any one of fig. 1 to 7, and the execution manner and the intended effect are similar, and are not described again here.
The embodiment of the present disclosure further provides a route detection device 1000, where the route detection device 1000 at least includes:
an obtaining module 1001, configured to obtain a traffic output by a target service on an SDK routing device, where the traffic includes a service request and information of a first routing node selected by the SDK routing device for the service request;
a routing module 1002, configured to perform routing on the service request based on the sdecar routing apparatus, to obtain routing information of the sdecar routing apparatus on the service request, where the routing information includes information of a second routing node selected by the sdecar routing apparatus;
a determining module 1003, configured to determine whether the routing results of the SDK routing device and the Sidecar routing device are consistent based on the information of the first routing node and the information of the second routing node.
It should be noted that the implementation manner and the beneficial effects of the route detection apparatus 1000 are similar to those of the route detection apparatus 80, and are not described herein again.
The embodiment of the present disclosure further provides a route detection device, which includes a processor and a memory, where the memory stores a computer program, and when the computer program is executed by the processor, the method of any one of the above method embodiments may be implemented.
For example, fig. 9 is a schematic structural diagram of a route detection device in an embodiment of the present disclosure. Referring specifically to fig. 9, a schematic structural diagram of a routing detection device 900 suitable for implementing the embodiments of the present disclosure is shown. The route detection device 900 in the embodiments of the present disclosure may include, but is not limited to, a device having a data transceiving function and a data processing capability, such as a notebook computer, a PAD (tablet), a desktop computer, and the like. The route detection device shown in fig. 9 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 9, the route detection apparatus 900 may include a processing device (e.g., a central processing unit, a graphic processor, etc.) 901, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)902 or a program loaded from a storage device 909 into a Random Access Memory (RAM) 903. In the RAM 903, various programs and data necessary for the operation of the route detection apparatus 900 are also stored. The processing apparatus 901, the ROM 902, and the RAM 903 are connected to each other through a bus 904. An input/output (I/O) interface 905 is also connected to bus 904.
Generally, the following devices may be connected to the I/O interface 905: input devices 906 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 909 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage devices 909 including, for example, magnetic tapes, hard disks, and the like; and a communication device 909. The communication means 909 may allow the route detection apparatus 900 to perform wireless or wired communication with other apparatuses to exchange data. While fig. 9 illustrates a route detection apparatus 900 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication device 909, or installed from the storage device 909, or installed from the ROM 902. The computer program performs the above-described functions defined in the methods of the embodiments of the present disclosure when executed by the processing apparatus 901.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the route detection device; or may exist separately without being assembled into the route detection device.
The computer readable medium carries one or more programs which, when executed by the route detection device, cause the route detection device to: acquiring the flow of a target service, wherein the flow of the target service comprises a service request and information of a first routing node selected by a first routing device for the service request; routing the service request based on the second routing device to obtain routing information of the service request by the second routing device, wherein the routing information comprises information of a second routing node selected by the second routing device; and determining whether the routing results of the second routing device and the first routing device are consistent or not based on the information of the first routing node and the information of the second routing node.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of an element does not in some cases constitute a limitation on the element itself.
The functions described herein above 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 a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The 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, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The embodiments of the present disclosure further provide a computer-readable storage medium, where a computer program is stored in the storage medium, and when the computer program is executed by a processor, the method of any one of the embodiments in fig. 1 to 7 may be implemented, where the execution manner and the beneficial effects are similar, and are not described herein again.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present disclosure, which enable those skilled in the art to understand or practice the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (12)

1. A method for detecting a route, comprising:
acquiring the flow of a target service, wherein the flow comprises a service request and information of a first routing node selected by a first routing device for the service request;
routing the service request based on a second routing device to obtain routing information of the service request by the second routing device, wherein the routing information comprises information of a second routing node selected by the second routing device;
and determining whether the routing results of the second routing device and the first routing device are consistent or not based on the information of the first routing node and the information of the second routing node.
2. The method of claim 1, wherein the routing information of the service request by the second routing device further includes information of a routing procedure;
and when the routing results of the first routing node and the second routing node are inconsistent, drawing a routing process diagram based on the information of the routing process.
3. The method of claim 1, wherein the traffic of the target service is mirror traffic;
the acquiring the traffic of the target service includes:
and carrying out flow mirroring on the flow of the target service on the first routing device to obtain the mirror flow of the target service.
4. The method of claim 1, wherein the traffic of the target service is emulated traffic;
the acquiring the traffic of the target service includes:
and receiving the simulation flow sent by the simulation platform.
5. The method according to any of claims 1-4, wherein before the routing the service request based on the second routing device and obtaining the routing information of the service request by the second routing device, the method further comprises:
and adding a target zone bit in the service request, wherein the target zone bit is used for indicating the second routing device to calculate the routing node of the service request, but not sending the service request.
6. The method according to any one of claims 1-4, wherein the determining whether the routing results of the second routing device and the first routing device are consistent based on the information of the first routing node and the information of the second routing node comprises:
if the first routing node and the second routing node satisfy at least one of the following conditions, determining that the routing results of the second routing device and the first routing device are consistent:
belong to the same machine room;
belong to the same group;
belong to the same routing unit.
7. The method of claim 6, further comprising:
executing multiple routing detections in a preset time period to obtain multiple detection results, wherein the detection results are used for indicating whether the routing results of the first routing device and the second routing device are consistent;
and if the proportion of the results which represent the consistency of the routing results in the plurality of detection results is greater than or equal to a preset threshold value, determining that the routing capacities of the first routing device and the second routing device are consistent.
8. A method for detecting a route, comprising:
acquiring the flow output by a target service on a Software Development Kit (SDK) routing device in a routing manner, wherein the flow comprises a service request and information of a first routing node selected by the SDK routing device for the service request;
routing the service request based on a Sidecar Sidecar routing device to obtain routing information of the service request by the Sidecar routing device, wherein the routing information comprises information of a second routing node selected by the Sidecar routing device;
and determining whether the routing results of the SDK routing device and the Sidecar routing device are consistent or not based on the information of the first routing node and the information of the second routing node.
9. A route detection device, comprising:
an obtaining module, configured to obtain a traffic of a target service, where the traffic includes a service request and information of a first routing node selected by a first routing device for the service request;
a routing module, configured to route the service request based on a second routing device, to obtain routing information of the service request by the second routing device, where the routing information includes information of a second routing node selected by the second routing device;
a first determining module, configured to determine whether the routing results of the second routing device and the first routing device are consistent based on the information of the first routing node and the information of the second routing node.
10. A route detection device, comprising:
the system comprises an acquisition module, a service request module and a service request module, wherein the acquisition module is used for acquiring the flow output by a target service on a Software Development Kit (SDK) routing device in a routing way, and the flow comprises a service request and information of a first routing node selected by the SDK routing device for the service request;
a routing module, configured to route the service request based on a Sidecar router to obtain routing information of the service request by the Sidecar router, where the routing information includes information of a second routing node selected by the Sidecar router;
and the determining module is used for determining whether the routing results of the SDK routing device and the Sidecar routing device are consistent or not based on the information of the first routing node and the information of the second routing node.
11. A route detection device, comprising:
memory and a processor, wherein the memory has stored therein a computer program which, when executed by the processor, implements the method of any of claims 1-8.
12. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-8.
CN202111529399.9A 2021-12-14 2021-12-14 Route detection method, device, equipment and storage medium Active CN114374635B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111529399.9A CN114374635B (en) 2021-12-14 2021-12-14 Route detection method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111529399.9A CN114374635B (en) 2021-12-14 2021-12-14 Route detection method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114374635A true CN114374635A (en) 2022-04-19
CN114374635B CN114374635B (en) 2023-12-05

Family

ID=81140476

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111529399.9A Active CN114374635B (en) 2021-12-14 2021-12-14 Route detection method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114374635B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030002436A1 (en) * 2001-06-20 2003-01-02 Anderson Thomas E. Detecting network misuse
CN102292936A (en) * 2011-05-27 2011-12-21 华为技术有限公司 Synchronization detection method for link state database, and routing device
US20160072708A1 (en) * 2014-09-10 2016-03-10 Comcast Cable Communications, Llc Systems And Methods For Routing Data
CN107332771A (en) * 2017-08-29 2017-11-07 网宿科技股份有限公司 A kind of method, router and route selection system for ensureing route uniformity
CN110581893A (en) * 2019-09-18 2019-12-17 西安未来国际信息股份有限公司 data transmission method and device, routing equipment, server and storage medium
US20200133789A1 (en) * 2018-10-25 2020-04-30 EMC IP Holding Company LLC Application consistent snapshots as a sidecar of a containerized application
CN111600930A (en) * 2020-04-09 2020-08-28 网宿科技股份有限公司 Micro-service request traffic management method, device, server and storage medium
US20200329114A1 (en) * 2019-04-10 2020-10-15 Cisco Technology, Inc. Differentiated smart sidecars in a service mesh
US10992585B1 (en) * 2019-05-09 2021-04-27 Amazon Technologies, Inc. Unified network traffic controllers for multi-service environments
CN112783602A (en) * 2021-01-08 2021-05-11 韩浩 Sensitive data discovery and detection method and system
WO2021093079A1 (en) * 2019-11-11 2021-05-20 广州华多网络科技有限公司 Service data processing method and system

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030002436A1 (en) * 2001-06-20 2003-01-02 Anderson Thomas E. Detecting network misuse
CN102292936A (en) * 2011-05-27 2011-12-21 华为技术有限公司 Synchronization detection method for link state database, and routing device
US20160072708A1 (en) * 2014-09-10 2016-03-10 Comcast Cable Communications, Llc Systems And Methods For Routing Data
CN107332771A (en) * 2017-08-29 2017-11-07 网宿科技股份有限公司 A kind of method, router and route selection system for ensureing route uniformity
US20200133789A1 (en) * 2018-10-25 2020-04-30 EMC IP Holding Company LLC Application consistent snapshots as a sidecar of a containerized application
US20200329114A1 (en) * 2019-04-10 2020-10-15 Cisco Technology, Inc. Differentiated smart sidecars in a service mesh
US10992585B1 (en) * 2019-05-09 2021-04-27 Amazon Technologies, Inc. Unified network traffic controllers for multi-service environments
CN110581893A (en) * 2019-09-18 2019-12-17 西安未来国际信息股份有限公司 data transmission method and device, routing equipment, server and storage medium
WO2021093079A1 (en) * 2019-11-11 2021-05-20 广州华多网络科技有限公司 Service data processing method and system
CN111600930A (en) * 2020-04-09 2020-08-28 网宿科技股份有限公司 Micro-service request traffic management method, device, server and storage medium
CN112783602A (en) * 2021-01-08 2021-05-11 韩浩 Sensitive data discovery and detection method and system

Also Published As

Publication number Publication date
CN114374635B (en) 2023-12-05

Similar Documents

Publication Publication Date Title
US20240291898A1 (en) Screen mirroring device discovery method and apparatus, electronic device, and storage medium
CN112328419B (en) Test case generation method and device of remote procedure call interface, storage medium and electronic equipment
CN110753089B (en) Method, device, medium and electronic equipment for managing client
US20140365196A1 (en) Infrastructure Model Generation System And Method
US10789111B2 (en) Message oriented middleware with integrated rules engine
CN113485918A (en) Test method, test device, electronic equipment and storage medium
CN115996179A (en) Service node testing method and device, readable medium and electronic equipment
CN112954056B (en) Method and device for processing monitoring data, electronic equipment and storage medium
JP7090131B2 (en) Methods and equipment for generating information
CN112464039A (en) Data display method and device of tree structure, electronic equipment and medium
KR101794016B1 (en) Method of analyzing application objects based on distributed computing, method of providing item executable by computer, server performing the same and storage media storing the same
CN114430364B (en) Information display method, information display device, electronic equipment and computer readable medium
CN111382058B (en) Service testing method and device, server and storage medium
CN114374635B (en) Route detection method, device, equipment and storage medium
CN111488268A (en) Dispatching method and dispatching device for automatic test
US10171288B2 (en) Diagnosing faults in stateless distributed computing platforms
US9270543B1 (en) Application centered network node selection
CN111382056B (en) Service testing method and device, server and storage medium
CN111382057B (en) Test case generation method, test method and device, server and storage medium
CN112491601A (en) Traffic topology generation method and device, storage medium and electronic equipment
CN112988560A (en) Method and device for testing system robustness
CN111314457B (en) Method and device for setting virtual private cloud
CN110022244B (en) Method and apparatus for transmitting information
CN115333871B (en) Firewall operation and maintenance method and device, electronic equipment and readable storage medium
CN118819995A (en) Service health degree detection system, method, device, equipment and medium thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant