Network path detection method, device, data center and computing device
By sending detection messages and response messages carrying switch device identification in the data center network, path planning and selection are realized, network congestion caused by ECMP is solved, delay is reduced, and network performance is improved.
Patent Information
- Application Number
- CN202010485323.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-01
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2040-06-01
AI Technical Summary
The existing equivalent multipath routing mechanism (ECMP) cannot perceive routing in data center networks, resulting in network path congestion, especially in high-performance computing and artificial intelligence scenarios, with an increase in time delay and affecting the calculation results.
By sending detection messages and response messages carrying switch device identification between the first-level switch and the destination server, the source server determines the network path, realizing path planning and selection, and avoiding network congestion.
Reduce network delay and improve network performance. It is suitable for distributed computing scenarios such as high-performance computing and artificial intelligence. It is universal and scalable, and is not affected by network link failures.
Smart Images

Figure CN113765788B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network communication technologies, and in particular, to a network path detection method, apparatus, data center, and computing device. Background Art
[0002] With the development of network technologies, data centers have become the core infrastructure for providing network services, distributed parallel computing, etc. Data centers typically adopt a two-layer network architecture, such as a spine-leaf structure, which includes an access layer and a core layer. The access layer includes multiple second-level switches, and the core layer includes multiple first-level switches, and each second-level switch is connected to each first-level switch (full-mesh interconnection).
[0003] The equal-cost multi-path routing mechanism (ECMP) is used to dynamically select network paths between the second-level switches and the first-level switches. However, since the ECMP mechanism itself cannot sense routing and only distributes traffic to different network paths through a hash algorithm, there is a problem of causing link congestion. For example, for a network path that has already become congested, the ECMP mechanism may exacerbate the congestion of the path, resulting in a decrease in traffic throughput and an increase in latency.
[0004] Especially in distributed computing scenarios such as high-performance computing (HPC) and artificial intelligence (AI), which are very sensitive to latency. If network congestion occurs and causes an increase in latency, it will have a great impact on the calculation results. At the same time, some distributed computing scenarios (such as the data parallel training scenario of deep learning) use the AllReduce algorithm for communication, such as Ring-based, Tree-based, and Halving-Doubling algorithms. Uncongested network paths can be pre-planned between two nodes through these communication algorithms, thereby reducing network latency and improving communication efficiency.
[0005] Therefore, a network path detection scheme is desired for network path planning. Summary of the Invention
[0006] To this end, embodiments of the present invention provide a network path detection method, apparatus, data center, computing device, and readable storage medium, in an attempt to solve or at least alleviate at least one of the above problems.
[0007] According to one aspect of the embodiments of the present invention, there is provided a network path detection method, including: a first-level switch receives a first detection message, which is generated by a source server based on source server information and destination server information; generates a second detection message based on the first detection message, where the second detection message includes the device identifier of the first-level switch; and sends the second detection message to the destination server, so that the destination server, in response to the second detection message, returns a detection response message to the source server, the detection response message includes the device identifier of the first-level switch, and the source server determines a network path including the first-level switch corresponding to the source server information and the destination server information based on the detection response message.
[0008] Optionally, in the method according to the embodiments of the present invention, for the received message, the first-level switch determines whether the message is a first detection message; if not, forwards the message.
[0009] Optionally, in the method according to the embodiments of the present invention, the step of determining whether the message is a first detection message includes: determining whether the message includes a detection identifier; if so, determining that the message is a first detection message.
[0010] Optionally, in the method according to the embodiments of the present invention, the step of determining whether the message includes a detection identifier includes: determining whether a predetermined field in the message indicates the detection identifier.
[0011] Optionally, in the method according to the embodiments of the present invention, the step of generating a second detection message based on the first detection message includes: modifying a predetermined field in the first detection message based on the device identifier of the first-level switch to obtain the second detection message.
[0012] Optionally, in the method according to the embodiments of the present invention, the predetermined field includes a differentiated services code point field.
[0013] According to another aspect of the embodiments of the present invention, there is provided a network path detection method, including: the source server generates and sends a first detection message based on source server information and destination server information; receives a detection response message returned by the destination server in response to the first detection message; obtains the device identifier of the first-level switch included in the detection response message; and determines that the source server information and the destination server information correspond to a network path including the first-level switch.
[0014] Optionally, in the method according to the embodiments of the present invention, the first detection message includes a detection identifier.
[0015] Optionally, in the method according to the embodiments of the present invention, a predetermined field in the first detection message indicates the detection identifier.
[0016] Optionally, in the method according to an embodiment of the present invention, the predetermined field includes a differentiated services code point field.
[0017] Optionally, in the method according to an embodiment of the present invention, the source server information includes the network address and port of the source server, and the destination server information includes the network address and port of the destination server.
[0018] Optionally, in the method according to an embodiment of the present invention, the probe response message includes the device identifier of the first-level switch.
[0019] According to another aspect of an embodiment of the present invention, a network path detection method is provided, including: a destination server receives a second probe message; obtains the device identifier of the first-level switch included in the second probe message; generates a probe response message including the device identifier of the first-level switch; and in response to the second probe message, returns the probe response message.
[0020] Optionally, in the method according to an embodiment of the present invention, it further includes: for the received message, the destination server determines whether the message is a second probe message.
[0021] Optionally, in the method according to an embodiment of the present invention, the step of determining whether the message is a second probe message includes: determining whether the predetermined field in the message is within a predetermined numerical range.
[0022] Optionally, in the method according to an embodiment of the present invention, the predetermined field includes a differentiated services code point field.
[0023] According to another aspect of an embodiment of the present invention, a network path detection device is provided, including: a communication module, adapted to receive a first probe message, the first probe message being generated by a source server based on source server information and destination server information; a message generation module, adapted to generate a second probe message based on the first probe message, the second probe message including the device identifier of the first-level switch; wherein the communication module is adapted to send the second probe message to the destination server, so that the destination server, in response to the second probe message, returns a probe response message to the source server, the probe response message including the device identifier of the first-level switch, and the source server determines the network path including the first-level switch corresponding to the source server information and the destination server information based on the probe response message.
[0024] According to another aspect of the embodiments of the present invention, a network path detection device is provided, including: a message generation module, adapted to generate a first detection message based on source server information and destination server information; a communication module, adapted to send the first detection message to the destination server, and also adapted to receive a detection response message returned by the destination server in response to the first detection message; and a path determination module, adapted to obtain the device identifier of the first-level switch included in the detection response message, and determine that the source server information and the destination server information correspond to the network path including the first-level switch.
[0025] Optionally, in the device according to the embodiments of the present invention, the communication module is further adapted to receive a second detection message; the message generation module is further adapted to obtain the device identifier of the first-level switch included in the second detection message, and generate a detection response message including the device identifier of the first-level switch; and the communication module is further adapted to return the detection response message in response to the second detection message.
[0026] According to another aspect of the embodiments of the present invention, a data center is provided, including: a plurality of first-level switches, where the first-level switches include the network path detection device according to the embodiments of the present invention; a plurality of second-level switches, where the second-level switches are connected to each first-level switch; and a plurality of servers, where the servers include the network path detection device according to the embodiments of the present invention and are connected to the corresponding second-level switches.
[0027] According to another aspect of the embodiments of the present invention, a computing device is provided, including: one or more processors; a memory; and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for executing any one of the network path detection methods according to the embodiments of the present invention.
[0028] According to still another aspect of the embodiments of the present invention, a readable storage medium storing a program is provided, where the program includes instructions that, when executed by a computing device, cause the computing device to execute any one of the network path detection methods according to the embodiments of the present invention.
[0029] According to the network path detection solution of the embodiments of the present invention, the first-level switch generates a second detection message carrying the device identifier of the first-level switch based on the first detection message and sends it to the destination server. The destination server returns a detection response message including the device identifier of the first-level switch to the source server, enabling the source server to determine the network path corresponding to the first detection message. Thus, it has the ability of path planning and selection, can select different network paths for different traffic to avoid network congestion, reduce network latency, and improve network performance. Moreover, it does not require complex functions to be configured on the network side, has universality and scalability, and is not affected by network link failures. It can still ensure the correctness of path selection when network link failures occur. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] To achieve the above and related purposes, certain illustrative aspects are described herein in conjunction with the following description and the accompanying drawings, which indicate various ways in which the principles disclosed herein can be practiced, and all aspects and their equivalent aspects are intended to fall within the scope of the claimed subject matter. By reading the following detailed description in conjunction with the accompanying drawings, the above and other purposes, features, and advantages of the present disclosure will become more apparent. Throughout the present disclosure, the same reference numerals generally refer to the same components or elements.
[0031] Figure 1 FIG. shows a schematic diagram of a data center 100 according to an embodiment of the present invention;
[0032] Figure 2 FIG. shows a schematic diagram of a computing device 200 according to an embodiment of the present invention;
[0033] Figure 3 FIG. shows an interaction flowchart of a network path detection method 300 according to an embodiment of the present invention;
[0034] Figure 4 FIG. shows a schematic diagram of network path detection according to an embodiment of the present invention;
[0035] Figure 5 FIG. shows a flowchart of a network path detection method 500 according to an embodiment of the present invention;
[0036] Figure 6 FIG. shows a flowchart of a network path detection method 600 according to an embodiment of the present invention;
[0037] Figure 7 FIG. shows a flowchart of a network path detection method 700 according to an embodiment of the present invention;
[0038] Figure 8 FIG. shows a block diagram of a network path detection device 800 according to an embodiment of the present invention; and
[0039] Figure 9 The structural block diagram of a network path detection device 900 according to an embodiment of the present invention is shown. Detailed implementation manners
[0040] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided so that the present disclosure can be more thoroughly understood and the scope of the present disclosure can be completely conveyed to those skilled in the art.
[0041] Figure 1 The schematic diagram of a data center 100 according to an embodiment of the present invention is shown. As Figure 1 shown, the data center 100 includes a plurality of first-level switches 110, a plurality of second-level switches 120, and a plurality of servers 130. In other implementation manners, the data center 100 may include different and / or additional modules.
[0042] The server 130 is a processing and storage entity of the data center 100, and a large amount of data processing and storage in the data center 100 are completed by these servers 130. The second-level switch 120 is usually located at the top of the rack (Top of Rack) and is directly connected to a plurality of servers 130. Each second-level switch 120 is connected to each first-level switch 110. The number of downlink ports of the first-level switch 110 determines the number of second-level switches 120, and the number of uplink ports of the second-level switch 120 determines the number of first-level switches 110, and they jointly determine the scale of the network of the data center 100.
[0043] The communication between the servers 130 under two second-level switches 120 needs to be forwarded via the first-level switch 130. In order to detect the network path between two servers 130, the source server can send a detection message to the destination server and receive the detection response message returned by the destination server in response to the detection message, so as to determine which first-level switch 110 the network path between the source server and the destination server passes through. The source server and the destination server are relative concepts, and they can be any server 130 in the data center 100.
[0044] According to an embodiment of the present invention, the components (such as the server 130) in the above data center 100 can be implemented by a computing device 200 as described below.
[0045] Figure 2 The schematic diagram of a computing device 200 according to an embodiment of the present invention is shown. As Figure 2As shown, in the basic configuration 202, the computing device 200 typically includes a system memory 206 and one or more processors 204. A memory bus 208 can be used for communication between the processor 204 and the system memory 206.
[0046] Depending on the desired configuration, the processor 204 can be any type of processor, including but not limited to: a microprocessor (μP), a microcontroller (μC), a digital signal processor (DSP), or any combination thereof. The processor 204 can include one or more levels of cache, such as a level 1 cache 210 and a level 2 cache 212, a processor core 214, and registers 216. An example processor core 214 can include an arithmetic logic unit (ALU), a floating point unit (FPU), a digital signal processing core (DSP core), or any combination thereof. An example memory controller 218 can be used with the processor 204, or in some implementations, the memory controller 218 can be an internal part of the processor 204.
[0047] Depending on the desired configuration, the system memory 206 can be any type of memory, including but not limited to: volatile memory (such as RAM), non-volatile memory (such as ROM, flash memory, etc.), or any combination thereof. The system memory 206 can include an operating system 220, one or more applications 222, and program data 224. In some embodiments, the applications 222 can be arranged to execute instructions on the operating system by one or more processors 204 using the program data 224.
[0048] The computing device 200 can also include an interface bus 240 that facilitates communication from various interface devices (e.g., an output device 242, a peripheral interface 244, and a communication device 246) to the basic configuration 202 via a bus / interface controller 230. Example output devices 242 include a graphics processing unit 248 and an audio processing unit 250. They can be configured to facilitate communication with various external devices, such as a display or speakers, via one or more A / V ports 252. Example peripheral interfaces 244 can include a serial interface controller 254 and a parallel interface controller 256, which can be configured to facilitate communication with external devices, such as input devices (e.g., a keyboard, a mouse, a pen, a voice input device, a touch input device) or other peripherals (e.g., a printer, a scanner, etc.), via one or more I / O ports 258. Example communication devices 246 can include a network controller 260, which can be arranged to facilitate communication with one or more other computing devices 262 via a network communication link through one or more communication ports 264.
[0049] A network communication link can be an example of a communication medium. A communication medium can generally embody computer-readable instructions, data structures, program modules in a modulated data signal such as a carrier wave or other transmission mechanism, and can include any information delivery medium. A "modulated data signal" can be a signal in which one or more of its data sets or its changes can encode information in the signal. As a non-limiting example, a communication medium can include wired media such as a wired network or a dedicated line network, and various wireless media such as sound, radio frequency (RF), microwave, infrared (IR), or other wireless media. The term computer-readable medium used herein can include both storage media and communication media.
[0050] The computing device 200 can be implemented as a server, such as a database server, an application server, and a WEB server, etc., or can be implemented as a personal computer including a desktop computer and a laptop computer configuration. Of course, the computing device 200 can also be implemented as at least a part of a small-sized portable (or mobile) electronic device.
[0051] In an embodiment according to the present invention, the computing device 200 can be implemented as a network path detection device 800 / 900 and is configured to execute a network path detection method 500 / 600 / 700 according to an embodiment of the present invention. Among them, the application 222 of the computing device 200 contains multiple instructions for executing the network path detection method 500 / 600 / 700 according to an embodiment of the present invention, and the program data 224 can also store configuration data of the network path detection device 800 / 900 and other contents.
[0052] Figure 3 The interaction flowchart of a network path detection method 300 according to an embodiment of the present invention is shown. As Figure 3 shown, the network path detection method 300 can be executed in the data center 100 and starts from step S310.
[0053] In step S310, the source server 130a generates a first detection message based on the source server information and the destination server information. The source server information can include the network address (such as an IP address) and port of the source server 130a, and the destination server information can include the network address and port of the destination server 130b.
[0054] The first detection message may include a detection identifier. In some embodiments, a predetermined field in the first detection message may be used to indicate the detection identifier. For example, the Differentiated Services Code Point (DSCP) field may be used to indicate the detection identifier. In specific practice, the DSCP field in the message uses 6 bits, and its value range is 0 to 63. Then, the DSCP field can be configured with a specified value to indicate that the message is the first detection message. Of course, other appropriate fields in the message can also be used to indicate the detection identifier, and the present invention does not limit this.
[0055] Then, in step S311, the source server 130a sends the first detection message. In step S320, the second-level switch 120a connected to the source server 130a receives the first detection message and sends the first detection message to the corresponding first-level switch 110a. In some embodiments, the second-level switch 120a determines the corresponding first-level switch 110a based on the ECMP algorithm.
[0056] The first-level switch 110a receives the first detection message. In step S330, a second detection message can be generated based on the first detection message.
[0057] According to an embodiment of the present invention, before generating the second detection message, the first-level switch 110a can first determine whether the received message is the first detection message.
[0058] It can be determined whether the message is the first detection message by determining whether the message includes a detection identifier. For example, it is determined whether a predetermined field in the message indicates the detection identifier. In specific practice, it can be determined whether the predetermined field (such as the DSCP field) in the message is a specified value. If not, the message is not the first detection message, and the first-level switch 110a sends the message. If so, the message is the first detection message, and step S330 is entered to generate the second detection message.
[0059] The second detection message may include the device identifier of the first-level switch 110a, and the device identifier uniquely identifies the first-level switch 110a. In some embodiments, based on the device identifier of the first-level switch 110a, the predetermined field in the first detection message can be modified to obtain the second detection message. In specific practice, the predetermined field can be modified to the corresponding value of the device identifier, or the predetermined field can also be modified to the sum of the specified value indicating the detection identifier and the corresponding value of the device identifier. Of course, other ways can also be used to modify the predetermined field, and any way of modifying the predetermined field to indicate the device identifier is within the protection scope of the present invention.
[0060] Subsequently, the first-level switch 110a sends the second probe message to the destination server 130b. Specifically, in step S331, the first-level switch 110a sends the second probe message to the second-level switch 120b connected to the destination server 130b. The second-level switch 120 receives the second probe message and, in step S340, sends the second probe message to the destination server 130b.
[0061] The destination server 130b receives the second probe message and obtains the device identifier of the first-level switch 110a included in the second probe message in step S350.
[0062] In some embodiments, the destination server 130b can determine whether the received message is a second probe message. For example, it can be determined whether the message is a second probe message by determining whether the message includes the device identifier of the first-level switch 110a.
[0063] In specific practice, it can be determined whether a predetermined field in the message is within a predetermined value range. If it is within the predetermined value range, it is determined that the message includes the device identifier of the first-level switch 110a, and the message is a second probe message, and step S350 is entered. If it is not within the predetermined value range, it is determined that the message does not include the device identifier of the first-level switch 110a, and the message is not a second probe message, and corresponding processing is performed in response to the message.
[0064] In the case where the received message is a second probe message, the destination server 130b can obtain the device identifier of the first-level switch 110a from a predetermined field in the second probe message. For example, the device identifier of the first-level switch 110a is obtained from the DSCP field in the second probe message.
[0065] After obtaining the device identifier of the first-level switch 110a, the destination server 130b can generate a probe response message including the device identifier in step S351. In some embodiments, the payload of the probe response message can be used to include the device identifier of the first-level switch 110a.
[0066] Subsequently, the destination server 130b returns the generated probe response message to the source server 130a in response to the second probe message.
[0067] Specifically, in step S352, the destination server 130b sends the probe response message to the second-level switch 120b connected to the destination server 130b. The second-level switch 120b receives the probe response message and, in step S360, sends the probe response message to the corresponding first-level switch 110b. As described above, the second-level switch 120b determines the corresponding first-level switch 110b based on the ECMP algorithm.
[0068] The first-level switch 110b receives the probe response message and sends the probe response message to the second-level switch 120a connected to the source server 130a in step S370. The second-level switch 120a receives the probe response message and sends the probe response message to the source server 130a in step S380.
[0069] The source server 130a receives the probe response message returned by the destination server 130b and obtains the device identifier of the first-level switch 110a included in the probe response message in step S390. For example, the device identifier of the first-level switch 110a is obtained from the payload of the probe response message.
[0070] Then, the source server 130a can determine in step S391 that the source server information and the destination server information used for sending the first probe message correspond to the network path including the first-level switch 110a. That is to say, the message using the source server information and the destination server information can be transmitted via the first-level switch 110a. In this way, traffic can be transmitted through different network paths by using different source server information and destination server information, avoiding network congestion.
[0071] The following combines Figure 4 Specific examples are used to further illustrate the network path detection process.
[0072] Figure 4 FIG. shows a schematic diagram of network path detection according to an embodiment of the present invention. As Figure 4 shown, the server N1 and the server N2 are connected to the second-level switch ASW1, and the server N3 is connected to the second-level switch ASW2. The second-level switch ASW1 is connected to the first-level switch PSW1 and the first-level switch PSW2, and the second-level switch ASW2 is connected to the first-level switch PSW1 and the first-level switch PSW2. The network address of the server N1 is 192.168.1.1, the network address of the server N2 is 192.168.1.2, and the network address of the server N3 is 192.168.2.1. The device identifier of the first-level switch PSW1 is 1, and the first-level switch PSW2
[0073] The server N1 sends a first probe message to the server N3. The DSCP value of the first probe message is 50, and a specified five-tuple is used. The specified five-tuple includes the network address and port of the server N1, the network address and port of the server N2, and the transport protocol.
[0074] The second-level switch ASW1 receives the first probe packet and sends the first probe packet to the core server PSW1 based on the ECMP mechanism. The core server PSW1 matches the rules in the access control list for the first probe packet (i.e., the rule with a DSCP value of 50). After successful matching, the DSCP value is modified to 51 (i.e., 50 + 1) to obtain the second probe packet. The core server PSW1 sends the second probe packet to the second-level switch ASW2, and the second-level switch ASW2 sends the second probe packet to the server N3.
[0075] The server N3 determines whether the DSCP value of the received second probe packet is within a predetermined value range (i.e., within the value range of 51 to 52). After determining that the DSCP value is within the predetermined value range, the device identifier PSW ID of the first-level switch PSW1 (which is 1) is extracted from the DSCP value. The server N3 uses this device identifier as the payload of the probe response packet and returns the probe response packet to the server N1.
[0076] The second-level switch ASW2 receives the probe response packet and sends the probe response packet to the core server PSW2 based on the ECMP mechanism. The core server PSW2 sends the probe response packet to the second-level switch ASW1, and the second-level switch ASW1 sends the probe response packet to the server N1. After the server N1 receives the probe response packet, the device identifier of the first-level switch PSW1 is extracted from the payload of the probe response packet, and the corresponding relationship between the above-specified five-tuple and the first-level switch PSW1 can be obtained. That is, the packet using the above-specified five-tuple is transmitted via the network path including the first-level switch PSW1.
[0077] The following combines Figures 5 - 7 to illustrate the methods executed by each component in the data center 100 respectively.
[0078] Figure 5 FIG. shows a flowchart of a network path detection method 500 according to an embodiment of the present invention. The network path detection method 500 is adapted to be executed in the server 130, and the server 130 is used as the source server. As Figure 5 shown, the network path detection method 500 starts from step S510.
[0079] In step S510, the source server 130 generates a first probe packet based on the source server information and the destination server information. The source server information may include the network address and port of the source server, and the destination server information may include the network address and port of the destination server.
[0080] The first detection message may include a detection identifier. In some embodiments, a predetermined field in the first detection message may be used to indicate the detection identifier. For example, the Differentiated Services Code Point (DSCP) field is used to indicate the detection identifier. In specific practice, the DSCP field in the message uses 6 bits, and its value range is 0 to 63. Then, the DSCP field can be configured with a specified value to indicate that the message is the first detection message. Of course, other suitable fields in the message can also be used to indicate the detection identifier, and the present invention does not limit this.
[0081] Then, in step S520, the source server 130 sends a first detection message to the destination server, and in step S530, receives a detection response message returned by the destination server in response to the first detection message.
[0082] In step S540, the source server 130 obtains the device identifier of the first-level switch included in the detection response message. For example, the device identifier of the first-level switch is obtained from the payload of the detection response message. Then, in step S550, it can be determined that the source server information and the destination server information used to send the first detection message correspond to the network path including the first-level switch. That is to say, the message using this source server information and this destination server information can be transmitted via this first-level switch.
[0083] In addition, the server 130 can also be used as the destination server of other servers, receive a second detection message, obtain the device identifier of the first-level switch included in the second detection message, generate a detection response message including the device identifier of the first-level switch, and return the detection response message to other servers in response to the second detection message.
[0084] The corresponding processing of each step in the network path detection method 500 has been Figures 1 - 4 explained in detail in the specific description in conjunction with the data center 100 and the network path detection method 300, and the repeated content will not be elaborated here.
[0085] Figure 6 The flowchart of a network path detection method 600 according to an embodiment of the present invention is shown. The network path detection method 600 is suitable for execution in the server 130 and uses the server 130 as the destination server. As Figure 6 shown, the network path detection method 600 starts from step S610.
[0086] In step S610, the destination server 130 receives a second detection message, and in step S620, obtains the device identifier of the first-level switch included in the second detection message.
[0087] In some embodiments, the destination server 130 can determine whether the received packet is a second probe packet. For example, it can be determined whether the packet is a second probe packet by determining whether the packet includes the device identifier of the first-level switch.
[0088] In specific practice, it can be determined whether a predetermined field in the packet is within a predetermined value range. If it is within the predetermined value range, it is determined that the packet includes the device identifier of the first-level switch, and the packet is a second probe packet, and step S620 is entered. If it is not within the predetermined value range, it is determined that the packet does not include the device identifier of the first-level switch, and the packet is not a second probe packet, and corresponding processing is performed in response to the packet.
[0089] In the case where the received packet is a second probe packet, the destination server 130 can obtain the device identifier of the first-level switch from a predetermined field in the second probe packet. For example, obtain the device identifier of the first-level switch from the DSCP field in the second probe packet.
[0090] After obtaining the device identifier of the first-level switch, the destination server 130 can generate a probe response packet including the device identifier in step S630. In some embodiments, the payload of the probe response packet can be used to include the device identifier of the first-level switch.
[0091] Then, in step S640, the destination server 130 returns the generated probe response packet to the source server in response to the second probe packet, so that the source server can determine the network path.
[0092] Of course, according to the description in combination with Figure 5 the server 130 can also act as a source server, generate a first probe packet, receive the response packet returned by the corresponding destination server in response to the first probe packet, and determine the network path corresponding to the source server information and destination server information used for sending the first probe packet based on the device identifier of the first-level switch included in the probe response packet.
[0093] The corresponding processing of each step in the network path detection method 600 has been explained in detail in the specific description of the data center 100 and the network path detection method 300 in combination with Figures 1 - 4 and the repeated content will not be elaborated here.
[0094] Figure 7 FIG. shows a flowchart of a network path detection method 700 according to an embodiment of the present invention. The network path detection method 700 is suitable for execution in the first-level switch 110. As Figure 7 shown, the network path detection method 700 starts from step S710.
[0095] In step S710, the first-level switch 110 receives a first probe message, which is generated by the source server based on the source server information and the destination server information. Then, in step S720, a second probe message can be generated based on the first probe message.
[0096] According to an embodiment of the present invention, before generating the second probe message, the first-level switch 110 can first determine whether the received message is a first probe message.
[0097] It can be determined whether the message is a first probe message by determining whether the message includes a probe identifier. For example, it is determined whether a predetermined field in the message indicates the probe identifier. In specific practice, it can be determined whether the DSCP field in the message is a specified value. If not, the message is not a first probe message, and the first-level switch 110 forwards the message normally. If so, the message is a first probe message, and it enters step S720.
[0098] The second probe message may include the device identifier of the first-level switch 110 itself, and the device identifier uniquely identifies the first-level switch 110. In some embodiments, based on the device identifier of the first-level switch 110, the predetermined field in the first probe message can be modified to obtain the second probe message. In specific practice, the DSCP field can be modified to the value corresponding to the device identifier, or the DSCP field can also be modified to the sum of the specified value indicating the probe identifier and the value corresponding to the device identifier. Of course, other ways can also be used to modify the predetermined field, and any way of modifying the predetermined field to indicate the device identifier is within the protection scope of the present invention.
[0099] Then, in step S730, the first-level switch 110 sends the second probe message to the destination server. The second probe message reaches the destination server via the second-level switch connected to the destination server.
[0100] The corresponding processing of each step in the network path detection method 700 has been Figures 1 - 4 explained in detail in the specific description in combination with the data center 100 and the network path detection method 300, and the repeated content will not be elaborated here.
[0101] Figure 8 The structural block diagram of a network path detection device 800 according to an embodiment of the present invention is shown. As Figure 8 shown, the network path detection device 800 may include a communication module 810, a message generation module 820, and a path determination module 830.
[0102] The message generation module 820 is adapted to generate a first probe message based on the source server information and the destination server information. The communication module 810 is adapted to send the first probe message to the destination server, and is further adapted to receive a response message returned by the destination server in response to the first probe message. The path determination module 830 is adapted to obtain the device identifier of the first-level switch included in the probe response message, and determine that the above-mentioned source server information and destination server information correspond to the network path including the above-mentioned first-level switch.
[0103] In addition, the communication module 810 is further adapted to receive a second probe message, the message generation module 810 is further adapted to obtain the device identifier of the first-level switch included in the second probe message, and generate a probe response message including the device identifier of the first-level switch. The communication module 810 is further adapted to return the probe response message in response to the second probe message.
[0104] As described above in connection with Figures 1 - 7 the specific description of the data center 100 and the network path detection methods 300 to 700, the corresponding processing in each module of the network path detection device 800 has been explained in detail, and the repeated content will not be elaborated here.
[0105] Figure 9 The structural block diagram of a network path detection device 900 according to an embodiment of the present invention is shown. As Figure 9 shown, the network path detection device 900 may include a communication module 910 and a message generation module 920.
[0106] The communication module 910 is adapted to receive a first probe message, which is generated by a source server based on source server information and destination server information. The message generation module 920 is adapted to generate a second probe message based on the first probe message, and the second probe message includes the device identifier of the first-level switch where the network path detection device 900 is located. The communication module 910 is further adapted to send the second probe message to the destination server, so that the destination server, in response to the second probe message, returns a probe response message including the device identifier of the first-level switch to the source server, and the source server determines that the network path including the above-mentioned first-level switch corresponds to the above-mentioned source server information and the above-mentioned destination server information based on the probe response message.
[0107] As described above in connection with Figures 1 - 7 the specific description of the data center 100 and the network path detection methods 300 to 700, the corresponding processing in each module of the network path detection device 900 has been explained in detail, and the repeated content will not be elaborated here.
[0108] In summary, according to the network path detection solution of the embodiments of the present invention, the first-level switch generates a second detection message carrying the device identifier of the first-level switch based on the first detection message and sends it to the destination server. The destination server returns a detection response message including the device identifier of the first-level switch to the source server, enabling the source server to determine the network path corresponding to the first detection message. Thus, it has the ability of path planning and selection, can select different network paths for different traffic to avoid network congestion, reduce network latency (especially suitable for distributed computing scenarios such as high-performance computing (HPC) and artificial intelligence (AI)), and improve network performance. Moreover, it does not require complex functions to be configured on the network side, has universality and scalability, and is not affected by network link failures. It can still ensure the correctness of path selection when there are network link failures (if a network link failure occurs, network path detection can be re-performed after the faulty link is revoked, thus ensuring the correctness of path selection).
[0109] It should be understood that the various technologies described herein can be implemented in combination with hardware or software, or a combination thereof. Thus, the methods and devices of the present invention, or certain aspects or portions of the methods and devices of the present invention, may take the form of program code (i.e., instructions) embedded in a tangible medium, such as a floppy disk, CD-ROM, hard disk drive, or any other machine-readable storage medium, wherein when the program is loaded into and executed by a machine such as a computer, the machine becomes a device for practicing the present invention.
[0110] In the case where the program code is executed on a programmable computer, the computing device generally includes a processor, a processor-readable storage medium (including volatile and non-volatile memories and / or storage elements), at least one input device, and at least one output device. Among them, the memory is configured to store the program code; the processor is configured to execute the various methods of the present invention according to the instructions in the program code stored in the memory.
[0111] By way of example and not limitation, computer-readable media include computer storage media and communication media. Computer-readable media include computer storage media and communication media. Computer storage media stores information such as computer-readable instructions, data structures, program modules, or other data. Communication media generally embodies computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and includes any information delivery medium. Combinations of any of the above are also included within the scope of computer-readable media.
[0112] It should be understood that, in order to streamline the present disclosure and assist in understanding one or more of the various inventive aspects, in the foregoing description of the exemplary embodiments of the present invention, the various features of the present invention are sometimes grouped together in a single embodiment, figure, or description thereof. However, the disclosed method should not be construed as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as reflected in the following claims, the inventive aspects lie in less than all the features of the single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into the detailed description, with each claim standing on its own as a separate embodiment of the present invention.
[0113] Those skilled in the art should understand that the modules or units or components of the devices in the examples disclosed herein may be arranged in the devices as described in the embodiments, or alternatively may be located in one or more devices different from those in the examples. The modules in the foregoing examples may be combined into one module or further divided into multiple sub-modules.
[0114] Those skilled in the art can understand that the modules in the devices of the embodiments can be adaptively changed and arranged in one or more devices different from those of the embodiments. The modules or units or components in the embodiments can be combined into one module or unit or component, and further can be divided into multiple sub-modules or sub-units or sub-components. Except that at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all the features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all the processes or units of any method or device so disclosed. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) can be replaced by an alternative feature that provides the same, equivalent, or similar purpose.
[0115] In addition, those skilled in the art can understand that, although some of the embodiments described herein include certain features included in other embodiments rather than other features, the combination of the features of different embodiments means that it is within the scope of the present invention and forms different embodiments. For example, in the following claims, any one of the claimed embodiments can be used in any combination.
[0116] In addition, some of the embodiments described herein are methods or combinations of method elements that can be implemented by a processor of a computer system or by other devices performing the functions. Therefore, a processor having the necessary instructions for implementing the method or method elements forms a device for implementing the method or method elements. In addition, the elements described herein in the device embodiments are examples of devices for implementing the functions performed by the elements for the purpose of implementing the invention.
[0117] As used herein, unless otherwise specified, the use of ordinal numbers "first", "second", "third", etc. to describe ordinary objects merely indicates different instances of similar objects and is not intended to imply that the objects so described must have a given order in terms of time, space, ranking, or in any other way.
[0118] Although the present invention has been described in terms of a limited number of embodiments, those skilled in the art in this technical field will appreciate, upon the benefit of the above description, that other embodiments can be contemplated within the scope of the invention thus described. In addition, it should be noted that the language used in this specification has been principally selected for readability and instructional purposes and not for the purpose of explaining or limiting the subject matter of the invention. Thus, many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the appended claims. For the scope of the present invention, the disclosure of the present invention is illustrative, not restrictive, and the scope of the present invention is defined by the appended claims.
Claims
1. A network path detection method, which is applied to a first-level switch in a data center; the data center includes multiple first-level switches, multiple second-level switches, and multiple servers, each first-level switch is connected to multiple second-level switches, and each second-level switch is connected to multiple servers; The method includes: The first-level switch receives a first detection message, which is generated by a source server based on source server information and destination server information; The first detection message is sent by a second-level switch corresponding to the source server, and the second-level switch is used to determine the first-level switch; Generate a second detection message based on the first detection message, and the second detection message includes the device identifier of the first-level switch; And Send the second detection message to the destination server, so that the destination server, in response to the second detection message, returns a detection response message to the source server, the detection response message includes the device identifier of the first-level switch, and the source server determines that the network path including the first-level switch corresponds to the source server information and the destination server information based on the detection response message; the source server and the destination server are any two different servers among the multiple servers.
2. The method according to claim 1, further comprising: For the received message, the first-level switch determines whether the message is a first detection message; If not, forward the message.
3. The method according to claim 2, the step of determining whether the message is a first detection message includes: Determine whether the message includes a detection identifier; If it includes, determine that the message is a first detection message.
4. The method according to claim 2, wherein, The step of determining whether the message includes a detection identifier includes: Determine whether a predetermined field in the message indicates the detection identifier.
5. The method according to claim 1, wherein, The step of generating a second detection message based on the first detection message includes: Modify the predetermined field in the first detection message based on the device identifier of the first-level switch to obtain the second detection message.
6. The method according to claim 4 or 5, wherein The predetermined field includes a differentiated services code point field.
7. A network path detection method, which is applied to a source server in a data center; the data center includes multiple first-level switches, multiple second-level switches, and multiple servers, each first-level switch is connected to multiple second-level switches, and each second-level switch is connected to multiple servers; The method includes: The source server generates and sends a first detection message to the corresponding second-level switch based on the source server information and the destination server information, so that the corresponding second-level switch determines the corresponding first-level switch and sends the first detection message to the corresponding first-level switch, so that the corresponding first-level switch generates a second detection message based on the first detection message and sends it to the destination server, so that the destination server, in response to the second detection message, returns a detection response message to the source server; The second detection message includes the device identifier of the first-level switch; Receive a probe response message returned by the destination server in response to the first probe message; Obtain the device identifier of the first-level switch included in the probe response message; And Determine that the source server information and the destination server information correspond to a network path including the first-level switch; the source server and the destination server are any two different servers among the multiple servers.
8. The method according to claim 7, wherein, The first probe message includes a probe identifier.
9. The method according to claim 8, wherein A predetermined field in the first probe message indicates the probe identifier.
10. The method according to claim 9, wherein, The predetermined field includes a differentiated services code point field.
11. The method according to claim 7, wherein, The source server information includes the network address and port of the source server, and the destination server information includes the network address and port of the destination server.
12. The method according to claim 7, wherein, The probe response message includes the device identifier of the first-level switch.
13. A network path probing method, which is applied to a destination server in a data center; the data center includes multiple first-level switches, multiple second-level switches, and multiple servers, each first-level switch is connected to multiple second-level switches, and each second-level switch is connected to multiple servers; The method includes: The destination server receives a second probe message sent by the first-level switch, and the second probe message is generated by the first-level switch based on the first probe message; The first probe message is sent by the second-level switch corresponding to the source server to the first-level switch, and the second-level switch is used to determine the first-level switch; Obtain the device identifier of the first-level switch included in the second probe message; Generate a probe response message including the device identifier of the first-level switch; And In response to the second probe message, return the probe response message; The source server and the destination server are any two different servers among the multiple servers.
14. The method according to claim 13, further comprising: For the received message, the destination server determines whether the message is a second probe message.
15. The method according to claim 14, wherein, The step of determining whether the message is a second probe message includes: Determine whether a predetermined field in the message is within a predetermined numerical range.
16. The method according to claim 15, wherein, The predetermined field includes a differentiated services code point field.
17. A network path probing device, which is applied to a first-level switch in a data center; the data center includes multiple first-level switches, multiple second-level switches, and multiple servers, each first-level switch is connected to multiple second-level switches, and each second-level switch is connected to multiple servers; The device includes: A communication module, adapted to receive a first probe message, which is generated by a source server based on source server information and destination server information; The first probe message is sent by the second-level switch corresponding to the source server, and the second-level switch is used to determine the first-level switch; A message generation module, adapted to generate a second probe message based on the first probe message, and the second probe message includes the device identifier of the first-level switch; Where The communication module is adapted to send the second detection message to the destination server, so that in response to the second detection message, the destination server returns a detection response message to the source server. The detection response message includes the device identifier of the first-level switch. The source server determines, based on the detection response message, that the network path including the first-level switch corresponds to the source server information and the destination server information; the source server and the destination server are any two different servers among the multiple servers.
18. A network path detection device, which is applied to the source server in a data center; the data center includes multiple first-level switches, multiple second-level switches, and multiple servers. Each first-level switch is connected to multiple second-level switches, and each second-level switch is connected to multiple servers; the device includes: A message generation module, which is adapted to generate a first detection message based on the source server information and the destination server information. A communication module, which is adapted to send the first detection message to the corresponding second-level switch, so that the corresponding second-level switch determines the corresponding first-level switch and sends the first detection message to the corresponding first-level switch, so that the corresponding first-level switch generates a second detection message based on the first detection message and sends it to the destination server, so that the destination server returns a detection response message to the source server in response to the second detection message. The second detection message includes the device identifier of the first-level switch. The communication module is further adapted to receive the detection response message returned by the destination server in response to the first detection message. And A path determination module, which is adapted to obtain the device identifier of the first-level switch included in the detection response message and determine that the source server information and the destination server information correspond to the network path including the first-level switch; the source server and the destination server are any two different servers among the multiple servers.
19. The device according to claim 18, wherein The communication module is further adapted to receive a second detection message. The message generation module is further adapted to obtain the device identifier of the first-level switch included in the second detection message and generate a detection response message including the device identifier of the first-level switch. The communication module is further adapted to return the detection response message in response to the second detection message.
20. A data center, including: Multiple first-level switches, and the first-level switch includes the network path detection device according to claim 17. Multiple second-level switches, and the second-level switch is connected to each first-level switch. And Multiple servers, and the server includes the network path detection device according to claim 18 or 19 and is connected to the corresponding second-level switch.
21. A computing device, including: One or more processors; A memory; And One or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for performing any of the network path detection methods described in claims 1-16.
22. A readable storage medium storing a program, the program including instructions that, when executed by a computing device, cause the computing device to perform any of the network path detection methods described in claims 1-16.
Citation Information
Patent Citations
Network quality index acquirement method, system and apparatus
CN101404597A
A method and device for detecting a forwarding path
CN106230726A