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

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

Info

Publication number
CN114374635B
CN114374635B CN202111529399.9A CN202111529399A CN114374635B CN 114374635 B CN114374635 B CN 114374635B CN 202111529399 A CN202111529399 A CN 202111529399A CN 114374635 B CN114374635 B CN 114374635B
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.)
Active
Application number
CN202111529399.9A
Other languages
Chinese (zh)
Other versions
CN114374635A (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

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

Abstract

The embodiment of the disclosure relates to a route detection method, a device, equipment and a storage medium, wherein the route detection method, the device, the equipment and the storage medium are used for obtaining route information of a second routing device for a service request by obtaining the traffic of a target service and routing the service request in the traffic based on the second routing device, wherein the route information comprises information of a second routing node selected by the second routing device for the service request, and determining whether a route result of the second routing device is consistent with a route result of a first routing device or not 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. According to the embodiment of the disclosure, by judging the routing results of the same service request on different routing devices, whether the routing capacities among the different routing devices are consistent can be accurately judged.

Description

Route detection method, device, equipment and storage medium
Technical Field
The embodiment of the disclosure relates to the technical field of resource optimization, in particular to a route detection method, a device, equipment and a storage medium.
Background
The related art may split a function that is originally belonging to an application into separate processes, and refer to the split separate processes as Sidecar. Sidecar is often applied to Service Mesh (i.e., service Mesh) technology to implement routing functions in place of the traditional software development kit (Software Development Kit, SDK for short). However, after the SDK is replaced by the sidocar, how to determine whether the routing capabilities of the sidocar and the SDK are consistent is a technical problem to be solved.
Disclosure of Invention
In order to solve the technical problems, embodiments of the present disclosure provide a method, an apparatus, a device, and a storage medium for route detection.
A first aspect of an embodiment of the present disclosure provides a route detection method, including: acquiring the traffic of a target service, wherein the traffic 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 a second routing device to obtain routing information of the second routing device for the service request, 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 based on the information of the first routing node and the information of the second routing node.
A second aspect of an embodiment of the present disclosure provides a route detection method, including: acquiring the flow of the target service which is outputted by a route on the SDK routing device, wherein the flow comprises the service request and the 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 based on the information of the first routing node and the information of the second routing node. The SDK routing device is a routing device implemented in SDK, and the sidocar routing device is a routing device implemented in sidocar.
A third aspect of an embodiment of the present disclosure provides a route detection device, including:
the system comprises an acquisition module, a first routing device and a second routing device, 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 by the first routing device for the service request;
the routing module is used for routing the service request based on the second routing device to obtain routing information of the second routing device for the service request, wherein the routing information comprises 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 an embodiment of the present disclosure provides a route detection device, including:
the system comprises an acquisition module, a routing module and a routing module, wherein the acquisition module is used for acquiring the flow of the route output of the target service on the SDK routing device, and the flow comprises the service request and the 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 Sidecar routing device for the service request, 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 the disclosed embodiments provides a route detection device, the machine device comprising a memory and a processor, wherein the memory stores a computer program which, when executed by the processor, can implement the method of the first or second aspect.
A sixth aspect of the disclosed embodiments provides a computer readable storage medium having a computer program stored therein, which when executed by a processor, can 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:
according to the embodiment of the disclosure, through obtaining the traffic of the target service, routing the service request in the traffic based on the second routing device, obtaining the routing information of the second routing device for the service request, wherein the routing information comprises the information of the second routing node selected by the second routing device for the service request, and determining 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 the first routing node selected by the first routing device for the service request. According to the embodiment of the disclosure, whether the routing capacities of the second routing device and the first routing device are consistent can be accurately judged 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 disclosure and together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments of the present disclosure or the solutions in the prior art, the drawings that are required for the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
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 in an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a flow acquisition scenario provided by an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of yet another flow acquisition scenario provided by an embodiment of the present disclosure;
FIG. 5 is a schematic diagram of a scenario in which route detection is implemented on the basis of 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, a further description of aspects of the present disclosure will be provided below. It should be noted that, without conflict, the embodiments of the present disclosure and features in the embodiments may be combined with each other.
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 otherwise than as described herein; it will be apparent that the embodiments in the specification are only some, but not all, embodiments of the disclosure.
Aiming at the problems existing in the related art, the embodiment of the disclosure provides 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 comprises route detection means and second route means. The route detection device may be understood as an apparatus having data transceiving capability and data processing capability, for example. 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 the traffic of the target service, and parse the traffic to obtain the service request and the information of the 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, and the routing information comprises the information of the 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 in 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 meet at least one condition in the same machine room, the same packet, and the same routing unit, the routing results of the first routing node and the second routing node are determined to be consistent, otherwise, the routing results of the first routing node and the second routing node are determined to be inconsistent.
Considering that there is a scenario in which one routing device replaces another routing device in a real scenario, it is generally required that routing capabilities of two routing devices are consistent in such a scenario, that is, routing results of two routing devices are guaranteed to be consistent when the same routing task is performed. 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 the consistency judgment is carried out on the routing results (namely the selected routing nodes) of the second routing device and the first routing device, so that whether the routing capacities of the first routing device and the second routing device are consistent can be accurately determined, and the service expectation and the routing capacities 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 disclosure, and is not intended to be limiting, and that other embodiments may be modified and expanded upon the embodiment of fig. 1.
The embodiment of fig. 1 and a partial variant of the embodiment of fig. 1 are explained and illustrated below in conjunction with exemplary embodiments.
By way of example, fig. 2 is a flow chart of a route detection method provided by an embodiment of the present disclosure, which may be performed by a route detection device, which may be embodied as any device having data transceiving capability and processing capability. The apparatus may exist in a 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 the traffic of the target service, where the traffic of the target service includes the service request and the information of the first routing node selected by the 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 preconfigured and stored in the route detection device.
In one 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 mirrored flow obtained by performing flow mirroring on a real flow by using a flow mirroring means. For example, fig. 3 is a schematic diagram of a flow acquisition scenario provided by an embodiment of the present disclosure. In fig. 3, the route detection device and the first route device are illustratively installed on the same machine device, on which an Application (APP) of the target service is running. As shown in fig. 3, in one embodiment, a user may initiate a traffic mirroring request through a client, and carry at least one of information including a mirroring operation duration, an internet protocol (Internet Protocol, abbreviated as IP) address of a machine device, and the like in the traffic mirroring request. After receiving the traffic mirror request, the route detection device mirrors traffic on the first routing device (i.e. 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) of the target service, so as to obtain mirrored traffic of the target service. Where the traffic of the target traffic may be grasped by a grasping tool (such as, but not limited to, tcpdump) when mirroring the traffic, for example.
It should be noted that the scenario shown in fig. 3 is only an exemplary scenario and not the only scenario, and in fact, 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 may also be understood as a simulation flow rate obtained by simulation through a simulation means. For example, fig. 4 is a schematic diagram of another flow obtaining scenario provided by an embodiment of the present disclosure, where in the scenario of fig. 4, information such as an identifier, a service name, a method, a parameter, a service request, a routing node, and the like carried by a flow of a target service may be simulated by a preset simulation platform, so as to obtain a simulated flow of the target service. The route detection device can receive the simulation flow of the target service from the simulation platform.
It should be noted that the above two ways of acquiring the traffic of the target service are only exemplary ways and not the only way, and in fact, the acquiring ways of the traffic may be configured according to needs in an actual scenario.
Step 202, routing the service request based on the second routing device to obtain routing information of the second routing device for the service request, wherein the routing information comprises information of a 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 implementation of the second routing device may be the same as the first routing device (e.g., both implemented with an SDK, or both implemented with a sidecar), or may be different. For ease of understanding, the disclosed embodiments assume that a first routing device is implemented by the SDK and a second routing device is implemented by the sidecar.
Fig. 5 is a schematic diagram of a scenario in which route detection is implemented on the basis of fig. 3, for example. As shown in fig. 5, in a route detection scenario in the embodiment of the present disclosure, after obtaining a traffic of a target service, a route detection device first analyzes the traffic to obtain a service request in the traffic and information of a first routing node. And then, storing the information of the first routing node locally, and sending the service request to the second routing device.
For example, since the traffic of the target service has been 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 in 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 routing information containing information of the second routing node back 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 based on the information of the first routing node and the information of the second routing node.
In the embodiment of the disclosure, when the first routing node and the second routing node meet at least one of the following conditions, determining that the routing results of the second routing device and the first routing device are consistent, otherwise, not consistent: belongs to the same machine room, belongs to the same group and belongs to the same routing unit.
When the routing results of the second routing device and the first routing device are inconsistent, the capacities of the second routing device and the first routing device can be considered to be different.
According to the embodiment of the disclosure, through obtaining the traffic of the target service, routing the service request in the traffic based on the second routing device to obtain the routing information of the second routing device to the service request, wherein the routing information comprises the information of the second routing node selected by the second routing device for the service request, and whether the routing results of the second routing device and the first routing device are consistent is determined based on the information of the second routing node and the information of the first routing node selected by the first routing device for the service request. According to the embodiment of the disclosure, whether the routing capacities of the second routing device and the first routing device are consistent can be accurately judged by routing the acquired service request on the second routing device and judging the routing result with the routing result of the service request on the first routing device.
For example, in some implementations of the embodiments of the present disclosure, the results of the multiple route detection may also be statistically analyzed by a probabilistic statistical manner to obtain more accurate detection results.
Fig. 6 is a schematic diagram illustrating a routing capability analysis method according to an embodiment of the present disclosure. As shown in fig. 6, the method includes:
and 601, performing routing detection for a plurality of times within a preset time period to obtain a plurality of 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.
Step 602, if the ratio of the results indicating that the routing results are consistent in 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 one implementation manner of the embodiment of the present disclosure, the route detection device performs multiple route detection operations within a preset period of time (a specific detection process may be referred to in the embodiment of fig. 2 and is not described herein again), and each detection operation performs an operation of determining whether the route results of the first routing device and the second routing device are consistent, and obtains corresponding results.
After a preset time period, the route detection device performs statistical analysis on a plurality of detection results obtained in the preset time period, and if the consistent duty ratio of the route results is greater than or equal to a preset threshold value, the route capability of the first route device and the route capability of the second route device are determined to be consistent. Otherwise, determining that the routing capabilities of the first routing device and the second routing device are inconsistent.
According to the embodiment of the disclosure, the influence of the random event on the detection result can be avoided by carrying out the multi-time route detection and carrying out the statistical analysis on the multi-time route detection result, so that the accuracy of the route capability detection is improved.
Illustratively, in some implementations of the embodiments of the present disclosure, the routing message fed back by the second routing device to the route detection device may further include information of the routing process. After step 203, it 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 present 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.
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 information of the routing process fed back by the second routing device, and a visualization result of the routing process is obtained.
Fig. 7 is a schematic diagram illustrating 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 device. When the second routing device receives the service request, the second routing device firstly selects among 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 device continues to select among routing node 1, routing node 2 and routing node 3 based on the second routing rule, and if routing node 1 and routing node 2 are obtained based on the second routing rule, the routing node 1 is further obtained based on the third routing rule by selecting among routing node 1 and routing node 2. The routing node 1 is the routing node selected by the second routing device for the service request. The process of selecting the routing node 1 through the first routing rule, the process of selecting the routing node 2 and the routing node 3 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. And the routing detection device can draw a routing process diagram of the second routing device by sending the information of the routing process of the second routing device to the routing detection device.
It should be noted that the method for transmitting the information of the routing procedure to the routing detection apparatus described above may also be applied to the embodiment of fig. 6. When the routing capabilities of the first routing device and the second routing device are determined to be inconsistent based on the method of the embodiment of fig. 6, multiple routing processes within the preset time period may be drawn on a graph based on the similar method described above.
According to the routing detection method and the routing detection device, 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 capacity of the second routing device is inconsistent with that of the first routing device, a routing process diagram of the second routing device is drawn, a technician can be helped to quickly locate the position of a wrong routing rule, and the routing rule locating efficiency and accuracy are improved.
The embodiment of the disclosure also provides a route detection method, which can include:
s1, obtaining the flow of the target service which is outputted by the SDK routing device in a routing way, wherein the flow comprises the service request and the information of a first routing node selected by the SDK routing device for the service request.
The SDK routing device refers to a routing device implemented with an SDK.
S2, routing the service request based on the Sidecar routing device to obtain routing information of the Sidecar routing device for the service request, wherein the routing information comprises information of a second routing node selected by the Sidecar routing device.
Here, the Sidecar (Sidecar) routing apparatus refers to a routing apparatus implemented with Sidecar.
S3, determining whether the route results of the SDK route device and the Sidecar route device are consistent or not based on the information of the first route node and the information of the second route node.
The implementation manner and the beneficial effects of S1 to S3 may refer to the method of any one of the embodiments in fig. 2 to fig. 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 flow of a target service, where the flow 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 route the service request based on a second routing device, to obtain routing information of the second routing device for the service request, where the routing information includes information of a second routing node selected by the second routing device;
a first determining module 83, configured to determine whether a routing result of the second routing device and the first routing device is 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 mirrored traffic;
the first acquisition module comprises:
and the mirror image sub-module is used for carrying out flow mirror image on the flow of the target service on the first routing device to obtain mirror image flow of the target service.
In one embodiment, the traffic of the target service is a simulated traffic;
the first acquisition module comprises:
and the receiving sub-module is used for receiving the simulation flow sent by the simulation platform.
In one embodiment, the route detection device 80 may further include:
and the processing module is used for adding a target zone bit into 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.
In one 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 meet at least one of the following conditions:
belongs to the same machine room;
belongs to the same group;
belonging to the same routing unit.
In one embodiment, the route detection device 80 performs route detection for a plurality of times within a preset period of time to obtain a plurality of detection results, where the detection results are used to indicate whether the route results of the first routing device and the second routing device are consistent;
the route detection device 80 includes:
and the second determining module is used for determining that the routing capability of the first routing device is consistent with that of the second routing device if the proportion of the results, which indicate that the routing results are consistent, in the plurality of detection results is greater than or equal to a preset threshold value.
The apparatus provided in the embodiments of the present disclosure is capable of performing the method of any one of the embodiments of fig. 1 to 7, and the manner and the intended effect of the method are similar, and are not described herein again.
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 flow of a target service routed and output on an SDK routing device, where the flow 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 route the service request based on the Sidecar routing device, to obtain routing information of the Sidecar routing device for the service request, where the routing information includes information of a second routing node selected by the Sidecar routing device;
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 device 1000 are similar to those of the route detection device 80, and are not described herein.
The embodiment of the disclosure also provides a route detection device, which comprises a processor and a memory, wherein the memory stores a computer program, and the method of any one of the above method embodiments can be implemented when the computer program is executed by the processor.
Fig. 9 is a schematic structural diagram of a route detection device in an embodiment of the present disclosure. Referring now in particular to fig. 9, a schematic diagram of a route detection device 900 suitable for use in implementing 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, devices having data transceiving functions and data processing capabilities such as a notebook computer, PAD (tablet), desktop computer, and the like. The route detection device shown in fig. 9 is only one example and should not impose any limitation on the functionality and scope of use of the embodiments of the present disclosure.
As shown in fig. 9, the route detection device 900 may include a processing means (e.g., a central processor, a graphics 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 means 908 into a Random Access Memory (RAM) 903. In the RAM 903, various programs and data necessary for the operation of the route detection device 900 are also stored. The processing device 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 the bus 904.
In general, the following devices may be connected to the I/O interface 905: input devices 906 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, and the like; an output device 907 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 908 including, for example, magnetic tape, hard disk, etc.; and a communication device 909. The communication means 909 may allow the route detection device 900 to communicate wirelessly or by wire with other devices to exchange data. While fig. 9 shows a route detection device 900 having various means, it should be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a non-transitory computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication device 909, or installed from the storage device 908, or installed from the ROM 902. When executed by the processing device 901, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any 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 context of this 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 the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. 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, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
The computer readable medium may be embodied in the route detection device; or may exist alone 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 traffic of a target service, wherein the traffic 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 a second routing device to obtain routing information of the second routing device for the service request, 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 based on the information of the first routing node and the information of the second routing node.
Computer program code for carrying out operations of the present disclosure may be written in 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 kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts 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 involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. Wherein the names of the units do not constitute a limitation of the units themselves in some cases.
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: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), 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. The 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, where the computer program, when executed by a processor, may implement the method of any one of the embodiments of fig. 1 to fig. 7, and the implementation manner and the beneficial effects are similar, and are not repeated herein.
It should be noted that in this document, relational terms such as "first" and "second" and the like are 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. Moreover, 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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing is merely a specific embodiment of the disclosure to enable one skilled in the art to understand or practice the 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 and described herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (12)

1. A method of route detection, 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 second routing device for the service request, 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 according to 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 traffic is mirrored traffic;
the obtaining the flow of the target service includes:
and carrying out flow mirroring on the flow of the target service on the first routing device to obtain mirrored flow of the target service.
4. The method of claim 1, wherein the traffic of the target traffic is simulated traffic;
the obtaining the flow of the target service includes:
and receiving the simulation flow sent by the simulation platform.
5. The method according to any one of claims 1-4, wherein before the routing the service request based on the second routing device, to obtain 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 meet at least one of the following conditions, determining that the routing results of the second routing device and the first routing device are consistent:
belongs to the same machine room;
belongs to the same group;
belonging to the same routing unit.
7. The method of claim 6, wherein the method further comprises:
performing 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 show that the routing results are consistent, 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 of route detection, comprising:
acquiring the flow of the route output of a target service on a Software Development Kit (SDK) routing device, 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 routing device to obtain routing information of the Sidecar routing device for the service request, 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:
the system comprises an acquisition module, a first routing device and a second routing device, wherein the acquisition module is used for acquiring the flow of a target service, and the flow comprises a service request and information of a first routing node selected by the first routing device for the service request;
the routing module is used for routing the service request based on a second routing device to obtain routing information of the second routing device for the service request, wherein the routing information comprises 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.
10. A route detection device, comprising:
the system comprises an acquisition module, a routing module and a routing module, wherein the acquisition module is used for acquiring the flow which is outputted by a target service in a routing way on an SDK routing device of a software development kit, 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 a Sidecar routing device to obtain routing information of the Sidecar routing device for the service request, 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 route results of the SDK route device and the Sidecar route device are consistent or not based on the information of the first route node and the information of the second route node.
11. A route detection device, comprising:
a 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, characterized in that the storage medium has stored therein a computer program which, when executed by a processor, implements the method according to any 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 CN114374635A (en) 2022-04-19
CN114374635B true 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 (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102292936A (en) * 2011-05-27 2011-12-21 华为技术有限公司 Synchronization detection method for link state database, and routing device
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
CN111600930A (en) * 2020-04-09 2020-08-28 网宿科技股份有限公司 Micro-service request traffic management method, device, server and storage medium
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

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2002312567A1 (en) * 2001-06-20 2003-01-08 Arbor Networks, Inc. Detecting network misuse
US9913198B2 (en) * 2014-09-10 2018-03-06 Comcast Cable Communications, Llc Systems and methods for routing data
US11249856B2 (en) * 2018-10-25 2022-02-15 EMC IP Holding Company LLC Application consistent snapshots as a sidecar of a containerized application
US11570271B2 (en) * 2019-04-10 2023-01-31 Cisco Technology, Inc. Differentiated smart sidecars in a service mesh

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102292936A (en) * 2011-05-27 2011-12-21 华为技术有限公司 Synchronization detection method for link state database, and routing device
CN107332771A (en) * 2017-08-29 2017-11-07 网宿科技股份有限公司 A kind of method, router and route selection system for ensureing route uniformity
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
CN114374635A (en) 2022-04-19

Similar Documents

Publication Publication Date Title
CN110753089B (en) Method, device, medium and electronic equipment for managing client
CN111694674B (en) Message distribution processing method, device, equipment and storage medium
CN110377440B (en) Information processing method and device
CN113507517A (en) Screen projection equipment discovery method and device, electronic equipment and storage medium
KR20210134253A (en) Method and apparatus for monitoring vehicle, and cloud control platform
WO2019075845A1 (en) Construction method and device for link call relationship, computer device and storage medium
CN113485918A (en) Test method, test device, electronic equipment and storage medium
CN112015654A (en) Method and apparatus for testing
CN114938395A (en) Service response method, device, equipment and storage medium
CN112954056B (en) Method and device for processing monitoring data, electronic equipment and storage medium
CN109471713B (en) Method and device for inquiring information
CN115996179A (en) Service node testing method and device, readable medium and electronic equipment
JP2021170319A (en) Method and device for acquiring information
JP7090131B2 (en) Methods and equipment for generating information
CN114374635B (en) Route detection method, device, equipment and storage medium
CN111382058B (en) Service testing method and device, server and storage medium
CN114422436B (en) Gateway, gateway control method, gateway control device, electronic equipment and storage medium
CN116302271A (en) Page display method and device and electronic equipment
CN111488268A (en) Dispatching method and dispatching device for automatic test
CN114035861A (en) Cluster configuration method and device, electronic equipment and computer readable medium
CN110750424B (en) Resource inspection method and device
CN111382056B (en) Service testing method and device, server and storage medium
CN111078477A (en) Interface test method and device, storage medium and electronic equipment
CN110633182A (en) System, method and apparatus for monitoring server stability
CN110022244B (en) Method and apparatus for transmitting information

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