CN118784401A - Data transmission method and device - Google Patents
Data transmission method and device Download PDFInfo
- Publication number
- CN118784401A CN118784401A CN202310343886.9A CN202310343886A CN118784401A CN 118784401 A CN118784401 A CN 118784401A CN 202310343886 A CN202310343886 A CN 202310343886A CN 118784401 A CN118784401 A CN 118784401A
- Authority
- CN
- China
- Prior art keywords
- data packet
- request data
- address
- mac address
- target server
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 58
- 230000005540 biological transmission Effects 0.000 title claims abstract description 20
- 238000012545 processing Methods 0.000 claims description 38
- 238000004891 communication Methods 0.000 claims description 18
- 238000013507 mapping Methods 0.000 claims description 17
- 238000004590 computer program Methods 0.000 claims description 9
- 238000005516 engineering process Methods 0.000 abstract description 24
- 230000005641 tunneling Effects 0.000 description 33
- 238000010586 diagram Methods 0.000 description 22
- 230000008569 process Effects 0.000 description 21
- 230000004044 response Effects 0.000 description 13
- 230000006870 function Effects 0.000 description 7
- 238000012986 modification Methods 0.000 description 7
- 230000004048 modification Effects 0.000 description 7
- 238000013519 translation Methods 0.000 description 4
- 238000005538 encapsulation Methods 0.000 description 3
- 238000011161 development Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- VIEYMVWPECAOCY-UHFFFAOYSA-N 7-amino-4-(chloromethyl)chromen-2-one Chemical compound ClCC1=CC(=O)OC2=CC(N)=CC=C21 VIEYMVWPECAOCY-UHFFFAOYSA-N 0.000 description 1
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 1
- 101000827703 Homo sapiens Polyphosphoinositide phosphatase Proteins 0.000 description 1
- 101000641224 Homo sapiens Vimentin-type intermediate filament-associated coiled-coil protein Proteins 0.000 description 1
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 1
- MHABMANUFPZXEB-UHFFFAOYSA-N O-demethyl-aloesaponarin I Natural products O=C1C2=CC=CC(O)=C2C(=O)C2=C1C=C(O)C(C(O)=O)=C2C MHABMANUFPZXEB-UHFFFAOYSA-N 0.000 description 1
- 102100023591 Polyphosphoinositide phosphatase Human genes 0.000 description 1
- 101100012902 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) FIG2 gene Proteins 0.000 description 1
- 101100233916 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) KAR5 gene Proteins 0.000 description 1
- 102100034331 Vimentin-type intermediate filament-associated coiled-coil protein Human genes 0.000 description 1
- 230000003190 augmentative effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 229920001690 polydopamine Polymers 0.000 description 1
- 238000001356 surgical procedure Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/46—Interconnection of networks
- H04L12/4633—Interconnection of networks using encapsulation techniques, e.g. tunneling
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/74—Address processing for routing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/12—Avoiding congestion; Recovering from congestion
- H04L47/125—Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1004—Server selection for load balancing
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本申请公开了一种数据传输方法及装置,用以解决目前一些服务器不支持网络隧道协议从而无法采用L4负载均衡技术进行数据传输的问题。该方法应用于前端设备,该前端设备连接服务器集群包括的多个服务器。该方法包括:接收负载均衡器发送第一请求数据包;第一请求数据包为负载均衡器采用网络隧道协议对第二请求数据包进行封装得到的,第二请求数据包来自客户端;根据第一请求数据包的目的IP地址从多个服务器中确定目标服务器,并采用网络隧道协议将第一请求数据包进行解封装得到第二请求数据包;设置第二请求数据包的包头中的目的MAC地址为目标服务器的MAC地址,得到第三请求数据包;向目标服务器发送第三请求数据包。
The present application discloses a data transmission method and device, which are used to solve the problem that some servers currently do not support the network tunnel protocol and thus cannot use the L4 load balancing technology for data transmission. The method is applied to a front-end device, which is connected to multiple servers included in a server cluster. The method includes: receiving a first request data packet sent by a load balancer; the first request data packet is obtained by the load balancer using the network tunnel protocol to encapsulate the second request data packet, and the second request data packet comes from the client; determining the target server from multiple servers according to the destination IP address of the first request data packet, and using the network tunnel protocol to decapsulate the first request data packet to obtain the second request data packet; setting the destination MAC address in the packet header of the second request data packet to the MAC address of the target server, to obtain a third request data packet; sending the third request data packet to the target server.
Description
技术领域Technical Field
本申请涉及通信技术领域,尤其涉及一种数据传输方法及装置。The present application relates to the field of communication technology, and in particular to a data transmission method and device.
背景技术Background Art
互联网的快速发展使得多媒体网络服务器面对的访问数量迅速增长,而单个服务器的中央处理器(Central Processing Unit,CPU)和输入/输出(Input/Output,I/O)资源有限,无法满足大量并发访问的需求。因此目前采用多台服务器组成的集群联合对客户端提供服务。负载均衡技术指的是在应对用户请求服务器的高并发流量时,通过均衡算法将流量分配到集群中不同的服务器上的一种技术。其中,四层(L4)负载均衡技术是一种基于数据包的五元组(源IP地址、目的IP地址、源端口、目的端口和传输层协议)实现的负载均衡技术,工作在OSI第四层传输层。L4负载均衡通过在服务器集群之前部署一个负载均衡器(LOad Balancer),由负载均衡器接收来自外部客户端的请求数据包、通过均衡算法确定需要将接收到的请求转发到服务器集群中的具体哪一个服务器,并采用网络隧道协议(比如IP隧道协议和虚拟扩展局域网(Virtual eXtensible LOcal Area Network,VXLAN)协议等)将数据包进行封装后发往确定的服务器中。作为一种示例,参见图1,一种L4负载均衡技术的系统架构示意图。The rapid development of the Internet has led to a rapid increase in the number of visits to multimedia network servers, while the central processing unit (CPU) and input/output (I/O) resources of a single server are limited and cannot meet the needs of a large number of concurrent visits. Therefore, a cluster consisting of multiple servers is currently used to jointly provide services to clients. Load balancing technology refers to a technology that distributes traffic to different servers in a cluster through a balancing algorithm when responding to high concurrent traffic from user requests to the server. Among them, the four-layer (L4) load balancing technology is a load balancing technology based on the five-tuple of data packets (source IP address, destination IP address, source port, destination port and transport layer protocol), which works at the fourth layer of OSI, the transport layer. L4 load balancing deploys a load balancer (LOad Balancer) in front of the server cluster. The load balancer receives request packets from external clients, determines which specific server in the server cluster needs to forward the received request to through a balancing algorithm, and uses a network tunneling protocol (such as IP tunneling protocol and Virtual eXtensible LOcal Area Network (VXLAN) protocol, etc.) to encapsulate the data packet and send it to the determined server. As an example, see Figure 1, a schematic diagram of the system architecture of an L4 load balancing technology.
但是,一些服务器并不支持网络隧道协议(比如采用Windows系统的服务器),因此无法处理来自负载均衡器的数据包,从而无法响应客户端的请求。若是对所有的不支持网络隧道协议的服务器增加网络隧道协议处理模块,所要耗费的成本较大。因此,对于不支持网络隧道协议的服务器如何采用L4负载均衡技术进行数据传输是一个亟需解决的问题。However, some servers do not support the network tunneling protocol (such as servers using Windows systems), and therefore cannot process data packets from the load balancer, and thus cannot respond to client requests. If a network tunneling protocol processing module is added to all servers that do not support the network tunneling protocol, the cost is high. Therefore, how to use L4 load balancing technology for data transmission for servers that do not support the network tunneling protocol is an urgent problem to be solved.
发明内容Summary of the invention
本申请提供一种数据传输方法及装置用以解决目前一些服务器不支持网络隧道协议从而无法采用L4负载均衡技术进行数据传输的问题。The present application provides a data transmission method and device to solve the problem that some servers currently do not support the network tunnel protocol and thus cannot use L4 load balancing technology for data transmission.
第一方面,本申请实施例提供了一种数据传输方法,所述方法应用于前端设备,所述前端设备连接服务器集群包括的多个服务器,所述方法包括:In a first aspect, an embodiment of the present application provides a data transmission method, the method being applied to a front-end device, the front-end device being connected to a plurality of servers included in a server cluster, the method comprising:
接收负载均衡器发送第一请求数据包;所述第一请求数据包为所述负载均衡器采用网络隧道协议对第二请求数据包进行封装得到的,所述第二请求数据包来自客户端;receiving a first request data packet sent by the load balancer; the first request data packet is obtained by the load balancer encapsulating a second request data packet using a network tunnel protocol, and the second request data packet comes from a client;
根据所述第一请求数据包的目的IP地址从所述多个服务器中确定目标服务器,并采用网络隧道协议将所述第一请求数据包进行解封装得到所述第二请求数据包;Determine a target server from the multiple servers according to the destination IP address of the first request data packet, and use a network tunneling protocol to decapsulate the first request data packet to obtain the second request data packet;
设置所述第二请求数据包的包头中的目的MAC地址为所述目标服务器的MAC地址,得到第三请求数据包;Setting the destination MAC address in the packet header of the second request packet to the MAC address of the target server to obtain a third request packet;
向所述目标服务器发送所述第三请求数据包。Send the third request data packet to the target server.
在一些实施例中,所述方法还包括:In some embodiments, the method further comprises:
根据预先存储的IP地址映射关系,确定所述目的IP地址对应的所述目标服务器的IP地址;Determine the IP address of the target server corresponding to the destination IP address according to the pre-stored IP address mapping relationship;
采用地址解析协议确定所述目标服务器的IP地址对应的所述目标服务器的MAC地址。The address resolution protocol is used to determine the MAC address of the target server corresponding to the IP address of the target server.
在一些实施例中所述目标服务器为所述负载均衡器采用负载均衡算法从所述服务器集群中确定的用于接收所述第一请求数据包的服务器;所述目的IP地址为所述负载均衡器在判断所述目标服务器不支持网络隧道协议时,从存储的前端设备的多个IP地址中获取的与所述目标服务器对应的IP地址。In some embodiments, the target server is a server for receiving the first request data packet determined by the load balancer from the server cluster using a load balancing algorithm; the destination IP address is an IP address corresponding to the target server obtained from multiple IP addresses stored in a front-end device when the load balancer determines that the target server does not support the network tunnel protocol.
在一些实施例中,所述负载均衡器中存储有前端设备的多个IP地址与所述前端设备连接的多个服务器的IP地址之间的对应关系,所述目的IP地址为所述负载均衡器根据所述对应关系确定的与所述目标服务器的IP地址对应的前端设备的IP地址。In some embodiments, the load balancer stores a correspondence between multiple IP addresses of a front-end device and IP addresses of multiple servers connected to the front-end device, and the destination IP address is the IP address of the front-end device corresponding to the IP address of the target server determined by the load balancer based on the correspondence.
在一些实施例中,所述方法还包括:In some embodiments, the method further comprises:
记录所述目的IP地址与所述目标服务器的MAC地址之间的对应关系。The correspondence between the destination IP address and the MAC address of the target server is recorded.
在一些实施例中,所述设置所述第二请求数据包的包头中的目的MAC地址为所述目标服务器的MAC地址,具体包括:In some embodiments, setting the destination MAC address in the header of the second request data packet to the MAC address of the target server specifically includes:
判断所述第二请求数据包的包头中是否包括目的MAC地址;Determine whether the packet header of the second request data packet includes a destination MAC address;
若所述第二请求数据包的包头中包括目的MAC地址,则将所述第二请求数据包的包头中的目的MAC地址修改为所述目标服务器的MAC地址;If the packet header of the second request data packet includes a destination MAC address, modifying the destination MAC address in the packet header of the second request data packet to the MAC address of the target server;
若所述第二请求数据包的包头中不包括目的MAC地址,则在所述第二请求数据包的包头中增加所述目标服务器的MAC地址作为所述第二请求数据包的目的MAC地址。If the packet header of the second request data packet does not include the destination MAC address, the MAC address of the target server is added to the packet header of the second request data packet as the destination MAC address of the second request data packet.
在一些实施例中,所述方法还包括:In some embodiments, the method further comprises:
设置所述第二请求数据包的包头中的源MAC地址为所述前端设备的MAC地址。The source MAC address in the packet header of the second request data packet is set to the MAC address of the front-end device.
第二方面,本申请实施例提供了一种数据传输装置,所述装置为前端设备,或者所述装置应用于前端设备,所述装置连接服务器集群包括的多个服务器,所述装置包括:In a second aspect, an embodiment of the present application provides a data transmission device, the device is a front-end device, or the device is applied to a front-end device, the device is connected to multiple servers included in a server cluster, and the device includes:
通信单元,用于接收负载均衡器发送第一请求数据包;所述第一请求数据包为所述负载均衡器采用网络隧道协议对第二请求数据包进行封装得到的,所述第二请求数据包来自客户端;A communication unit, configured to receive a first request data packet sent by a load balancer; the first request data packet is obtained by encapsulating a second request data packet by the load balancer using a network tunnel protocol, and the second request data packet comes from a client;
处理单元,用于根据所述第一请求数据包的目的IP地址从所述多个服务器中确定目标服务器,并采用网络隧道协议将所述第一请求数据包进行解封装得到所述第二请求数据包;a processing unit, configured to determine a target server from the plurality of servers according to a destination IP address of the first request data packet, and to decapsulate the first request data packet using a network tunneling protocol to obtain the second request data packet;
所述处理单元,还用于设置所述第二请求数据包的包头中的目的MAC地址为所述目标服务器的MAC地址,得到第三请求数据包;The processing unit is further configured to set the destination MAC address in the packet header of the second request packet to be the MAC address of the target server, to obtain a third request packet;
所述通信单元,还用于向所述目标服务器发送所述第三请求数据包。The communication unit is further used to send the third request data packet to the target server.
在一些实施例中,所述处理单元,还用于:In some embodiments, the processing unit is further configured to:
根据预先存储的IP地址映射关系,确定所述目的IP地址对应的所述目标服务器的IP地址;Determine the IP address of the target server corresponding to the destination IP address according to the pre-stored IP address mapping relationship;
采用地址解析协议确定所述目标服务器的IP地址对应的所述目标服务器的MAC地址。The address resolution protocol is used to determine the MAC address of the target server corresponding to the IP address of the target server.
在一些实施例中,所述目标服务器为所述负载均衡器采用负载均衡算法从所述服务器集群中确定的用于接收所述第一请求数据包的服务器;所述目的IP地址为所述负载均衡器在判断所述目标服务器不支持网络隧道协议时,从存储的前端设备的多个IP地址中获取的与所述目标服务器对应的IP地址。In some embodiments, the target server is a server for receiving the first request data packet determined by the load balancer from the server cluster using a load balancing algorithm; the destination IP address is an IP address corresponding to the target server obtained from multiple IP addresses stored in a front-end device when the load balancer determines that the target server does not support a network tunneling protocol.
在一些实施例中,所述负载均衡器中存储有前端设备的多个IP地址与所述前端设备连接的多个服务器的IP地址之间的对应关系,所述目的IP地址为所述负载均衡器根据所述对应关系确定的与所述目标服务器的IP地址对应的前端设备的IP地址。In some embodiments, the load balancer stores a correspondence between multiple IP addresses of a front-end device and IP addresses of multiple servers connected to the front-end device, and the destination IP address is the IP address of the front-end device corresponding to the IP address of the target server determined by the load balancer based on the correspondence.
在一些实施例中,所述处理单元,还用于:In some embodiments, the processing unit is further configured to:
记录所述目的IP地址与所述目标服务器的MAC地址之间的对应关系。The correspondence between the destination IP address and the MAC address of the target server is recorded.
在一些实施例中,所述处理单元,具体用于:In some embodiments, the processing unit is specifically configured to:
判断所述第二请求数据包的包头中是否包括目的MAC地址;Determine whether the packet header of the second request data packet includes a destination MAC address;
若所述第二请求数据包的包头中包括目的MAC地址,则将所述第二请求数据包的包头中的目的MAC地址修改为所述目标服务器的MAC地址;If the packet header of the second request data packet includes a destination MAC address, modifying the destination MAC address in the packet header of the second request data packet to the MAC address of the target server;
若所述第二请求数据包的包头中不包括目的MAC地址,则在所述第二请求数据包的包头中增加所述目标服务器的MAC地址作为所述第二请求数据包的目的MAC地址。If the packet header of the second request data packet does not include the destination MAC address, the MAC address of the target server is added to the packet header of the second request data packet as the destination MAC address of the second request data packet.
在一些实施例中,所述处理单元,还用于:In some embodiments, the processing unit is further configured to:
设置所述第二请求数据包的包头中的源MAC地址为所述前端设备的MAC地址。The source MAC address in the packet header of the second request data packet is set to the MAC address of the front-end device.
第三方面,提供了一种电子设备,所述电子设备包括控制器和存储器。存储器用于存储计算机执行指令,控制器执行存储器中的计算机执行指令以利用控制器中的硬件资源执行第一方面任一种可能实现的方法的操作步骤。In a third aspect, an electronic device is provided, the electronic device comprising a controller and a memory. The memory is used to store computer-executable instructions, and the controller executes the computer-executable instructions in the memory to use hardware resources in the controller to perform the operation steps of any possible implementation method of the first aspect.
第四方面,提供一种计算机可读存储介质,计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述各方面的方法。In a fourth aspect, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is run on the computer, the computer executes the above-mentioned methods.
本申请提出在服务器集群之前部署前端设备,由前端设备作为服务器集群和负载均衡器之间的桥梁,前端设备可以采用网络隧道协议对来自负载均衡器的报文进行处理并转发给服务器,从而服务器可以直接采用标准的互联网协议处理报文即可。本申请的方案解决了现有的一些服务器无法支持网络隧道协议的问题,并且无需将负载均衡器与服务器部署到同一局域网中,提升了服务器部署的灵活性。This application proposes to deploy a front-end device before the server cluster, and the front-end device serves as a bridge between the server cluster and the load balancer. The front-end device can use the network tunnel protocol to process the message from the load balancer and forward it to the server, so that the server can directly use the standard Internet protocol to process the message. The solution of this application solves the problem that some existing servers cannot support the network tunnel protocol, and there is no need to deploy the load balancer and the server in the same local area network, which improves the flexibility of server deployment.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
图1为一种L4负载均衡技术的系统架构示意图;FIG1 is a schematic diagram of a system architecture of an L4 load balancing technology;
图2为一种基于直接路由实现的负载均衡的系统架构示意图;FIG2 is a schematic diagram of a system architecture for load balancing based on direct routing;
图3为一种基于地址转换实现的负载均衡的系统架构示意图;FIG3 is a schematic diagram of a system architecture for load balancing based on address translation;
图4为一种基于隧道技术实现的负载均衡的系统架构示意图;FIG4 is a schematic diagram of a system architecture for load balancing based on tunnel technology;
图5为本申请实施例提供的一种通信系统架构示意图;FIG5 is a schematic diagram of a communication system architecture provided in an embodiment of the present application;
图6为本申请实施例提供的一种数据传输方法的流程示意图;FIG6 is a schematic diagram of a flow chart of a data transmission method provided in an embodiment of the present application;
图7为本申请实施例提供的一种前端设备的架构示意图;FIG7 is a schematic diagram of the architecture of a front-end device provided in an embodiment of the present application;
图8为本申请实施例提供的另一种数据传输方法的流程示意图;FIG8 is a schematic diagram of a flow chart of another data transmission method provided in an embodiment of the present application;
图9为本申请实施例提供的一种数据传输装置的结构示意图;FIG9 is a schematic diagram of the structure of a data transmission device provided in an embodiment of the present application;
图10为本申请实施例提供的一种电子设备的结构示意图。FIG. 10 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
具体实施方式DETAILED DESCRIPTION
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请技术方案的一部分实施例,而不是全部的实施例。基于本申请文件中记载的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请技术方案保护的范围。In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the technical solution of the present application, rather than all of the embodiments. Based on the embodiments recorded in the application documents, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the technical solution of the present application.
本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本发明的实施例能够使用除了在这里图示或描述的那些以外的顺序实施。The terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented using sequences other than those illustrated or described herein.
服务器集群是指将多台服务器联合对外提供服务,从而提升整理服务器的处理性能。本申请的方案在于维持服务器集群中多个服务器负载均衡的情况下如何进行数据传输。目前负载均衡技术有很多种,主要包括:域名系统(Domain Name System,DNS)实现负载均衡、七层负载均衡和L4负载均衡技术。Server cluster refers to combining multiple servers to provide external services, thereby improving the processing performance of the servers. The solution of this application is to maintain the load balance of multiple servers in the server cluster while transmitting data. There are many load balancing technologies, mainly including: Domain Name System (DNS) to achieve load balancing, seven-layer load balancing and L4 load balancing technology.
其中,基于DNS实现的负载均衡指的是在DNS中为多个服务器的地址配置同一个域名,因此查询到该域名的客户端将得到其中一个地址,从而使得不同客户端访问不同的服务器,达到负载均衡的目的。DNS负载均衡无需开发和维护负载均衡设备,实现简单成本低,并且将负载均衡的工作交给了DNS服务器,节约了管理成本。但是DNS并不清楚各个服务器的实际负载情况,因此无法做到按需分配,并且DNS可以支持的算法较少、流量分配策略简单,容易导致调度不均衡、粒度大等问题。另外,服务器添加、修改或者故障切换的信息同步到DNS服务器的时延大,导致用户访问失败。七层负载均衡是基于虚拟的统一资源定位符(Uniform Resource LOcator,URL)或者主机的网络协议(Internet Protocol,IP)地址的负载均衡,通过应用层协议实现负载均衡。比如nginx负载均衡技术,在网络分层中的第七层(应用层),nginx与客户端建立连接(握手建链),然后根据客户端的请求信息以及本地的配置信息,将请求灵活地分发到不同的服务器上。七层负载均衡技术虽然可以实现服务器之间负载均衡,但是需要与客户端建立连接,效率较低。Among them, load balancing based on DNS means configuring the same domain name for the addresses of multiple servers in DNS, so that the client that queries the domain name will get one of the addresses, so that different clients can access different servers to achieve the purpose of load balancing. DNS load balancing does not require the development and maintenance of load balancing equipment, is simple to implement and has low cost, and the work of load balancing is handed over to the DNS server, saving management costs. However, DNS is not clear about the actual load of each server, so it cannot be allocated on demand, and DNS can support fewer algorithms and simple traffic distribution strategies, which easily lead to problems such as unbalanced scheduling and large granularity. In addition, the delay of synchronizing the information of server addition, modification or fault switching to the DNS server is large, resulting in user access failure. Seven-layer load balancing is load balancing based on a virtual uniform resource locator (URL) or the host's Internet Protocol (IP) address, and load balancing is achieved through application layer protocols. For example, nginx load balancing technology, in the seventh layer (application layer) of the network layer, nginx establishes a connection with the client (handshake and link establishment), and then flexibly distributes the request to different servers according to the client's request information and local configuration information. Although the seven-layer load balancing technology can achieve load balancing between servers, it needs to establish a connection with the client, which is less efficient.
基于上述问题,相关技术中提出了L4负载均衡技术。L4负载均衡是一种基于网络隧道协议实现的负载均衡技术。网络隧道协议主要包括IP隧道(IP Tunneling)协议和VXLAN协议。其中,IP隧道协议是将一个IP报文封装在另一个IP报文的技术,可以使得目标为一个IP地址的数据报文能够被封装和转发到另一个IP地址。IP隧道技术又可以称为IP封装(IP encapsulation)技术。VXLAN引入了一个用户数据报协议(User DatagramProtocol,UDP)格式的外层隧道作为数据链路层,原有的数据报文内容作为隧道净荷加以传输。也就是说,IP隧道协议的外层隧道为网络第三层-应用层,而VXLAN协议的外层隧道为网络第二层-数据链路层,从而相较于IP隧道协议,VXLAN协议可以实现跨地域的二层互联。L4负载均衡主要包括:地址转换(Network Address Translation,NAT)、直接路由(DirectRouting,DR)和隧道(Tunneling,TUN)三种工作模式。以下对这三种工作模式进行介绍。Based on the above problems, L4 load balancing technology is proposed in the related technology. L4 load balancing is a load balancing technology based on network tunneling protocol. Network tunneling protocols mainly include IP tunneling protocol and VXLAN protocol. Among them, IP tunneling protocol is a technology that encapsulates an IP message in another IP message, so that the data message with the target of one IP address can be encapsulated and forwarded to another IP address. IP tunneling technology can also be called IP encapsulation technology. VXLAN introduces an outer tunnel in the format of User Datagram Protocol (UDP) as the data link layer, and the original data message content is transmitted as the tunnel payload. In other words, the outer tunnel of IP tunneling protocol is the third layer of the network - application layer, while the outer tunnel of VXLAN protocol is the second layer of the network - data link layer. Therefore, compared with IP tunneling protocol, VXLAN protocol can realize cross-regional Layer 2 interconnection. L4 load balancing mainly includes three working modes: Network Address Translation (NAT), Direct Routing (DR) and Tunneling (TUN). The three working modes are introduced below.
DR工作模式的架构可以参见图2,在DR模式中,负载均衡器(LOad Balancer,LB)通过修改数据包的目的MAC地址,并在服务器配置仅服务器可见回环(LOopback adaptor,LO)网卡地址实现数据包的接收。其中,LO网卡是一种位于服务器中的特殊的网络接口,不与任何实际的设备相连接,用于实现同一服务器中各个进程之间的通信。LO网卡上可以配置有多个IP地址。DR模式的具体流程为:步骤一,客户端向LB发送请求数据包。这里定义请求数据包的源IP地址为CIP,目的IP地址为LB的虚拟IP(Virtual IP,VIP),源MAC地址为CMAC,目的MAC地址为VMAC。步骤二,LB接收请求数据包,根据负载均衡算法从服务器集群中确定所要转发的目标服务器,并将包头中的目的MAC地址修改为目标服务器的MAC地址(定义为RMAC),并将源MAC地址修改为LB与目标服务器同网段的IP地址对应的MAC地址(定义为DMAC)。步骤三,LB将修改MAC地址后的请求数据包发送给目标服务器。步骤四,目标服务器接收请求数据包并确定数据包的目的MAC地址为自身的网卡地址、目的IP地址为LO网卡中配置的VIP,从而解析请求数据包获取数据并进行相应的业务处理得到响应数据包。采用VIP作为源IP、CIP为目的IP将响应数据包发给客户端,完成请求响应过程。The architecture of the DR working mode can be seen in Figure 2. In the DR mode, the load balancer (LOad Balancer, LB) receives the data packet by modifying the destination MAC address of the data packet and configuring the server-only visible loopback (LOopback adaptor, LO) network card address on the server. Among them, the LO network card is a special network interface located in the server, which is not connected to any actual device and is used to realize communication between various processes in the same server. Multiple IP addresses can be configured on the LO network card. The specific process of the DR mode is as follows: Step 1, the client sends a request data packet to the LB. Here, the source IP address of the request data packet is defined as CIP, the destination IP address is the virtual IP (Virtual IP, VIP) of the LB, the source MAC address is CMAC, and the destination MAC address is VMAC. Step 2, the LB receives the request data packet, determines the target server to be forwarded from the server cluster according to the load balancing algorithm, and modifies the destination MAC address in the packet header to the MAC address of the target server (defined as RMAC), and modifies the source MAC address to the MAC address corresponding to the IP address of the LB and the target server in the same network segment (defined as DMAC). Step 3, the LB sends the request data packet with the modified MAC address to the target server. Step 4: The target server receives the request data packet and determines that the destination MAC address of the data packet is its own network card address and the destination IP address is the VIP configured in the LO network card, thereby parsing the request data packet to obtain data and performing corresponding business processing to obtain a response data packet. The response data packet is sent to the client using the VIP as the source IP and the CIP as the destination IP to complete the request response process.
DR工作模式是通过直接路由的方式将客户端的请求数据包转发给服务器,并由服务器直接返回响应信息给客户端,无需经过LB,效率较高且对数据包的修改较小使得数据包的信息保存完整。但是,由于LB是通过数据链路层直接将请求数据包发送给服务器,所以LB与服务器必须处于同一个局域网内,因此服务器集群中的服务器无法跨机房部署。另外,服务器上还必须配置有LO网卡。The DR working mode is to forward the client's request data packet to the server through direct routing, and the server directly returns the response information to the client without going through the LB. It is more efficient and the modification of the data packet is small, so the information of the data packet is kept intact. However, since the LB directly sends the request data packet to the server through the data link layer, the LB and the server must be in the same LAN, so the servers in the server cluster cannot be deployed across computer rooms. In addition, the server must also be configured with a LO network card.
NAT工作模式的系统架构可以参见图3,在NAT模式中,客户端的请求数据包直接发往LB的VIP,LB利用网络地址转换技术将请求数据包的目的IP地址修改为目标服务器的地址,从而将请求数据包转发给目标服务器进行业务处理。具体流程为:步骤一,客户端向LB发送请求数据包。这里定义请求数据包的源IP地址为CIP,目的IP地址为LB的VIP。步骤二,LB接收请求数据包,解析请求数据包的包头中的IP地址,将目的IP地址修改为目标服务器的IP地址(定义为RIP),并将修改后的请求数据包发往目标服务器。其中,目标服务器是LB通过负载均衡算法确定的。步骤三,目标服务器确定接收到的请求数据包的目的IP地址为自身的IP地址之后,可以解析请求数据包并生成响应数据包。步骤四,目标服务器将响应数据包发往给LB。由于目标服务器中配置的网关设备为LB,因此目标服务器会将响应数据包发送给LB。步骤五,LB将响应数据包转发至客户端。The system architecture of the NAT working mode can be seen in Figure 3. In the NAT mode, the client's request data packet is directly sent to the VIP of the LB. The LB uses the network address translation technology to modify the destination IP address of the request data packet to the address of the target server, thereby forwarding the request data packet to the target server for business processing. The specific process is as follows: Step 1, the client sends a request data packet to the LB. Here, the source IP address of the request data packet is defined as CIP, and the destination IP address is the VIP of the LB. Step 2, the LB receives the request data packet, parses the IP address in the header of the request data packet, modifies the destination IP address to the IP address of the target server (defined as RIP), and sends the modified request data packet to the target server. Among them, the target server is determined by the LB through the load balancing algorithm. Step 3, after the target server determines that the destination IP address of the received request data packet is its own IP address, it can parse the request data packet and generate a response data packet. Step 4, the target server sends the response data packet to the LB. Since the gateway device configured in the target server is LB, the target server will send the response data packet to the LB. Step 5, the LB forwards the response data packet to the client.
NAT模式对于服务器的要求不高,只需要处理标准的互联网传输层协议即可。但是由于所有的请求和响应报文均需要经过LB,并且LB还需要对报文进行地址转换,因此导致LB的负载较大。NAT mode does not have high requirements for the server, and only needs to process the standard Internet transport layer protocol. However, since all request and response messages need to pass through LB, and LB also needs to perform address translation on the messages, the load on LB is relatively large.
TUN工作模式的系统架构可以参见图4,TUN模式与DR模式类似,需要在服务器配置仅服务器可见LO网卡地址实现数据包的接收。不同于DR模式修改MAC地址,TUN模式是在原有的数据包的基础上再次进行封装,并发往目标服务器。具体流程为:步骤一,客户端向LB发送请求数据包。这里定义请求数据包的源IP地址为CIP,目的IP地址为LB的VIP。步骤二,LB接收请求数据包,并采用网络隧道协议对请求数据包进行封装处理,增加隧道(Tunnel)头部(其中源IP为DIP、目的IP为RIP),并将再次封装的请求数据包发往目标服务器。步骤三,目标服务器接收到请求数据包之后,首先采用网络隧道协议对其进行解封装,再采用标准的互联网协议对其再次进行解封装,然后生成响应数据包返回给客户端。The system architecture of the TUN working mode can be seen in Figure 4. The TUN mode is similar to the DR mode. It is necessary to configure the server-only visible LO network card address on the server to realize the reception of data packets. Unlike the DR mode to modify the MAC address, the TUN mode re-encapsulates the original data packet and sends it to the target server. The specific process is: Step 1, the client sends a request data packet to the LB. Here, the source IP address of the request data packet is defined as CIP, and the destination IP address is the VIP of the LB. Step 2, the LB receives the request data packet, and uses the network tunnel protocol to encapsulate the request data packet, adds a tunnel header (where the source IP is DIP and the destination IP is RIP), and sends the re-encapsulated request data packet to the target server. Step 3, after the target server receives the request data packet, it first uses the network tunnel protocol to decapsulate it, and then uses the standard Internet protocol to decapsulate it again, and then generates a response data packet and returns it to the client.
TUN模式对于LB的负载压力较小,但是由于上层应用无法解析网络隧道协议,所以需要所有的服务器均具备网络隧道协议处理模块,对于服务器的要求较高。The TUN mode puts less load pressure on the LB, but because the upper-layer application cannot parse the network tunnel protocol, all servers are required to have a network tunnel protocol processing module, which places high requirements on the server.
基于上述问题,本申请提出了一种数据传输方案,在L4负载均衡技术的TUN工作模式下,在服务器集群之前部署前端设备,由前端设备采用网络隧道协议对来自LB的报文进行初步解封装,并将请求数据包的目的MAC地址设置为目标服务器的MAC地址,最后将处理后的请求数据包发送给目标服务器。从而目标服务器仅需要具备标准的互联网协议处理模块即可以响应请求。Based on the above problems, this application proposes a data transmission solution. In the TUN working mode of L4 load balancing technology, a front-end device is deployed before the server cluster. The front-end device uses the network tunneling protocol to preliminarily decapsulate the message from the LB, and sets the destination MAC address of the request data packet to the MAC address of the target server, and finally sends the processed request data packet to the target server. Therefore, the target server only needs to have a standard Internet protocol processing module to respond to the request.
为了便于理解本申请的方案,首先对本申请使用的通信系统进行介绍。参见图5,为本申请实施例提供的一种通信系统的架构示意图。应理解,本申请实施例并不限于图5所示的系统中,此外,图5中的装置可以是硬件,也可以是从功能上划分的软件或者以上二者结合后的结构。如图5所示,通信系统中包括客户端、负载均衡器、前端设备和服务器集群。其中,服务器集群中可以包括两类服务器,第一类为支持网络隧道协议的服务器,比如采用LINUX系统的服务器,在图5中以服务器A和服务器B作为第一类服务器;第二类是不支持网络隧道协议的服务器,比如采用Window系统的服务器,在图5中以服务器C和服务器D作为第二类服务器。In order to facilitate understanding of the solution of the present application, the communication system used in the present application is first introduced. Referring to Figure 5, a schematic diagram of the architecture of a communication system provided for an embodiment of the present application. It should be understood that the embodiment of the present application is not limited to the system shown in Figure 5. In addition, the device in Figure 5 can be hardware, or software divided from a functional point of view, or a structure after the above two are combined. As shown in Figure 5, the communication system includes a client, a load balancer, a front-end device, and a server cluster. Among them, the server cluster can include two types of servers, the first type is a server that supports a network tunneling protocol, such as a server using a LINUX system, and in Figure 5, server A and server B are used as the first type of servers; the second type is a server that does not support a network tunneling protocol, such as a server using a Window system, and in Figure 5, server C and server D are used as the second type of servers.
示例性地,客户端是一种用户使用的终端设备,有可以称之为移动台(MobileStation,MS)、移动终端(Mobile Terminal,MT)等,是一种向用户提供语音和/或数据连通性的设备,例如,具有无线连接功能的手持式设备、车载设备等。目前,一些终端的举例为:手机(mobile phone)、平板电脑、笔记本电脑、掌上电脑、移动互联网设备(MobileInternet Device,MID)、可穿戴设备,虚拟现实(Virtual Reality,VR)设备、增强现实(Augmented Reality,AR)设备、工业控制(Industrial Control)中的无线终端、无人驾驶(self driving)中的无线终端、远程手术(remote medical surgery)中的无线终端、智能电网(smart grid)中的无线终端、运输安全(transportation safety)中的无线终端、智慧城市(smart city)中的无线终端、智慧家庭(smart home)中的无线终端等。Exemplarily, a client is a terminal device used by a user, which may be called a mobile station (MS), a mobile terminal (MT), etc. It is a device that provides voice and/or data connectivity to a user, for example, a handheld device with a wireless connection function, a vehicle-mounted device, etc. At present, some examples of terminals are: mobile phones, tablet computers, laptop computers, PDAs, mobile Internet devices (MID), wearable devices, virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in industrial control, wireless terminals in self driving, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, etc.
图5中的负载均衡器可以为一个独立的服务器、处理器或者处理芯片等,也可以集成在网关设备,比如交换机中。负载均衡器中部署有负载均衡算法,用于为服务器集群中的服务器分配来自客户端的请求,保证各个服务器之间负载均衡。图5中示出的前端设备也可以为一个独立的服务器、处理器或者处理芯片等。前端设备作为负载均衡器和服务器集群中的第二类服务器之间的桥梁,用于采用网络隧道协议对来自负载均衡器的请求数据包进行处理,并向第二类服务器转发处理后的请求数据包。The load balancer in FIG5 can be an independent server, processor or processing chip, etc., or it can be integrated in a gateway device, such as a switch. A load balancing algorithm is deployed in the load balancer to distribute requests from clients to servers in the server cluster to ensure load balancing between the servers. The front-end device shown in FIG5 can also be an independent server, processor or processing chip, etc. The front-end device serves as a bridge between the load balancer and the second type of server in the server cluster, and is used to process the request data packets from the load balancer using a network tunneling protocol, and forward the processed request data packets to the second type of server.
需要说明的是,图5仅作为一种示例性的描述,本申请对于通信系统中包括的服务器的数量、前端设备的数量和客户端的数量不做限定。可选地,一台前端设备可以同时为多台第二类服务器提供数据包的处理服务。It should be noted that Figure 5 is only an exemplary description, and the present application does not limit the number of servers, front-end devices, and clients included in the communication system. Optionally, one front-end device can provide data packet processing services for multiple second-class servers at the same time.
下面,结合图5所示的系统对本申请的方案进行具体介绍。参见图6,为本申请实施例提供的一种数据传输方法的流程示意图。示例性地,图6所示的流程可以由图5所示的系统中包括的前端设备来执行,图6中涉及的多个服务器为图5所示系统中包括的第二类服务器。图6所示的方法流程具体包括:The solution of the present application is described in detail below in conjunction with the system shown in FIG5 . Referring to FIG6 , a flow chart of a data transmission method provided in an embodiment of the present application is shown. Exemplarily, the process shown in FIG6 can be executed by a front-end device included in the system shown in FIG5 , and the multiple servers involved in FIG6 are second-class servers included in the system shown in FIG5 . The method flow shown in FIG6 specifically includes:
601,接收来自负载均衡器的第一请求数据包。601, receiving a first request data packet from a load balancer.
其中,第一请求数据包为负载均衡器采用网络隧道协议对第二请求数据包进行解封装得到的,第二请求数据包来自客户端。也就是说,客户端可以生成请求信息,并采用标准的互联网传输协议,比如传输控制协议/网际协议(Transmission Control Protocol/Internet Protocol,TCP/IP)协议对请求信息进行封装得到第二请求数据包,将第二请求数据包发送给负载均衡器。负载均衡器接收到第二请求数据包后,可以采用负载均衡算法从服务器集群中确定目标服务器,并根据存储的目标服务器的IP地址和MAC地址采用网络隧道协议对第二请求数据包进行封装处理得到第一请求数据包,并将第一请求数据包发送给前端设备。需要说明的是,在本申请中,由于目标服务器为第二类服务器,因此负载均衡器存储的目标服务器的IP地址为前端设备的多个IP地址中的一个,存储的目标服务器的MAC地址为前端设备的多个MAC地址中的一个。Among them, the first request data packet is obtained by the load balancer using the network tunnel protocol to decapsulate the second request data packet, and the second request data packet comes from the client. That is to say, the client can generate request information, and use a standard Internet transmission protocol, such as the Transmission Control Protocol/Internet Protocol (TCP/IP) protocol to encapsulate the request information to obtain a second request data packet, and send the second request data packet to the load balancer. After receiving the second request data packet, the load balancer can use a load balancing algorithm to determine the target server from the server cluster, and use the network tunnel protocol to encapsulate the second request data packet according to the stored IP address and MAC address of the target server to obtain a first request data packet, and send the first request data packet to the front-end device. It should be noted that in the present application, since the target server is a second-class server, the IP address of the target server stored by the load balancer is one of the multiple IP addresses of the front-end device, and the MAC address of the target server stored is one of the multiple MAC addresses of the front-end device.
602,根据第一请求数据包的目的IP地址从多个服务器中确定目标服务器,并采用网络隧道协议对第一请求数据包进行解封装处理得到第二请求数据包。602, determine a target server from multiple servers according to the destination IP address of the first request data packet, and use a network tunneling protocol to decapsulate the first request data packet to obtain a second request data packet.
其中,多个服务器为上述图5所示系统中包括的第二类服务器。Among them, the multiple servers are the second type of servers included in the system shown in FIG. 5 above.
示例性地,前端设备在接收到第一请求数据包后,可以根据第一请求数据包的包头中的目的IP地址是否为本机的IP地址来确定第一请求数据包是否发送正确。比如,当前端设备确定第一请求数据包的目的IP地址并非本机配置的IP地址,则前端设备可以将第一请求数据包丢弃;当确定第一请求数据包的目的IP地址为本机配置的IP地址,则前端设备可以对第一请求数据包进行解析。Exemplarily, after receiving the first request data packet, the front-end device can determine whether the first request data packet is sent correctly according to whether the destination IP address in the packet header of the first request data packet is the IP address of the local machine. For example, when the front-end device determines that the destination IP address of the first request data packet is not the IP address configured by the local machine, the front-end device can discard the first request data packet; when it is determined that the destination IP address of the first request data packet is the IP address configured by the local machine, the front-end device can parse the first request data packet.
其中,前端设备的本机IP地址可以设置多个,IP地址的数量即为前端设备连接的服务器的数量,比如图5所示的系统中,前端设备连接两个第二类服务器(服务器C和服务器D),则可以配置两个本机IP地址,即负载均衡器中记录的服务器C和服务器D的IP地址均为前端设备的本机IP地址,从而只要目的地址为这两个本机IP地址的数据包均会被传输到前端设备。可选地,前端设备中还可以存储有本机IP地址和服务器实际IP地址之间的映射关系,比如设置的本机IP地址可以包括“IP地址C”对应服务器C的实际IP地址,还可以包括“IP地址D”对应服务器D的实际IP地址。相对应地,在负载均衡器中存储的服务器C的IP地址并非服务器C的实际IP地址,而是前端设备中设置的本机IP地址,即“IP地址C”。同理,在负载均衡器中存储的服务器D的IP地址为前端设备中设置的本机IP地址,即“IP地址D”。由此,负载均衡器在确定目标服务器为服务器C时,会采用“IP地址C”对第二请求数据包进行封装,而“IP地址C”正是前端设备中配置的本机IP地址,从而该封装后的数据包会被前端设备接收。Among them, the local IP address of the front-end device can be set to multiple, and the number of IP addresses is the number of servers connected to the front-end device. For example, in the system shown in Figure 5, the front-end device is connected to two second-class servers (server C and server D), then two local IP addresses can be configured, that is, the IP addresses of server C and server D recorded in the load balancer are both the local IP addresses of the front-end device, so that as long as the destination address is the data packet of these two local IP addresses, it will be transmitted to the front-end device. Optionally, the mapping relationship between the local IP address and the actual IP address of the server can also be stored in the front-end device. For example, the set local IP address can include the actual IP address of server C corresponding to "IP address C", and can also include the actual IP address of server D corresponding to "IP address D". Correspondingly, the IP address of server C stored in the load balancer is not the actual IP address of server C, but the local IP address set in the front-end device, that is, "IP address C". Similarly, the IP address of server D stored in the load balancer is the local IP address set in the front-end device, that is, "IP address D". Therefore, when the load balancer determines that the target server is server C, it will use "IP address C" to encapsulate the second request data packet, and "IP address C" is exactly the local IP address configured in the front-end device, so that the encapsulated data packet will be received by the front-end device.
603,设置第二请求数据包的包头中的目的MAC地址为目标服务器的MAC地址,得到第三请求数据包。603. Set the destination MAC address in the packet header of the second request data packet to the MAC address of the target server to obtain a third request data packet.
示例性地,前端设备中可以在步骤604中确定目标服务器的实际IP地址之后,根据地址解析协议(Address Resolution Protocol,ARP)确定与目标服务器的实际IP地址对应的目标服务器的MAC地址,从而设置第二请求数据包的包头中的目的MAC地址为目标服务器的MAC地址。Exemplarily, after determining the actual IP address of the target server in step 604, the front-end device can determine the MAC address of the target server corresponding to the actual IP address of the target server according to the Address Resolution Protocol (ARP), thereby setting the destination MAC address in the packet header of the second request data packet to the MAC address of the target server.
604,向目标服务器发送第三请求数据包。604, sending a third request data packet to the target server.
示例性地,目标服务器在接收到第三请求数据包后,可以检查第三请求数据包的目的MAC地址是否为自身的网卡地址,以及检查第三请求数据包的目的IP地址是否为负载均衡器的IP地址(即VIP,其中服务器集群包括的各个服务器的LO网卡上均配置了VIP)。进而,目标服务器还可以根据第三请求数据包中的端口号确定相应的上层应用程序,并采用确定的应用程序进行相应的业务处理生成响应数据包,并向客户端返回响应数据包,完成请求响应的过程。Exemplarily, after receiving the third request data packet, the target server can check whether the destination MAC address of the third request data packet is its own network card address, and check whether the destination IP address of the third request data packet is the IP address of the load balancer (i.e., VIP, where the LO network cards of each server included in the server cluster are configured with VIP). Furthermore, the target server can also determine the corresponding upper-layer application according to the port number in the third request data packet, use the determined application to perform corresponding business processing to generate a response data packet, and return the response data packet to the client to complete the request response process.
基于上述方案,本申请提出在服务器集群之前部署前端设备,由前端设备作为服务器集群和负载均衡器之间的桥梁,前端设备可以采用网络隧道协议对来自负载均衡器的报文进行处理并转发给服务器,从而服务器可以直接采用标准的互联网协议处理报文即可。本申请的方案解决了现有的一些服务器无法支持网络隧道协议的问题,并且无需将负载均衡器与服务器部署到同一局域网中,提升了服务器部署的灵活性。Based on the above solution, the present application proposes to deploy a front-end device before the server cluster, and the front-end device serves as a bridge between the server cluster and the load balancer. The front-end device can use the network tunnel protocol to process the message from the load balancer and forward it to the server, so that the server can directly use the standard Internet protocol to process the message. The solution of the present application solves the problem that some existing servers cannot support the network tunnel protocol, and there is no need to deploy the load balancer and the server in the same local area network, which improves the flexibility of server deployment.
在一些实施例中,前端设备中存储有服务器的实际IP地址与配置的本机IP地址之间的映射关系,还可以配置有服务器的实际MAC地址与配置的本机IP地址之间的映射关系。从而,前端设备在执行上述步骤603时,可以直接从存储空间中获取与第一请求数据包的目的IP地址(即前端设备配置的本机IP地址)对应的MAC地址,并采用获取的MAC地址来设置第二请求数据包的目的MAC地址。在一种可能的情况下,若前端设备的存储空间中未存储与第一请求数据包的目的IP地址(即前端设备配置的本机IP地址)对应的MAC地址,前端设备还可以根据存储的服务器的实际IP地址与配置的本机IP地址之间的映射关系,确定目标服务器的实际IP地址,并可以根据地址解析协议(Address Resolution Protocol,ARP)确定目标服务器的实际IP地址对应的MAC地址。在这种情况下,前端设备还可以记录第一请求数据包的目的IP地址(即前端设备配置的本机IP地址)与确定出的目标服务器的MAC地址之间的映射关系,比如可以生成MAC地址映射表并存储在存储空间中,以便于下次可以直接根据数据包的目的IP地址查询对应的MAC地址。In some embodiments, the front-end device stores a mapping relationship between the actual IP address of the server and the configured local IP address, and can also be configured with a mapping relationship between the actual MAC address of the server and the configured local IP address. Thus, when the front-end device executes the above step 603, it can directly obtain the MAC address corresponding to the destination IP address of the first request data packet (i.e., the local IP address configured by the front-end device) from the storage space, and use the obtained MAC address to set the destination MAC address of the second request data packet. In a possible case, if the storage space of the front-end device does not store the MAC address corresponding to the destination IP address of the first request data packet (i.e., the local IP address configured by the front-end device), the front-end device can also determine the actual IP address of the target server according to the mapping relationship between the actual IP address of the stored server and the configured local IP address, and can determine the MAC address corresponding to the actual IP address of the target server according to the Address Resolution Protocol (ARP). In this case, the front-end device can also record the mapping relationship between the destination IP address of the first request data packet (i.e., the local IP address configured by the front-end device) and the determined MAC address of the target server, for example, a MAC address mapping table can be generated and stored in the storage space, so that the corresponding MAC address can be directly queried according to the destination IP address of the data packet next time.
在一种可能实现的方式中,前端设备确定目标服务器的MAC地址之后,可以将其设置为第二请求数据包的目的MAC地址。示例性地,前端设备可以判断第二请求数据包的包头中是否包括目的MAC地址。由于负载均衡器在对来自客户端的第二请求数据包进行重封装时,采用不同的网络隧道协议会导致封装的结果不同。比如,若采用IP隧道协议,则会导致第二请求数据包的包头中的第二层缺失,也就是前端设备得到的第二请求数据包的包头中不存在MAC地址。在这种情况下,前端设备可以在第二请求数据包的包头中添加目标服务器的MAC地址作为目的MAC地址。若是采用VXLAN协议进行封装,则前端设备得到的第二请求数据包的包头中会包括MAC地址。在这种情况下,前端设备可以将第二请求数据包的包头中包括的MAC地址修改为目标服务器的MAC地址。In one possible implementation, after the front-end device determines the MAC address of the target server, it can set it as the destination MAC address of the second request data packet. Exemplarily, the front-end device can determine whether the destination MAC address is included in the header of the second request data packet. Because the load balancer uses different network tunnel protocols when re-encapsulating the second request data packet from the client, the encapsulation results will be different. For example, if the IP tunnel protocol is used, the second layer in the header of the second request data packet will be missing, that is, the MAC address does not exist in the header of the second request data packet obtained by the front-end device. In this case, the front-end device can add the MAC address of the target server as the destination MAC address in the header of the second request data packet. If the VXLAN protocol is used for encapsulation, the header of the second request data packet obtained by the front-end device will include a MAC address. In this case, the front-end device can modify the MAC address included in the header of the second request data packet to the MAC address of the target server.
作为一种可选的方式,前端设备在设置第二请求数据包的包头时,还可以对包头中的源MAC地址进行修改,可以将包头中的源MAC地址修改为前端设备自身的MAC地址。具体地,前端设备可以查询自身配置的与目标服务器同网段的IP地址对应的MAC地址,将其作为第二请求数据包的源MAC地址。As an optional method, when setting the header of the second request data packet, the front-end device can also modify the source MAC address in the header, and can modify the source MAC address in the header to the MAC address of the front-end device itself. Specifically, the front-end device can query the MAC address corresponding to the IP address of the same network segment as the target server configured by itself, and use it as the source MAC address of the second request data packet.
示例性地,上述各个实施例中介绍的方案可以由前端设备来执行,也可以由前端设备中包括的处理器、处理芯片或者不同的处理模块来执行。比如,作为一种示例,参见图7,为本申请实施例提供的一种前端设备的架构示意图。如图7所示,前端设备中可以包括接收模块、解封装模块、存储模块、获取模块、生成模块、地址设置模块和发送模块。Exemplarily, the solutions described in the above embodiments may be executed by a front-end device, or may be executed by a processor, a processing chip or different processing modules included in the front-end device. For example, as an example, see FIG. 7 , which is a schematic diagram of the architecture of a front-end device provided in an embodiment of the present application. As shown in FIG. 7 , the front-end device may include a receiving module, a decapsulation module, a storage module, an acquisition module, a generation module, an address setting module and a sending module.
其中,接收模块用于接收来自负载均衡器的报文,解封装模块用于采用网络隧道协议对来自负载均衡器的报文进行解封装,地址设置模块用于对解封装后的报文的MAC地址进行设置,发送模块用于将地址设置模块输出的报文发送给服务器。存储模块用于存储前端设备配置的本机IP地址(也就是来自负载均衡器的报文的目的IP地址)与服务器实际的IP地址之间的映射关系,获取模块用于根据ARP协议获取服务器的MAC地址,生成模块用于根据存储模块和获取模块的信息生成前端设备配置的本机IP地址与服务器的MAC地址之间的映射关系,并可以将生成的映射关系存储到存储模块中。Among them, the receiving module is used to receive the message from the load balancer, the decapsulation module is used to decapsulate the message from the load balancer using the network tunneling protocol, the address setting module is used to set the MAC address of the decapsulated message, and the sending module is used to send the message output by the address setting module to the server. The storage module is used to store the mapping relationship between the local IP address configured by the front-end device (that is, the destination IP address of the message from the load balancer) and the actual IP address of the server, the acquisition module is used to obtain the MAC address of the server according to the ARP protocol, and the generation module is used to generate the mapping relationship between the local IP address configured by the front-end device and the MAC address of the server according to the information of the storage module and the acquisition module, and the generated mapping relationship can be stored in the storage module.
需要说明的是,图7中示出的各个处理模块仅是对前端设备所作的一种功能性地划分,前端设备的实际结构并不限于此。It should be noted that the various processing modules shown in FIG. 7 are merely a functional division of the front-end device, and the actual structure of the front-end device is not limited thereto.
以下,结合图7所示的前端设备的架构示意图,对本申请的方案进行具体介绍。参见图8,为本申请实施例提供的一种数据传输方法的流程示意图,具体包括:The following is a detailed introduction to the solution of the present application in conjunction with the schematic diagram of the architecture of the front-end device shown in FIG7. Referring to FIG8, a flow chart of a data transmission method provided in an embodiment of the present application specifically includes:
801,接收模块接收来自负载均衡器的第一请求数据包。801. A receiving module receives a first request data packet from a load balancer.
可选地,接收模块可以对接收到的第一请求数据包进行检查,确定其目的IP地址为自身配置的多个本机IP地址中的一个。Optionally, the receiving module may check the received first request data packet to determine that the destination IP address is one of a plurality of local IP addresses configured for the receiving module.
802,解封装模块采用网络隧道协议对第一请求数据包进行解封装得到第二请求数据包。802. The decapsulation module uses a network tunneling protocol to decapsulate the first request data packet to obtain a second request data packet.
803,获取模块判断存储模块中是否存储有第一请求数据包的目的IP地址对应的MAC地址。803, the acquisition module determines whether the storage module stores the MAC address corresponding to the destination IP address of the first request data packet.
若是,则继续执行步骤807。If yes, continue to execute step 807.
若否,则继续执行步骤804。If not, continue to execute step 804.
804,获取模块根据存储模块存储的IP地址映射关系确定第一请求数据包目的IP地址对应的目标服务器的IP地址。804. The acquisition module determines the IP address of the target server corresponding to the destination IP address of the first request data packet according to the IP address mapping relationship stored in the storage module.
805,获取模块根据ARP协议确定目标服务器的IP地址对应的MAC地址。805, the acquisition module determines the MAC address corresponding to the IP address of the target server according to the ARP protocol.
806,生成模块生成第一请求数据包的目的IP地址与目标服务器的MAC地址之间的映射关系,并将生成的映射关系存储至存储模块。806. The generation module generates a mapping relationship between the destination IP address of the first request data packet and the MAC address of the target server, and stores the generated mapping relationship in the storage module.
807,地址设置模块从存储模块获取目标服务器的MAC地址。807, the address setting module obtains the MAC address of the target server from the storage module.
808,地址设置模块判断第二请求数据包的包头是否有MAC地址。808. The address setting module determines whether the header of the second request data packet has a MAC address.
若是,则继续执行步骤809。If yes, continue to execute step 809.
若否,则继续执行步骤810。If not, continue to execute step 810.
809,地址设置模块将第二请求数据包的包头中的目的MAC地址修改为目标服务器的MAC地址。809. The address setting module modifies the destination MAC address in the packet header of the second request data packet to the MAC address of the target server.
可选地,地址设置模块还可以将第二请求数据包的包头中的源MAC地址修改为前端设备的MAC地址。并继续执行步骤811。Optionally, the address setting module may also modify the source MAC address in the packet header of the second request data packet to the MAC address of the front-end device, and continue to execute step 811.
810,地址设置模块在第二请求数据包的包头中添加目标服务器的MAC地址作为目的MAC地址。810. The address setting module adds the MAC address of the target server as the destination MAC address in the packet header of the second request data packet.
可选地,地址设置模块还可以在第二请求数据包的包头中添加前端设备的MAC地址作为源MAC地址。并继续执行步骤811。Optionally, the address setting module may also add the MAC address of the front-end device as the source MAC address in the packet header of the second request data packet, and continue to execute step 811.
811,发送模块将地址设置模块输出的数据包发送给目标服务器。811, the sending module sends the data packet output by the address setting module to the target server.
基于与上述方法的同一构思,参见图9,为本申请提供的一种数据传输装置900,装置900用于执行上述方法中的各个步骤,为了避免重复,此处不再进行赘述。装置900包括:通信单元901和处理单元902。Based on the same concept as the above method, see FIG9 , which is a data transmission device 900 provided by the present application, and the device 900 is used to perform each step in the above method, and in order to avoid repetition, it will not be described here. The device 900 includes: a communication unit 901 and a processing unit 902 .
通信单元901,用于接收负载均衡器发送第一请求数据包;所述第一请求数据包为所述负载均衡器采用网络隧道协议对第二请求数据包进行封装得到的,所述第二请求数据包来自客户端;A communication unit 901 is configured to receive a first request data packet sent by a load balancer; the first request data packet is obtained by encapsulating a second request data packet by the load balancer using a network tunneling protocol, and the second request data packet comes from a client;
处理单元902,用于根据所述第一请求数据包的目的IP地址从所述多个服务器中确定目标服务器,并采用网络隧道协议将所述第一请求数据包进行解封装得到所述第二请求数据包;The processing unit 902 is configured to determine a target server from the multiple servers according to the destination IP address of the first request data packet, and to decapsulate the first request data packet using a network tunneling protocol to obtain the second request data packet;
所述处理单元902,还用于设置所述第二请求数据包的包头中的目的MAC地址为所述目标服务器的MAC地址,得到第三请求数据包;The processing unit 902 is further configured to set the destination MAC address in the packet header of the second request packet to be the MAC address of the target server, to obtain a third request packet;
所述通信单元901,还用于向所述目标服务器发送所述第三请求数据包。The communication unit 901 is further configured to send the third request data packet to the target server.
在一些实施例中,所述目标服务器为所述负载均衡器采用负载均衡算法从所述服务器集群中确定的用于接收所述第一请求数据包的服务器;所述目的IP地址为所述负载均衡器在判断所述目标服务器不支持网络隧道协议时,从存储的前端设备的多个IP地址中获取的与所述目标服务器对应的IP地址。In some embodiments, the target server is a server for receiving the first request data packet determined by the load balancer from the server cluster using a load balancing algorithm; the destination IP address is an IP address corresponding to the target server obtained from multiple IP addresses stored in a front-end device when the load balancer determines that the target server does not support a network tunneling protocol.
在一些实施例中,所述处理单元902,还用于:In some embodiments, the processing unit 902 is further configured to:
根据预先存储的IP地址映射关系,确定所述目的IP地址对应的所述目标服务器的IP地址;Determine the IP address of the target server corresponding to the destination IP address according to the pre-stored IP address mapping relationship;
采用地址解析协议确定所述目标服务器的IP地址对应的所述目标服务器的MAC地址。The address resolution protocol is used to determine the MAC address of the target server corresponding to the IP address of the target server.
在一些实施例中,所述处理单元902,还用于:In some embodiments, the processing unit 902 is further configured to:
记录所述目的IP地址与所述目标服务器的MAC地址之间的对应关系。The correspondence between the destination IP address and the MAC address of the target server is recorded.
在一些实施例中,所述处理单元902,具体用于:In some embodiments, the processing unit 902 is specifically configured to:
判断所述第二请求数据包的包头中是否包括目的MAC地址;Determine whether the packet header of the second request data packet includes a destination MAC address;
若所述第二请求数据包的包头中包括目的MAC地址,则将所述第二请求数据包的包头中的目的MAC地址修改为所述目标服务器的MAC地址;If the packet header of the second request data packet includes a destination MAC address, modifying the destination MAC address in the packet header of the second request data packet to the MAC address of the target server;
若所述第二请求数据包的包头中不包括目的MAC地址,则在所述第二请求数据包的包头中增加所述目标服务器的MAC地址作为所述第二请求数据包的目的MAC地址。If the packet header of the second request data packet does not include the destination MAC address, the MAC address of the target server is added to the packet header of the second request data packet as the destination MAC address of the second request data packet.
在一些实施例中,所述处理单元902,还用于:In some embodiments, the processing unit 902 is further configured to:
设置所述第二请求数据包的包头中的源MAC地址为所述前端设备的MAC地址。The source MAC address in the packet header of the second request data packet is set to the MAC address of the front-end device.
图10示出了本申请实施例提供的电子设备1000结构示意图。本申请实施例中的电子设备1000还可以包括通信接口1003,该通信接口1003例如是网口,电子设备可以通过该通信接口1003传输数据,例如通信接口1003可以实现上述实施例中介绍的通信单元901的功能。Fig. 10 shows a schematic diagram of the structure of an electronic device 1000 provided in an embodiment of the present application. The electronic device 1000 in the embodiment of the present application may further include a communication interface 1003, which is, for example, a network port, through which the electronic device may transmit data, for example, the communication interface 1003 may implement the functions of the communication unit 901 described in the above embodiment.
在本申请实施例中,存储器1002存储有可被至少一个控制器1001执行的指令,至少一个控制器1001通过执行存储器1002存储的指令,可以用于执行上述方法中的各个步骤,例如,控制器1001可以实现上述图9中的处理单元902的功能。In an embodiment of the present application, the memory 1002 stores instructions that can be executed by at least one controller 1001. At least one controller 1001 can be used to execute the various steps in the above method by executing the instructions stored in the memory 1002. For example, the controller 1001 can implement the function of the processing unit 902 in Figure 9 above.
其中,控制器1001是电子设备的控制中心,可以利用各种接口和线路连接整个电子设备的各个部分,通过运行或执行存储在存储器1002内的指令以及调用存储在存储器1002内的数据。可选的,控制器1001可包括一个或多个处理单元,控制器1001可集成应用控制器和调制解调控制器,其中,应用控制器主要处理操作系统和应用程序等,调制解调控制器主要处理无线通信。可以理解的是,上述调制解调控制器也可以不集成到控制器1001中。在一些实施例中,控制器1001和存储器1002可以在同一芯片上实现,在一些实施例中,它们也可以在独立的芯片上分别实现。Among them, the controller 1001 is the control center of the electronic device, which can use various interfaces and lines to connect various parts of the entire electronic device, by running or executing instructions stored in the memory 1002 and calling data stored in the memory 1002. Optionally, the controller 1001 may include one or more processing units, and the controller 1001 may integrate an application controller and a modem controller, wherein the application controller mainly processes the operating system and application programs, etc., and the modem controller mainly processes wireless communications. It is understandable that the above-mentioned modem controller may not be integrated into the controller 1001. In some embodiments, the controller 1001 and the memory 1002 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on independent chips.
控制器1001可以是通用控制器,例如中央控制器(英文:Central ProcessingUnit,简称:CPU)、数字信号控制器、专用集成电路、现场可编程门阵列或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件,可以实现或者执行本申请实施例中公开的各方法、步骤及逻辑框图。通用控制器可以是微控制器或者任何常规的控制器等。结合本申请实施例所公开的数据统计平台所执行的步骤可以直接由硬件控制器执行完成,或者用控制器中的硬件及软件模块组合执行完成。The controller 1001 may be a general controller, such as a central processing unit (CPU), a digital signal controller, an application specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, which may implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general controller may be a microcontroller or any conventional controller, etc. The steps performed by the data statistics platform disclosed in the embodiments of the present application may be performed directly by a hardware controller, or by a combination of hardware and software modules in the controller.
存储器1002作为一种非易失性计算机可读存储介质,可用于存储非易失性软件程序、非易失性计算机可执行程序以及模块。存储器1002可以包括至少一种类型的存储介质,例如可以包括闪存、硬盘、多媒体卡、卡型存储器、随机访问存储器(英文:Random AccessMemory,简称:RAM)、静态随机访问存储器(英文:Static Random Access Memory,简称:SRAM)、可编程只读存储器(英文:Programmable Read Only Memory,简称:PROM)、只读存储器(英文:Read Only Memory,简称:ROM)、带电可擦除可编程只读存储器(英文:Electrically Erasable Programmable Read-Only Memory,简称:EEPROM)、磁性存储器、磁盘、光盘等等。存储器1002是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。本申请实施例中的存储器1002还可以是电路或者其它任意能够实现存储功能的装置,用于存储程序指令和/或数据。The memory 1002 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 1002 may include at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (English: Random Access Memory, referred to as: RAM), a static random access memory (English: Static Random Access Memory, referred to as: SRAM), a programmable read-only memory (English: Programmable Read Only Memory, referred to as: PROM), a read-only memory (English: Read Only Memory, referred to as: ROM), an electrically erasable programmable read-only memory (English: Electrically Erasable Programmable Read-Only Memory, referred to as: EEPROM), a magnetic memory, a disk, an optical disk, etc. The memory 1002 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 1002 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and/or data.
通过对控制器1001进行设计编程,例如,可以将前述实施例中介绍的方法所对应的代码固化到芯片内,从而使芯片在运行时能够执行前述方法的步骤,如何对控制器1001进行设计编程为本领域技术人员所公知的技术,这里不再赘述。By designing and programming the controller 1001, for example, the code corresponding to the method introduced in the above embodiment can be solidified into the chip, so that the chip can execute the steps of the above method during operation. How to design and program the controller 1001 is a technology well known to those skilled in the art and will not be repeated here.
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
本申请是参照根据本申请的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其它可编程数据处理设备的控制器以产生一个机器,使得通过计算机或其它可编程数据处理设备的控制器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present application is described with reference to the flowchart and/or block diagram of the method, device (system), and computer program product according to the present application. It should be understood that each flow process and/or box in the flow chart and/or block diagram, as well as the combination of the flow process and/or box in the flow chart and/or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a controller of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the controller of the computer or other programmable data processing device produce a device for implementing the function specified in one flow chart or multiple flows and/or one box or multiple boxes in the block diagram.
这些计算机程序指令也可存储在能引导计算机或其它可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device that implements the functions specified in one or more processes in the flowchart and/or one or more boxes in the block diagram.
这些计算机程序指令也可装载到计算机或其它可编程数据处理设备上,使得在计算机或其它可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其它可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions may also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and/or one or more boxes in the block diagram.
尽管已描述了本申请的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例做出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本申请范围的所有变更和修改。Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310343886.9A CN118784401A (en) | 2023-04-03 | 2023-04-03 | Data transmission method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310343886.9A CN118784401A (en) | 2023-04-03 | 2023-04-03 | Data transmission method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN118784401A true CN118784401A (en) | 2024-10-15 |
Family
ID=92980935
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310343886.9A Pending CN118784401A (en) | 2023-04-03 | 2023-04-03 | Data transmission method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN118784401A (en) |
-
2023
- 2023-04-03 CN CN202310343886.9A patent/CN118784401A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111885075B (en) | Container communication method, device, network equipment and storage medium | |
US10757231B2 (en) | Providing network efficiencies in forwarding packets among provider networks and applying segment routing policies | |
CN105591971B (en) | A kind of implementation method and device of QoS | |
US20220255772A1 (en) | Packet sending method, apparatus, and system | |
WO2022001835A1 (en) | Method and apparatus for sending message, and network device, system and storage medium | |
CN110999265A (en) | Managing network connectivity between cloud computing service endpoints and virtual machines | |
CN110505244B (en) | Remote tunnel access technology gateway and server | |
US20220191138A1 (en) | Method for Making Host Network Performance Requirement Programmable, Device, and System | |
CN109547350B (en) | Route learning method and gateway equipment | |
CN107948077B (en) | Method and device for forwarding data message | |
CN109936492A (en) | A kind of methods, devices and systems by tunnel transmission message | |
CN113726915A (en) | Network system, message transmission method therein and related device | |
CN112866206A (en) | Unidirectional data transmission method and device | |
JP7448597B2 (en) | Message generation method and device and message processing method and device | |
CN106992918B (en) | Message forwarding method and device | |
CN109246016B (en) | Cross-VXLAN message processing method and device | |
WO2022111666A1 (en) | Route advertisement method, apparatus, and system | |
CN107483369B (en) | Message processing method and virtual switch | |
US12003417B2 (en) | Communication method and apparatus | |
CN111130978B (en) | Network traffic forwarding method and device, electronic equipment and machine-readable storage medium | |
WO2024001701A1 (en) | Data processing method, apparatus and system | |
CN110351394B (en) | Network data processing method and device, computer device and readable storage medium | |
CN104348821B (en) | Manage the method, apparatus and system of IPv4/IPv6 business | |
CN118784401A (en) | Data transmission method and device | |
CN115460303B (en) | A data processing method, device, terminal and storage medium |
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 |