[go: up one dir, main page]

CN112929264B - Service flow transmission method, system and network equipment - Google Patents

Service flow transmission method, system and network equipment Download PDF

Info

Publication number
CN112929264B
CN112929264B CN201911239905.3A CN201911239905A CN112929264B CN 112929264 B CN112929264 B CN 112929264B CN 201911239905 A CN201911239905 A CN 201911239905A CN 112929264 B CN112929264 B CN 112929264B
Authority
CN
China
Prior art keywords
virtual
request message
load balancer
target request
target
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.)
Expired - Fee Related
Application number
CN201911239905.3A
Other languages
Chinese (zh)
Other versions
CN112929264A (en
Inventor
谢清峰
范少卓
曹志文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xiamen Wangsu Co Ltd
Original Assignee
Xiamen Wangsu Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xiamen Wangsu Co Ltd filed Critical Xiamen Wangsu Co Ltd
Priority to CN201911239905.3A priority Critical patent/CN112929264B/en
Publication of CN112929264A publication Critical patent/CN112929264A/en
Application granted granted Critical
Publication of CN112929264B publication Critical patent/CN112929264B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/58Association of routers
    • H04L45/586Association of routers of virtual routers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering

Landscapes

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

Abstract

The embodiment of the invention provides a service flow transmission method, a service flow transmission system and network equipment, and belongs to the technical field of communication. The method comprises the following steps: the virtual router receives a target request message forwarded by the virtual switch and matches the target request message with a preset service quality rule set; the virtual router sends the target request message to a virtual load balancer according to the matching result; the virtual load balancer selects a service server for the target request message according to a pre-configured load balancing rule; and the virtual load balancer sends the target request message to the virtual switch, so that the virtual switch forwards the target request message to the selected service server for service processing. By adopting the invention, the data processing performance of the whole business service system can be improved.

Description

业务流量传输方法、系统及网络设备Service traffic transmission method, system and network equipment

技术领域technical field

本发明涉及通信技术领域,特别涉及一种业务流量传输方法、系统及网络设备。The present invention relates to the field of communication technologies, and in particular to a service flow transmission method, system and network equipment.

背景技术Background technique

为了提高业务服务器对请求报文的处理能力以及避免业务服务器单点故障导致业务服务中断的问题,可以将多台业务服务器(Real Server,RS)通过网络互连形成一个业务服务器集群来共同提供业务服务。此时,需要在客户端和RS集群之间部署负载均衡节点。负载均衡节点与业务服务器集群组成一个业务服务系统来对外提供业务服务。具体的,负载均衡节点用于接收各个客户端发出的请求报文,并且将这些请求报文分发到业务服务器集群内的多台业务服务器上进行业务处理。其中,可以采用基于DPDK(Data PlaneDevelopment Kit,数据平面开发套件)的DPVS(DPDK-LVS)技术来搭建高性能的负载均衡节点。In order to improve the business server's ability to process request messages and avoid the problem of business service interruption caused by a single point of failure of the business server, multiple business servers (Real Server, RS) can be interconnected through the network to form a business server cluster to jointly provide services Serve. At this point, load balancing nodes need to be deployed between the client and the RS cluster. The load balancing node and the business server cluster form a business service system to provide business services externally. Specifically, the load balancing node is used for receiving request messages sent by various clients, and distributing these request messages to multiple service servers in the service server cluster for service processing. Among them, DPVS (DPDK-LVS) technology based on DPDK (Data Plane Development Kit, data plane development kit) can be used to build high-performance load balancing nodes.

然而,现有技术提供的DPVS不能对流量进行服务质量控制。随着业务流量不断增长,DPVS提供的流量控制功能(例如流量整形(Traffic Shaping))已无法满足不断提高的网络服务质量要求。如图1所示,为保证服务质量,可以在负载均衡节点上部署虚拟交换机和虚拟路由器对业务流量进行控制管理。However, the DPVS provided by the prior art cannot perform QoS control on traffic. With the continuous growth of business traffic, the traffic control functions provided by DPVS (such as traffic shaping (Traffic Shaping)) can no longer meet the continuously improving network service quality requirements. As shown in Figure 1, in order to ensure the quality of service, virtual switches and virtual routers can be deployed on load balancing nodes to control and manage service traffic.

本专利申请的发明人,通过研究业务流量的处理过程,发现现有技术至少存在以下问题:如图2所示,不仅负载均衡节点与客户端或者业务服务器之间需要通过虚拟交换机进行数据交互,而且负载均衡节点上的虚拟路由器和虚拟负载均衡器之间也需要通过虚拟交换机进行数据交互。在处理大规模的业务流量时,虚拟交换机负载较重,导致负载均衡节点内部的业务流量传输效率不高,进而使得整个业务服务系统的数据处理性能低下。The inventor of this patent application, by studying the processing process of business traffic, found that the existing technology has at least the following problems: as shown in Figure 2, not only the data exchange between the load balancing node and the client or business server needs to be performed through a virtual switch, Moreover, the virtual router on the load balancing node and the virtual load balancer also need to exchange data through the virtual switch. When processing large-scale business traffic, the load of the virtual switch is heavy, resulting in low efficiency of business traffic transmission inside the load balancing node, which in turn makes the data processing performance of the entire business service system low.

发明内容SUMMARY OF THE INVENTION

本申请的目的在于提供一种业务流量传输方法、系统、网络设备及计算机可读存储介质,以解决现有技术存在的部分或全部问题。技术方案如下:The purpose of the present application is to provide a service flow transmission method, system, network device and computer-readable storage medium, so as to solve some or all of the problems existing in the prior art. The technical solution is as follows:

第一方面,提供了一种业务流量传输方法,所述业务流量传输方法包括:In a first aspect, a service flow transmission method is provided, and the service flow transmission method includes:

虚拟路由器接收虚拟交换机转发的目标请求报文,并将所述目标请求报文与预先配置的服务质量规则集合进行匹配;The virtual router receives the target request packet forwarded by the virtual switch, and matches the target request packet with a pre-configured QoS rule set;

所述虚拟路由器根据匹配结果将所述目标请求报文发送至虚拟负载均衡器,以使所述虚拟负载均衡器对所述目标请求报文进行负载均衡处理。The virtual router sends the target request packet to the virtual load balancer according to the matching result, so that the virtual load balancer performs load balancing processing on the target request packet.

本实施例中,虚拟路由器将接收到的请求报文发送给虚拟负载均衡器,与现有技术相比,请求报文不经过虚拟交换机的转发,减少了请求报文在负载均衡节点内部的转发次数,一方面减轻了虚拟交换机的负载,另一方面提高了请求报文的传输效率。可以理解,在同等硬件配置下,本发明相较于现有技术能够更多更快地处理请求报文,加快业务响应速度。并且,虚拟路由器基于服务质量规则集合对接收到的请求报文进行服务质量控制,完善了负载均衡节点针对上行流量的服务质量功能。可见,本发明提升了整个业务服务系统的数据处理性能。In this embodiment, the virtual router sends the received request message to the virtual load balancer. Compared with the prior art, the request message is not forwarded by the virtual switch, which reduces the forwarding of the request message inside the load balancing node. On the one hand, the load on the virtual switch is reduced, and on the other hand, the transmission efficiency of the request message is improved. It can be understood that, under the same hardware configuration, the present invention can process more and faster request messages and speed up service response compared with the prior art. Moreover, the virtual router controls the quality of service of the received request message based on the set of quality of service rules, which improves the quality of service function of the load balancing node for uplink traffic. It can be seen that the present invention improves the data processing performance of the entire business service system.

可选的,在所述虚拟路由器将所述目标请求报文发送至所述虚拟负载均衡器之前,所述业务流量传输方法还包括:Optionally, before the virtual router sends the target request packet to the virtual load balancer, the service traffic transmission method further includes:

所述虚拟路由器通过virtio_user端口与所述虚拟负载均衡器的vhost_user端口建立通信连接。The virtual router establishes a communication connection with the vhost_user port of the virtual load balancer through the virtio_user port.

本实施例中,virtio_user端口与vhost_user端口基于共享内存收发包,可以提高虚拟路由器与虚拟负载均衡器之间的数据传递效率。In this embodiment, the virtio_user port and the vhost_user port send and receive packets based on the shared memory, which can improve the efficiency of data transfer between the virtual router and the virtual load balancer.

进一步的,所述虚拟路由器根据匹配结果将所述目标请求报文发送至所述虚拟负载均衡器,具体包括:Further, the virtual router sends the target request packet to the virtual load balancer according to the matching result, specifically including:

若预先配置的服务质量规则集合中不存在与所述目标请求报文相匹配的服务质量规则,则所述虚拟路由器将所述目标请求报文发送至所述虚拟负载均衡器;If there is no quality of service rule matching the target request packet in the preconfigured set of quality of service rules, the virtual router sends the target request packet to the virtual load balancer;

否则,所述虚拟路由器对所述目标请求报文执行匹配出的服务质量规则所规定的操作方法,如果需要,则将所述目标请求报文发送至所述虚拟负载均衡器。Otherwise, the virtual router executes the operation method specified in the matched QoS rule on the target request message, and sends the target request message to the virtual load balancer if necessary.

可选的,所述业务流量传输方法还包括:Optionally, the service flow transmission method further includes:

所述虚拟路由器接收所述虚拟负载均衡器转发的目标响应报文,并将所述目标响应报文与所述服务质量规则集合进行匹配;The virtual router receives the target response message forwarded by the virtual load balancer, and matches the target response message with the quality of service rule set;

所述虚拟路由器根据匹配结果将所述目标响应报文发送至所述虚拟交换机,以使所述虚拟交换机将所述目标响应报文发送给客户端。The virtual router sends the target response packet to the virtual switch according to the matching result, so that the virtual switch sends the target response packet to the client.

本实施例中,虚拟路由器接收虚拟负载均衡器发送的响应报文,与现有技术相比,响应报文不经过虚拟交换机的转发,减少了响应报文在负载均衡节点内部的转发次数,一方面减轻了虚拟交换机的负载,另一方面提高了响应报文的传输效率。可以理解,在同等硬件配置下,本发明相较于现有技术能够更多更快地处理响应报文,加快业务响应速度。并且,虚拟路由器基于服务质量规则集合对接收到的响应报文进行服务质量控制,完善了负载均衡节点针对下行流量的服务质量功能。可见,本发明可以提升整个业务服务系统的数据处理性能。In this embodiment, the virtual router receives the response message sent by the virtual load balancer. Compared with the prior art, the response message is not forwarded by the virtual switch, which reduces the number of times the response message is forwarded inside the load balancing node. On the one hand, the load of the virtual switch is reduced, and on the other hand, the transmission efficiency of the response message is improved. It can be understood that, under the same hardware configuration, compared with the prior art, the present invention can process more and faster response messages and speed up service response. Moreover, the virtual router controls the quality of service of the received response message based on the set of quality of service rules, which improves the quality of service function of the load balancing node for downlink traffic. It can be seen that the present invention can improve the data processing performance of the entire business service system.

第二方面,提供了一种业务流量传输方法,所述业务流量传输方法包括:In a second aspect, a service flow transmission method is provided, and the service flow transmission method includes:

虚拟负载均衡器接收虚拟路由器转发的目标请求报文,并根据预先配置的负载均衡规则为所述目标请求报文选择业务服务器;The virtual load balancer receives the target request message forwarded by the virtual router, and selects a service server for the target request message according to a pre-configured load balancing rule;

所述虚拟负载均衡器将所述目标请求报文发送至虚拟交换机,以使所述虚拟交换机将所述目标请求报文转发至被选中的所述业务服务器进行业务处理。The virtual load balancer sends the target request message to the virtual switch, so that the virtual switch forwards the target request message to the selected service server for service processing.

本实施例中,虚拟负载均衡器接收虚拟路由器发送的请求报文,与现有技术相比,请求报文不经过虚拟交换机的转发,减少了请求报文在负载均衡节点内部的转发次数,一方面减轻了虚拟交换机的负载,另一方面提高了请求报文的传输效率。可以理解,在同等硬件配置下,本发明相较于现有技术能够更多更快地处理请求报文,提升了整个业务服务系统的数据处理性能。In this embodiment, the virtual load balancer receives the request message sent by the virtual router. Compared with the prior art, the request message is not forwarded by the virtual switch, which reduces the number of times the request message is forwarded inside the load balancing node. On the one hand, the load of the virtual switch is reduced, and on the other hand, the transmission efficiency of the request message is improved. It can be understood that, under the same hardware configuration, the present invention can process more and faster request messages compared with the prior art, and improves the data processing performance of the entire business service system.

可选的,在所述虚拟负载均衡器接收虚拟路由器转发的目标请求报文之前,所述业务流量传输方法还包括:Optionally, before the virtual load balancer receives the target request packet forwarded by the virtual router, the service traffic transmission method further includes:

所述虚拟负载均衡器通过vhost_user端口与所述虚拟路由器的virtio_user端口建立通信连接。The virtual load balancer establishes a communication connection with the virtio_user port of the virtual router through the vhost_user port.

本实施例中,vhost_user端口与virtio_user端口基于共享内存收发包,可以提高虚拟路由器与虚拟负载均衡器之间的数据传递效率。In this embodiment, the vhost_user port and the virtio_user port send and receive packets based on the shared memory, which can improve the efficiency of data transfer between the virtual router and the virtual load balancer.

可选的,所述业务流量传输方法还包括:Optionally, the service flow transmission method further includes:

所述虚拟负载均衡器接收虚拟交换机转发的目标响应报文,并将所述目标响应报文发送至所述虚拟路由器,以使所述虚拟路由器根据所述服务质量规则集合处理所述目标响应报文。The virtual load balancer receives the target response message forwarded by the virtual switch, and sends the target response message to the virtual router, so that the virtual router processes the target response message according to the quality of service rule set arts.

本实施例中,虚拟负载均衡器对接收到的响应报文进行相关处理后,将响应报文发送给虚拟路由器进行控制管理,与现有技术相比,响应报文不经过虚拟交换机的转发,减少了响应报文在负载均衡节点内部的转发次数,一方面减轻了虚拟交换机的负载,另一方面提高了响应报文的传输效率。可以理解,在同等硬件配置下,本发明相较于现有技术能够更多更快地处理响应报文,加快业务响应速度。同时,虚拟负载均衡器本身不具备服务质量功能,在负载均衡节点部署虚拟路由器后,虚拟路由器基于服务质量规则集合对接收到的响应报文进行服务质量控制,完善了负载均衡节点针对下行流量的服务质量功能。可见,本发明可以提升整个业务服务系统的数据处理性能。In this embodiment, after the virtual load balancer performs relevant processing on the received response message, it sends the response message to the virtual router for control and management. Compared with the prior art, the response message is not forwarded by the virtual switch. The number of forwarding times of the response message inside the load balancing node is reduced, on the one hand, the load of the virtual switch is reduced, and on the other hand, the transmission efficiency of the response message is improved. It can be understood that, under the same hardware configuration, compared with the prior art, the present invention can process more and faster response messages and speed up service response. At the same time, the virtual load balancer itself does not have a quality of service function. After the virtual router is deployed on the load balancing node, the virtual router controls the quality of service of the received response message based on the set of quality of service rules, which improves the load balancing node's control of downlink traffic. Quality of service function. It can be seen that the present invention can improve the data processing performance of the entire business service system.

第三方面,提供了一种业务流量传输系统,包括虚拟交换机、虚拟路由器和虚拟负载均衡器,In the third aspect, a service traffic transmission system is provided, including a virtual switch, a virtual router and a virtual load balancer,

所述虚拟路由器,用于接收所述虚拟交换机转发的目标请求报文,并将所述目标请求报文与预先配置的服务质量规则集合进行匹配;The virtual router is configured to receive the target request message forwarded by the virtual switch, and match the target request message with a pre-configured quality of service rule set;

所述虚拟路由器,还用于根据匹配结果将所述目标请求报文发送至所述虚拟负载均衡器;The virtual router is further configured to send the target request packet to the virtual load balancer according to the matching result;

所述虚拟负载均衡器,用于根据预先配置的负载均衡规则为所述目标请求报文选择业务服务器;The virtual load balancer is configured to select a service server for the target request message according to a pre-configured load balancing rule;

所述虚拟负载均衡器,还用于将所述目标请求报文发送至所述虚拟交换机,以使所述虚拟交换机将所述目标请求报文转发至被选中的所述业务服务器进行业务处理。The virtual load balancer is further configured to send the target request message to the virtual switch, so that the virtual switch forwards the target request message to the selected service server for service processing.

可选的,所述虚拟路由器还用于:Optionally, the virtual router is also used for:

通过virtio_user端口与所述虚拟负载均衡器的vhost_user端口建立通信连接。Establish a communication connection with the vhost_user port of the virtual load balancer through the virtio_user port.

进一步的,所述虚拟路由器具体用于:Further, the virtual router is specifically used for:

若预先配置的服务质量规则集合中不存在与所述目标请求报文相匹配的服务质量规则,则将所述目标请求报文发送至所述虚拟负载均衡器;If there is no quality of service rule matching the target request packet in the preconfigured set of quality of service rules, sending the target request packet to the virtual load balancer;

否则,对所述目标请求报文执行匹配出的服务质量规则所规定的操作方法,如果需要,则将所述目标请求报文发送至所述虚拟负载均衡器。Otherwise, execute the operation method specified by the matched QoS rule on the target request message, and send the target request message to the virtual load balancer if necessary.

可选的,所述虚拟负载均衡器还用于:Optionally, the virtual load balancer is also used for:

接收所述虚拟交换机转发的目标响应报文,并将所述目标响应报文发送至所述虚拟路由器,以使所述虚拟路由器根据所述服务质量规则集合处理所述目标响应报文。receiving the target response message forwarded by the virtual switch, and sending the target response message to the virtual router, so that the virtual router processes the target response message according to the set of quality of service rules.

可选的,所述虚拟路由器还用于:Optionally, the virtual router is also used for:

接收所述虚拟负载均衡器转发的目标响应报文,并将所述目标响应报文与所述服务质量规则集合进行匹配;receiving a target response message forwarded by the virtual load balancer, and matching the target response message with the set of quality of service rules;

根据匹配结果将所述目标响应报文发送至所述虚拟交换机,以使所述虚拟交换机将所述目标响应报文发送给客户端。Sending the target response message to the virtual switch according to the matching result, so that the virtual switch sends the target response message to the client.

第四方面,提供了一种网络设备,所述网络设备包括处理器和存储器,所述存储器中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集由所述处理器加载并执行,以实现如第一方面所述的方法中虚拟路由设备的处理,或者实现如第二方面所述的方法中虚拟负载均衡设备的处理。In a fourth aspect, a network device is provided. The network device includes a processor and a memory, and the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least A section of program, the code set or instruction set is loaded and executed by the processor, so as to realize the processing of the virtual routing device in the method as described in the first aspect, or realize the virtual load balancing in the method as described in the second aspect Disposal of equipment.

第五方面,提供了一种计算机可读存储介质,所述存储介质中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集由处理器加载并执行,以实现如第一方面所述的方法中虚拟路由设备的处理,或者实现如第二方面所述的方法中虚拟负载均衡设备的处理。In a fifth aspect, a computer-readable storage medium is provided, wherein at least one instruction, at least one program, code set or instruction set is stored in the storage medium, and the at least one instruction, the at least one program, the code The set or instruction set is loaded and executed by the processor, so as to realize the processing of the virtual routing device in the method described in the first aspect, or realize the processing of the virtual load balancing device in the method described in the second aspect.

综上所述,本发明实施例提供的技术方案带来的有益效果是:In summary, the beneficial effects brought by the technical solutions provided by the embodiments of the present invention are:

虚拟路由器与虚拟负载均衡器之间的业务流量不必依赖虚拟交换机转发,虚拟路由器与虚拟负载均衡器可以直接进行数据交互。本发明减少了业务数据在负载均衡节点内部的转发次数,进而减轻了虚拟交换机的负载以及提高了业务数据的传输效率。同时,虚拟负载均衡器DPVS本身不具备服务质量功能,在负载均衡节点部署虚拟路由器后,虚拟路由器基于服务质量规则集合对接收到的业务数据进行服务质量控制,完善了负载均衡节点的服务质量功能。可见,本发明可以提升整个业务服务系统的数据处理性能。The business traffic between the virtual router and the virtual load balancer does not need to rely on the virtual switch to forward, and the virtual router and the virtual load balancer can directly exchange data. The invention reduces the forwarding times of service data inside the load balancing node, further reduces the load of the virtual switch and improves the transmission efficiency of service data. At the same time, the virtual load balancer DPVS itself does not have a quality of service function. After the virtual router is deployed on the load balancing node, the virtual router controls the service quality of the received business data based on the quality of service rule set, which improves the quality of service function of the load balancing node. . It can be seen that the present invention can improve the data processing performance of the entire business service system.

附图说明Description of drawings

为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions in the embodiments of the present invention more clearly, the following briefly introduces the accompanying drawings used in the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained from these drawings without creative effort.

图1为现有技术提供的一种负载均衡节点的结构示意图;FIG. 1 is a schematic structural diagram of a load balancing node provided by the prior art;

图2为现有技术提供的一种处理业务流量的时序图;FIG. 2 is a sequence diagram of processing service traffic provided by the prior art;

图3为本发明实施例提供的一种负载均衡节点的结构示意图;FIG. 3 is a schematic structural diagram of a load balancing node provided by an embodiment of the present invention;

图4为本发明实施例提供的一种处理业务流量的时序图;FIG. 4 is a sequence diagram of processing service traffic provided by an embodiment of the present invention;

图5为本发明实施例提供的一种请求报文传输方法的流程图;FIG. 5 is a flow chart of a request message transmission method provided by an embodiment of the present invention;

图6为本发明实施例提供的一种响应报文传输方法的流程图。FIG. 6 is a flow chart of a response message transmission method provided by an embodiment of the present invention.

具体实施方式Detailed ways

为使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明实施方式作进一步地详细描述。In order to make the object, technical solution and advantages of the present invention clearer, the implementation manner of the present invention will be further described in detail below in conjunction with the accompanying drawings.

本发明提供了一种业务流量传输方法,业务流量包括由客户端(Client)发起的请求报文和由业务服务器(RS)回复的响应报文。其中,客户端是相对于业务服务系统而言的,客户端可以是发起请求报文的任意网络设备,例如用户的终端设备或者代理服务器等。该业务流量传输方法可以应用于业务流量传输系统,业务流量传输系统具体可以是如图3所示的负载均衡节点。负载均衡节点可以通过在单台物理服务器或者分布式计算环境中部署虚拟交换机、虚拟路由器以及虚拟负载均衡器来搭建,进而对请求报文进行分发处理,实现多个业务服务器的负载均衡。由于虚拟交换机可以连接虚拟路由器和虚拟负载均衡器,还可以通过物理网卡连接到可通信的网络,因此,负载均衡节点可通过虚拟交换机连接到互联网,同客户端以及业务服务器进行数据交互,以及可通过虚拟交换机将业务流量在负载均衡节点上的虚拟路由器和虚拟负载均衡器之间传递。本发明将以虚拟交换机为OVS(OpenVSwitch)、虚拟路由器为Vroute(Virtual Router)、虚拟负载均衡器为DPVS为例进行详细说明。其中,虚拟交换机也可以是VMware vSphere虚拟交换机等,本发明对此不作限制。The invention provides a service flow transmission method. The service flow includes a request message initiated by a client (Client) and a response message replied by a service server (RS). Wherein, the client is relative to the business service system, and the client may be any network device that initiates a request message, such as a user's terminal device or a proxy server. The service traffic transmission method may be applied to a service traffic transmission system, and the service traffic transmission system may specifically be a load balancing node as shown in FIG. 3 . Load balancing nodes can be built by deploying virtual switches, virtual routers, and virtual load balancers in a single physical server or in a distributed computing environment, and then distribute and process request packets to achieve load balancing among multiple business servers. Since the virtual switch can be connected to the virtual router and the virtual load balancer, and can also be connected to a communicable network through the physical network card, the load balancing node can be connected to the Internet through the virtual switch to perform data interaction with the client and the business server, and can The business traffic is passed between the virtual router on the load balancing node and the virtual load balancer through the virtual switch. The present invention will be described in detail by taking the virtual switch as OVS (OpenVSwitch), the virtual router as Vroute (Virtual Router), and the virtual load balancer as DPVS as examples. Wherein, the virtual switch may also be a VMware vSphere virtual switch, etc., which is not limited in the present invention.

参考图4,本发明提供的虚拟路由器与虚拟负载均衡器之间的业务流量不必通过虚拟交换机转发。这样,可以减少经过虚拟交换机的业务流量,提升系统数据处理性能。在实施中,可以对Vroute以及DPVS进行改造,使得Vroute与DPVS之间可以直接对接,进而进行数据交互。例如,DPVS可以在启动时通过创建virtio_user端口与OVS建立通信连接,通过创建vhost_user端口与Vroute建立通信连接。Vroute可以在启动时通过创建两个virtio_user端口分别于OVS和DPVS建立通信连接。虚拟交换机OVS可以在启动时通过创建两个vhost_user端口分别与DPVS和Vroute建立通信连接。其中,创建vhost_user端口的一方可以为其创建的各个vhost_user端口分别指定一个FD(File Descriptor,文件描述符)文件,而创建virtio_user端口的一方可以使用vhost_user端口对应的FD文件。这样,根据FD文件便可建立virtio_user端口与vhost_user端口的对应关系,使得OVS与Vroute、Vroute与DPVS、以及DPVS与OVS可通过相互对应的virtio_user端口与vhost_user端口进行数据交互。此外,virtio_user端口与vhost_user端口基于共享内存进行数据交互,能够提高数据传递效率。Referring to FIG. 4 , the service flow between the virtual router and the virtual load balancer provided by the present invention does not need to be forwarded through the virtual switch. In this way, the service traffic passing through the virtual switch can be reduced, and the data processing performance of the system can be improved. In the implementation, the Vroute and the DPVS can be transformed, so that the Vroute and the DPVS can be directly connected, and then data exchange can be performed. For example, DPVS can establish a communication connection with OVS by creating a virtio_user port at startup, and establish a communication connection with Vroute by creating a vhost_user port. Vroute can establish communication connections with OVS and DPVS by creating two virtio_user ports at startup. The virtual switch OVS can establish communication connections with DPVS and Vroute by creating two vhost_user ports at startup. Wherein, the party that creates the vhost_user port can designate an FD (File Descriptor, file descriptor) file for each vhost_user port it creates, and the party that creates the virtio_user port can use the FD file corresponding to the vhost_user port. In this way, the corresponding relationship between the virtio_user port and the vhost_user port can be established according to the FD file, so that OVS and Vroute, Vroute and DPVS, and DPVS and OVS can exchange data through the corresponding virtio_user port and vhost_user port. In addition, the virtio_user port and the vhost_user port perform data interaction based on shared memory, which can improve the efficiency of data transfer.

举例来说,Vroute与DPVS建立起通信连接的过程大致如下:DPVS在创建vhost_user端口时生成一个FD文件,并为该vhost_user端口指定一个端口名称,该vhost_user端口的端口名称可以是vhost_user2,并且以及生成与vhost_user2对应的FD文件。Vroute向DPVS发起连接时指定端口名称vhost_user2,并使用vhost_user2对应的FD文件来创建一个virtio_user端口,该virtio_user端口的端口名称可以是virtio_user2。这样,可以通过FD文件将virtio_user2和vhost_user2关联起来,Vroute与DPVS之间便可通过virtio_user2和vhost_user2建立起通信连接,进而进行数据交互。此外,如图3所示,virtio_user1和vhost_user1相关联,virtio_user3和vhost_user3相关联。Vroute与OVS建立起通信连接的过程、DPVS与OVS建立起通信连接的过程类似,本发明对此不作赘述。For example, the process of establishing a communication connection between Vroute and DPVS is roughly as follows: DPVS generates an FD file when creating a vhost_user port, and specifies a port name for the vhost_user port. The port name of the vhost_user port can be vhost_user2, and generates FD file corresponding to vhost_user2. Vroute specifies the port name vhost_user2 when initiating a connection to DPVS, and uses the FD file corresponding to vhost_user2 to create a virtio_user port. The port name of the virtio_user port can be virtio_user2. In this way, virtio_user2 and vhost_user2 can be associated through the FD file, and a communication connection can be established between Vroute and DPVS through virtio_user2 and vhost_user2 to perform data interaction. In addition, as shown in Figure 3, virtio_user1 is associated with vhost_user1, and virtio_user3 is associated with vhost_user3. The process of establishing a communication connection between Vroute and OVS, and the process of establishing a communication connection between DPVS and OVS are similar, and the present invention will not repeat them here.

下面将结合具体实施方式,对图5所示的处理流程进行详细的说明,内容可以如下:The processing flow shown in FIG. 5 will be described in detail below in conjunction with the specific implementation manner, and the content may be as follows:

步骤501,虚拟路由器接收虚拟交换机转发的目标请求报文,并将目标请求报文与预先配置的服务质量规则集合进行匹配。Step 501, the virtual router receives the target request packet forwarded by the virtual switch, and matches the target request packet with a pre-configured QoS rule set.

在实施中,OVS可以通过物理网卡连接到互联网,进而从互联网接收各个客户端发出的请求报文。为了便于描述,可以将任意一个请求报文称作目标请求报文。OVS在获取到目标请求报文后,可以根据预先配置的流表将目标请求报文转发给Vroute。Vroute上预先配置有用于对业务流量进行控制管理的服务质量规则集合。在接收到目标请求报文之后,Vroute将目标请求报文与服务质量规则集合中的各条服务质量规则进行匹配,然后根据匹配结果对目标请求报文进行相应的处理。可以理解,如果目标请求报文满足某条服务质量规则的报文匹配条件,则目标请求报文与该服务质量规则相匹配;如果目标请求报文不满足某条服务质量规则的报文匹配条件,则目标请求报文与该服务质量规则不匹配。In implementation, OVS can be connected to the Internet through a physical network card, and then receive request messages from each client from the Internet. For ease of description, any request packet may be referred to as a target request packet. After OVS obtains the target request message, it can forward the target request message to Vroute according to the pre-configured flow table. The Vroute is pre-configured with a set of service quality rules for controlling and managing service traffic. After receiving the target request packet, Vroute matches the target request packet with each QoS rule in the QoS rule set, and then processes the target request packet accordingly according to the matching result. It can be understood that if the target request packet satisfies the packet matching condition of a certain quality of service rule, the target request packet matches the quality of service rule; if the target request packet does not meet the packet matching condition of a certain quality of service rule , the target request packet does not match the QoS rule.

可选的,Vroute上设置的服务质量规则集合可以包括ACL(Access Control List,访问控制列表)、QoS(Quality of Service,服务质量)策略等。通常来说,ACL和QoS策略的报文匹配条件均可根据报文的五元组信息中的一种或多种信息来设置。五元组信息包括源IP地址、源端口号、目的IP地址、目的端口号和传输层协议类型。当然,除了五元组信息,报文匹配条件还可以包括其他信息,例如服务类型,本发明对此不作限制。Optionally, the set of quality of service rules set on the Vroute may include ACL (Access Control List, access control list), QoS (Quality of Service, quality of service) policies, and the like. Generally speaking, the packet matching conditions of the ACL and the QoS policy can be set according to one or more types of information in the 5-tuple information of the packet. The five-tuple information includes source IP address, source port number, destination IP address, destination port number and transport layer protocol type. Of course, in addition to the quintuple information, the message matching condition may also include other information, such as service type, which is not limited in the present invention.

进一步而言,一个ACL中可以包括多条ACL规则,不同ACL规则可以设置有不同的报文匹配条件。例如,ACL中某条规则的报文匹配条件可以是源IP地址和目的端口号的组合,而另一条规则的报文匹配条件可以是源IP地址、源端口号、目的IP地址和目的端口号的组合。Vroute基于匹配出的ACL规则对目标请求报文执行相应的操作。同样的,一个QoS策略可以包括多条QoS规则,不同QoS规则也可以设置有不同的报文匹配条件。Vroute基于匹配出的QoS规则对目标请求报文执行相应的操作。例如,匹配出的QoS规则可以是给目标请求报文添加DSCP(Differentiated Services Code Point,差分服务代码点)值,使得后续处理可以根据DSCP值来确定目标请求报文的优先级。Furthermore, one ACL may include multiple ACL rules, and different ACL rules may be set with different packet matching conditions. For example, the packet matching condition of a rule in an ACL can be the combination of source IP address and destination port number, while the packet matching condition of another rule can be the source IP address, source port number, destination IP address, and destination port number The combination. Vroute performs corresponding operations on the target request packets based on the matched ACL rules. Similarly, a QoS policy can include multiple QoS rules, and different QoS rules can also be set with different packet matching conditions. Vroute performs corresponding operations on the target request packets based on the matched QoS rules. For example, the matched QoS rule may be to add a DSCP (Differentiated Services Code Point, Differentiated Services Code Point) value to the target request message, so that subsequent processing can determine the priority of the target request message according to the DSCP value.

步骤502,虚拟路由器根据匹配结果将目标请求报文发送至虚拟负载均衡器。Step 502, the virtual router sends the target request packet to the virtual load balancer according to the matching result.

在实施中,Vroute会将接收到的目标请求报文与预先配置的服务质量规则集合中的各条服务质量规则进行匹配。匹配结果可以包括服务质量规则集合中存在与目标请求报文相匹配的服务质量规则、以及服务质量规则集合中不存在与目标请求报文相匹配的服务质量规则。During implementation, Vroute will match the received target request message with each QoS rule in the pre-configured QoS rule set. The matching result may include that there is a QoS rule matching the target request packet in the QoS rule set, and there is no QoS rule matching the target request packet in the QoS rule set.

值得一提的是,由于服务质量规则集合中各条服务质量规则的报文匹配条件可以相同也可以不同,导致这些服务质量规则之间可能存在重复或者矛盾的地方。因此,在将目标请求报文与服务质量规则集合中的各条服务质量规则进行匹配时,可以按照一定的匹配顺序来确定各条服务质量规则的优先级,一旦匹配上某条服务质量规则可以不再继续匹配下去。It is worth mentioning that since the packet matching conditions of each QoS rule in the QoS rule set may be the same or different, there may be duplication or contradiction between these QoS rules. Therefore, when matching the target request message with each QoS rule in the QoS rule set, the priority of each QoS rule can be determined according to a certain matching sequence. Once a certain QoS rule is matched, it can be Do not continue to match.

进一步而言,步骤502的具体处理流程可以如下:若预先配置的服务质量规则集合中不存在与目标请求报文相匹配的服务质量规则,则虚拟路由器将目标请求报文发送至虚拟负载均衡器;否则,虚拟路由器对目标请求报文执行匹配出的服务质量规则所规定的操作方法,如果需要,则将目标请求报文发送至虚拟负载均衡器。Further, the specific processing flow of step 502 may be as follows: if there is no QoS rule matching the target request packet in the pre-configured QoS rule set, the virtual router sends the target request packet to the virtual load balancer ; Otherwise, the virtual router executes the operation method specified by the matched QoS rule on the target request message, and sends the target request message to the virtual load balancer if necessary.

在实施中,如果Vroute为目标请求报文匹配到任意一条或多条服务质量规则,Vroute则对目标请求报文执行匹配到的服务质量规则所规定的操作方法,如果需要,则将目标请求报文发送给DPVS进行后续处理。反之,如果服务质量规则集合中的所有服务质量规则均与目标请求报文不匹配,则Vroute不必对目标请求报文进行控制管理,直接将目标请求报文发送给DPVS进行后续处理。In implementation, if Vroute matches any one or more quality of service rules for the target request message, Vroute then performs the operation method specified by the matched quality of service rule for the target request message, and if necessary, reports the target request The file is sent to DPVS for subsequent processing. Conversely, if all the QoS rules in the QoS rule set do not match the target request message, Vroute does not need to control and manage the target request message, and directly sends the target request message to the DPVS for subsequent processing.

值得一提的是,服务质量规则所规定的操作方法可以包括转发、丢弃、改变报文优先级后转发等等。其中,如果匹配到的服务质量规则所规定的操作方法为丢弃,则可以认为不需要Vroute将目标请求报文发送给DPVS进行后续处理,Vroute将主动丢弃目标请求报文。It is worth mentioning that the operation method stipulated by the quality of service rule may include forwarding, discarding, forwarding after changing the priority of the message, and so on. Wherein, if the operation method specified by the matched QoS rule is discard, it can be considered that Vroute does not need to send the target request packet to the DPVS for subsequent processing, and Vroute will actively discard the target request packet.

步骤503,虚拟负载均衡器根据预先配置的负载均衡规则为目标请求报文选择业务服务器。Step 503, the virtual load balancer selects a service server for the target request message according to the pre-configured load balancing rules.

在实施中,为了能使负载均衡节点将业务流量均匀地分散到后端的多个业务服务器上,从而提供大规模的业务服务,需要在DPVS上配置负载均衡规则。在接收到Vroute发送的目标请求报文后,DPVS根据预先配置的负载均衡规则为目标请求报文从后端的多个业务服务器中选择一个业务服务器(可称作目标业务服务器),目标业务服务器可以独立地对目标请求报文进行响应。其中,负载均衡规则可以是轮询(Round-Robin)、加权轮询(WeightedRound-Robin)、最少连接(Least-Connection)等规则中的任意一种,本发明对此不作限制。In the implementation, in order to enable the load balancing node to evenly distribute the business traffic to multiple business servers at the back end, thereby providing large-scale business services, it is necessary to configure load balancing rules on the DPVS. After receiving the target request message sent by Vroute, DPVS selects a service server (which can be called a target service server) from multiple service servers at the back end for the target request message according to the pre-configured load balancing rules, and the target service server can be Independently respond to the target request message. Wherein, the load balancing rule may be any one of round-robin (Round-Robin), weighted round-robin (WeightedRound-Robin), least connection (Least-Connection) and other rules, which is not limited in the present invention.

当然,在一个实施例中,DPVS在接收到目标请求报文后,还可以根据DPVS自身支持的流量控制策略进一步对目标请求报文进行控制管理。Certainly, in an embodiment, after receiving the target request message, the DPVS may further control and manage the target request message according to the flow control strategy supported by the DPVS itself.

步骤504,虚拟负载均衡器将目标请求报文发送至虚拟交换机,以使虚拟交换机将目标请求报文转发至被选中的业务服务器进行业务处理。Step 504, the virtual load balancer sends the target request message to the virtual switch, so that the virtual switch forwards the target request message to the selected service server for service processing.

在实施中,负载均衡节点需要通过OVS连接到互联网,进而基于互联网与目标业务服务器进行数据交互。因此,DPVS为目标请求报文选择目标业务服务器后,可以将目标请求报文发送给OVS。之后,负载均衡节点通过OVS将目标请求报文发送给目标业务服务器进行业务处理。In the implementation, the load balancing node needs to be connected to the Internet through OVS, and then perform data interaction with the target business server based on the Internet. Therefore, after the DPVS selects the target service server for the target request message, it can send the target request message to the OVS. Afterwards, the load balancing node sends the target request message to the target service server through the OVS for business processing.

在一个实施例中,目标业务服务器对目标请求报文进行业务处理之后,可以直接将与目标请求报文对应的响应报文(可称作目标响应报文)发送给客户端。例如,当DPVS采用DR(Direct Routing,直接路由)模式时,目标请求报文在经过负载均衡节点处理后,源IP地址未发生改变,目标业务服务器能够获取发起目标请求报文的客户端的IP地址。因此,目标业务服务器可以绕开负载均衡节点,直接将目标响应报文发送给客户端。在这种情况下,本发明提供的处理业务流量的方法将仅针对请求报文(可称作上行流量)。In an embodiment, after the target service server performs service processing on the target request message, it may directly send a response message corresponding to the target request message (which may be called a target response message) to the client. For example, when DPVS adopts DR (Direct Routing, direct routing) mode, after the target request message is processed by the load balancing node, the source IP address does not change, and the target service server can obtain the IP address of the client that initiated the target request message . Therefore, the target service server can bypass the load balancing node and directly send the target response message to the client. In this case, the method for processing service traffic provided by the present invention is only for request packets (which may be referred to as uplink traffic).

在另一个实施例中,目标业务服务器对目标请求报文进行业务处理之后,可以将目标响应报文发送给负载均衡节点,负载均衡节点对目标响应报文进行处理后将其发送给客户端。例如,当DPVS采用NAT(Network Address Translation,网络地址转换)模式时,DPVS会对目标请求报文进行IP地址转换,目标业务服务器接收到的目标请求报文的源IP地址并非发起目标请求报文的客户端的IP地址。因此,目标业务服务器需要将目标响应报文发送给负载均衡节点处理,并由负载均衡节点将目标响应报文转发给客户端。参见图6,在这种情况下,本发明提供的处理业务流量的方法还可以包括针对响应报文(可称作下行流量)的相关处理。In another embodiment, after the target service server processes the target request message, it may send the target response message to the load balancing node, and the load balancing node processes the target response message and sends it to the client. For example, when DPVS adopts NAT (Network Address Translation, Network Address Translation) mode, DPVS will perform IP address translation on the target request message, and the source IP address of the target request message received by the target service server is not the originating target request message The IP address of the client. Therefore, the target service server needs to send the target response message to the load balancing node for processing, and the load balancing node forwards the target response message to the client. Referring to FIG. 6 , in this case, the method for processing service traffic provided by the present invention may also include related processing for response packets (which may be referred to as downlink traffic).

需要说明的是,DPVS还可以采用其支持的其他转发模式,例如TUN(IPTunneling,IP隧道)模式、FULL NAT模式等,本发明对此不作限制。It should be noted that the DPVS may also adopt other forwarding modes supported by it, such as TUN (IP Tunneling, IP tunneling) mode, FULL NAT mode, etc., which are not limited in the present invention.

步骤601,虚拟负载均衡器接收虚拟交换机转发的目标响应报文,并将目标响应报文发送至虚拟路由器。Step 601, the virtual load balancer receives the target response message forwarded by the virtual switch, and sends the target response message to the virtual router.

在步骤601之前,负载均衡节点通过OVS接收业务服务器发出的目标响应报文。OVS接收到业务服务器发送的目标响应报文之后,会将目标请求报文转发给DPVS。之后,DPVS将接收到的目标响应报文转发给Vroute。Before step 601, the load balancing node receives the target response message sent by the service server through the OVS. After OVS receives the target response message sent by the business server, it will forward the target request message to DPVS. After that, DPVS forwards the received target response message to Vroute.

步骤602,虚拟路由器将接收到的目标响应报文与预先配置的服务质量规则集合进行匹配。Step 602, the virtual router matches the received target response message with the pre-configured QoS rule set.

在实施中,Vroute在接收到DPVS转发的目标响应报文之后,可以将目标响应报文与服务质量规则集合中的各条服务质量规则进行匹配,然后根据匹配结果对目标响应报文进行相应的处理。目标响应报文的匹配过程与目标请求报文的匹配过程类似,本发明在此不做赘述。In the implementation, after Vroute receives the target response message forwarded by DPVS, it can match the target response message with each quality of service rule in the service quality rule set, and then perform corresponding actions on the target response message according to the matching result. deal with. The matching process of the target response message is similar to the matching process of the target request message, and the present invention will not repeat them here.

步骤603,虚拟路由器根据匹配结果将目标响应报文发送至虚拟交换机,以使虚拟交换机将目标响应报文发送给客户端。Step 603, the virtual router sends the target response message to the virtual switch according to the matching result, so that the virtual switch sends the target response message to the client.

在实施中,若预先配置的服务质量规则集合中不存在与目标响应报文相匹配的服务质量规则,则Vroute将目标响应报文发送至OVS;否则,Vroute对目标响应报文执行匹配出的服务质量规则所规定的操作方法,如果需要,则将目标响应报文发送至OVS。OVS可以通过物理网卡连接到互联网,因此Vroute需要通过OVS将目标响应报文返回给客户端。In the implementation, if there is no quality of service rule matching the target response message in the pre-configured quality of service rule set, Vroute sends the target response message to OVS; otherwise, Vroute executes the matched The operation method specified by the quality of service rule, if necessary, sends the target response message to OVS. OVS can be connected to the Internet through a physical network card, so Vroute needs to return the target response message to the client through OVS.

值得一提的是,服务质量规则所规定的操作方法可以包括转发、丢弃、改变报文优先级后转发等等。其中,如果Vroute为目标响应报文匹配到的服务质量规则所规定的操作方法为丢弃,则可以认为不需要Vroute将目标响应报文发送给OVS进行后续处理,Vroute将主动丢弃目标响应报文。It is worth mentioning that the operation method stipulated by the quality of service rule may include forwarding, discarding, forwarding after changing the priority of the message, and so on. Wherein, if the operation method specified by the quality of service rule that Vroute matches for the target response message is discarding, it can be considered that Vroute does not need to send the target response message to OVS for subsequent processing, and Vroute will actively discard the target response message.

采用本发明,虚拟路由器与虚拟负载均衡器之间的业务流量不必依赖虚拟交换机转发,虚拟路由器与虚拟负载均衡器可以直接进行数据交互,减少了业务数据在负载均衡节点内部的转发次数,进而减轻了虚拟交换机的负载以及提高了业务数据的传输效率。同时,虚拟负载均衡器DPVS本身不具备服务质量功能,在负载均衡节点部署虚拟路由器后,虚拟路由器基于服务质量规则集合对接收到的业务数据进行服务质量控制,完善了负载均衡节点的服务质量功能。可见,本发明可以提升整个业务服务系统的数据处理性能。With the present invention, the business flow between the virtual router and the virtual load balancer does not need to rely on the virtual switch to forward, and the virtual router and the virtual load balancer can directly perform data interaction, which reduces the number of forwarding times of business data inside the load balancing node, thereby reducing The load of the virtual switch is reduced and the transmission efficiency of service data is improved. At the same time, the virtual load balancer DPVS itself does not have a quality of service function. After the virtual router is deployed on the load balancing node, the virtual router controls the service quality of the received business data based on the quality of service rule set, which improves the quality of service function of the load balancing node. . It can be seen that the present invention can improve the data processing performance of the entire business service system.

基于相同的技术构思,本发明实施例还提供了一种业务流量传输系统,包括虚拟交换机、虚拟路由器和虚拟负载均衡器,Based on the same technical concept, the embodiment of the present invention also provides a service traffic transmission system, including a virtual switch, a virtual router and a virtual load balancer,

所述虚拟路由器,用于接收所述虚拟交换机转发的目标请求报文,并将所述目标请求报文与预先配置的服务质量规则集合进行匹配;The virtual router is configured to receive the target request message forwarded by the virtual switch, and match the target request message with a pre-configured quality of service rule set;

所述虚拟路由器,还用于根据匹配结果将所述目标请求报文发送至所述虚拟负载均衡器;The virtual router is further configured to send the target request packet to the virtual load balancer according to the matching result;

所述虚拟负载均衡器,用于根据预先配置的负载均衡规则为所述目标请求报文选择业务服务器;The virtual load balancer is configured to select a service server for the target request message according to a pre-configured load balancing rule;

所述虚拟负载均衡器,还用于将所述目标请求报文发送至所述虚拟交换机,以使所述虚拟交换机将所述目标请求报文转发至被选中的所述业务服务器进行业务处理。The virtual load balancer is further configured to send the target request message to the virtual switch, so that the virtual switch forwards the target request message to the selected service server for service processing.

可选的,所述虚拟路由器还用于:Optionally, the virtual router is also used for:

通过virtio_user端口与所述虚拟负载均衡器的vhost_user端口建立通信连接。Establish a communication connection with the vhost_user port of the virtual load balancer through the virtio_user port.

进一步的,所述虚拟路由器具体用于:Further, the virtual router is specifically used for:

若预先配置的服务质量规则集合中不存在与所述目标请求报文相匹配的服务质量规则,则将所述目标请求报文发送至所述虚拟负载均衡器;If there is no quality of service rule matching the target request packet in the preconfigured set of quality of service rules, sending the target request packet to the virtual load balancer;

否则,对所述目标请求报文执行匹配出的服务质量规则所规定的操作方法,如果需要,则将所述目标请求报文发送至所述虚拟负载均衡器。Otherwise, execute the operation method specified by the matched QoS rule on the target request message, and send the target request message to the virtual load balancer if necessary.

可选的,所述虚拟负载均衡器还用于:Optionally, the virtual load balancer is also used for:

接收所述虚拟交换机转发的目标响应报文,并将所述目标响应报文发送至所述虚拟路由器,以使所述虚拟路由器根据所述服务质量规则集合处理所述目标响应报文。receiving the target response message forwarded by the virtual switch, and sending the target response message to the virtual router, so that the virtual router processes the target response message according to the set of quality of service rules.

可选的,所述虚拟路由器还用于:Optionally, the virtual router is also used for:

接收所述虚拟负载均衡器转发的目标响应报文,并将所述目标响应报文与所述服务质量规则集合进行匹配;receiving a target response message forwarded by the virtual load balancer, and matching the target response message with the set of quality of service rules;

根据匹配结果将所述目标响应报文发送至所述虚拟交换机,以使所述虚拟交换机将所述目标响应报文发送给客户端。Sending the target response message to the virtual switch according to the matching result, so that the virtual switch sends the target response message to the client.

本实施例的业务流量传输系统可以用于执行上述方法实施例的方法,其实现原理和所要达到的技术效果上文中已有论述,在此不再赘述。The service traffic transmission system of this embodiment can be used to implement the method of the above method embodiment, and its implementation principle and technical effect to be achieved have been discussed above, and will not be repeated here.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件来实现。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该传输业务流量的软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备执行各个实施例或者实施例的某些部分所述的方法。Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general-purpose hardware platform, and of course can also be implemented by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of software products, and the software products for transmitting business traffic can be stored in computer-readable storage media, such as ROM/ RAM, magnetic disk, optical disk, etc., include several instructions to make a computer device execute the methods described in various embodiments or some parts of the embodiments.

以上所述仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included in the protection of the present invention. within range.

Claims (14)

1. A service traffic transmission method is characterized in that the service traffic transmission method comprises the following steps:
the virtual router receives a target request message forwarded by the virtual switch, and matches the target request message with a preset service quality rule set;
and the virtual router sends the target request message to a virtual load balancer according to the matching result so that the virtual load balancer performs load balancing processing on the target request message.
2. The traffic flow transmission method according to claim 1, wherein before the virtual router sends the target request packet to the virtual load balancer, the traffic flow transmission method further comprises:
and the virtual router establishes communication connection with the vhost _ user port of the virtual load balancer through the virtio _ user port.
3. The method for transmitting service traffic according to claim 1, wherein the virtual router sends the target request packet to the virtual load balancer according to the matching result, specifically comprising:
if the service quality rule matched with the target request message does not exist in the preset service quality rule set, the virtual router sends the target request message to the virtual load balancer;
otherwise, the virtual router executes the operation method specified by the matched service quality rule to the target request message, and if necessary, the target request message is sent to the virtual load balancer.
4. The method of claim 1, wherein the traffic flow transmission method further comprises:
the virtual router receives a target response message forwarded by the virtual load balancer, and matches the target response message with the service quality rule set;
and the virtual router sends the target response message to the virtual switch according to the matching result so that the virtual switch sends the target response message to a client.
5. A service traffic transmission method is characterized in that the service traffic transmission method comprises the following steps:
the virtual load balancer receives a target request message forwarded by the virtual router, and selects a service server for the target request message according to a pre-configured load balancing rule; after the target request message is matched with a service quality rule set pre-configured by the virtual router through the virtual router, the target request message is sent to the virtual load balancer by the virtual router according to a matching result;
and the virtual load balancer sends the target request message to a virtual switch, so that the virtual switch forwards the target request message to the selected service server for service processing.
6. The traffic flow transmission method according to claim 5, wherein before the virtual load balancer receives the target request packet forwarded by the virtual router, the traffic flow transmission method further comprises:
and the virtual load balancer establishes communication connection with the virtual _ user port of the virtual router through the vhost _ user port.
7. The method of claim 5, wherein the traffic flow transmission method further comprises:
and the virtual load balancer receives a target response message forwarded by a virtual switch and sends the target response message to the virtual router, so that the virtual router processes the target response message according to the service quality rule set.
8. A service traffic transmission system comprising a virtual switch, a virtual router and a virtual load balancer, wherein,
the virtual router is used for receiving a target request message forwarded by the virtual switch and matching the target request message with a preset service quality rule set;
the virtual router is further used for sending the target request message to the virtual load balancer according to a matching result;
the virtual load balancer is used for selecting a service server for the target request message according to a preset load balancing rule;
the virtual load balancer is further configured to send the target request packet to the virtual switch, so that the virtual switch forwards the target request packet to the selected service server for service processing.
9. The traffic flow delivery system of claim 8, wherein the virtual router is further configured to:
and establishing communication connection with the vhost _ user port of the virtual load balancer through the virtio _ user port.
10. The traffic flow transmission system according to claim 8, wherein the virtual router is specifically configured to:
if the service quality rule matched with the target request message does not exist in the preset service quality rule set, the target request message is sent to the virtual load balancer;
otherwise, executing the operation method specified by the matched service quality rule on the target request message, and if necessary, sending the target request message to the virtual load balancer.
11. The traffic flow delivery system of claim 8, wherein the virtual load balancer is further configured to:
and receiving a target response message forwarded by the virtual switch, and sending the target response message to the virtual router so that the virtual router processes the target response message according to the service quality rule set.
12. The traffic flow delivery system of claim 8, wherein the virtual router is further configured to:
receiving a target response message forwarded by the virtual load balancer, and matching the target response message with the service quality rule set;
and sending the target response message to the virtual switch according to the matching result so that the virtual switch sends the target response message to a client.
13. A network device comprising a processor and a memory, the memory having stored therein at least one instruction, at least one program, set of codes, or set of instructions, the at least one instruction, the at least one program, set of codes, or set of instructions being loaded and executed by the processor to implement processing by a virtual router in a method according to any of claims 1 to 4, or to implement processing by a virtual load balancer in a method according to any of claims 5 to 7.
14. A computer readable storage medium having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, which is loaded and executed by a processor to implement a process of a virtual router in a method according to any one of claims 1 to 4, or to implement a process of a virtual load balancer in a method according to any one of claims 5 to 7.
CN201911239905.3A 2019-12-06 2019-12-06 Service flow transmission method, system and network equipment Expired - Fee Related CN112929264B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911239905.3A CN112929264B (en) 2019-12-06 2019-12-06 Service flow transmission method, system and network equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911239905.3A CN112929264B (en) 2019-12-06 2019-12-06 Service flow transmission method, system and network equipment

Publications (2)

Publication Number Publication Date
CN112929264A CN112929264A (en) 2021-06-08
CN112929264B true CN112929264B (en) 2022-10-28

Family

ID=76161464

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911239905.3A Expired - Fee Related CN112929264B (en) 2019-12-06 2019-12-06 Service flow transmission method, system and network equipment

Country Status (1)

Country Link
CN (1) CN112929264B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114285802A (en) * 2021-12-21 2022-04-05 北京字节跳动网络技术有限公司 Network load balancing method, device, electronic equipment, medium and program product
CN114553881B (en) * 2022-01-07 2024-04-02 优刻得科技股份有限公司 Multi-data center flow scheduling method and system
CN115225708B (en) * 2022-07-28 2023-08-08 天翼云科技有限公司 Message forwarding method computer equipment and storage medium
CN117692458B (en) * 2023-12-08 2024-08-06 北京志凌海纳科技股份有限公司 Distributed load balancing realization method and system based on labels

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102447624A (en) * 2011-11-23 2012-05-09 成都市华为赛门铁克科技有限公司 Load balancing method in server cluster, as well as node server and cluster
CN205566376U (en) * 2016-04-25 2016-09-07 云南电网有限责任公司昆明供电局 Other distributed data center controlling means who hangs load equalizer
CN106506700A (en) * 2016-12-28 2017-03-15 北京优帆科技有限公司 A kind of transparent proxy method of load equalizer and SiteServer LBS
CN106686085A (en) * 2016-12-29 2017-05-17 华为技术有限公司 A load balancing method, device and system
CN107733991A (en) * 2017-09-19 2018-02-23 大唐网络有限公司 One kind provides load balancing service implementation method based on OpenStack frameworks
CN109561027A (en) * 2017-09-26 2019-04-02 中兴通讯股份有限公司 Flow optimization method, load balancer and the storage medium of transparent caching

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040210663A1 (en) * 2003-04-15 2004-10-21 Paul Phillips Object-aware transport-layer network processing engine
US8291108B2 (en) * 2007-03-12 2012-10-16 Citrix Systems, Inc. Systems and methods for load balancing based on user selected metrics
CN101827039B (en) * 2010-06-04 2013-03-20 杭州华三通信技术有限公司 Method and equipment for load sharing
CN107026890B (en) * 2016-02-02 2020-10-09 华为技术有限公司 A packet generation method and load balancer based on server cluster
CN107196870B (en) * 2017-07-20 2021-07-20 哈尔滨工业大学 A traffic dynamic load balancing method based on DPDK
CN110198226A (en) * 2018-03-28 2019-09-03 腾讯科技(深圳)有限公司 Access request processing method, system and readable medium in a kind of load balancing cluster
CN109547580B (en) * 2019-01-22 2021-05-25 网宿科技股份有限公司 A method and device for processing data message

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102447624A (en) * 2011-11-23 2012-05-09 成都市华为赛门铁克科技有限公司 Load balancing method in server cluster, as well as node server and cluster
CN205566376U (en) * 2016-04-25 2016-09-07 云南电网有限责任公司昆明供电局 Other distributed data center controlling means who hangs load equalizer
CN106506700A (en) * 2016-12-28 2017-03-15 北京优帆科技有限公司 A kind of transparent proxy method of load equalizer and SiteServer LBS
CN106686085A (en) * 2016-12-29 2017-05-17 华为技术有限公司 A load balancing method, device and system
CN107733991A (en) * 2017-09-19 2018-02-23 大唐网络有限公司 One kind provides load balancing service implementation method based on OpenStack frameworks
CN109561027A (en) * 2017-09-26 2019-04-02 中兴通讯股份有限公司 Flow optimization method, load balancer and the storage medium of transparent caching

Also Published As

Publication number Publication date
CN112929264A (en) 2021-06-08

Similar Documents

Publication Publication Date Title
JP7004405B2 (en) Systems and methods for distributed flow state P2P configuration in virtual networks
CA3106407C (en) Multi-cloud connectivity using srv6 and bgp
US11895154B2 (en) Method and system for virtual machine aware policy management
US11070447B2 (en) System and method for implementing and managing virtual networks
CN112929264B (en) Service flow transmission method, system and network equipment
US8676980B2 (en) Distributed load balancer in a virtual machine environment
US9807016B1 (en) Reducing service disruption using multiple virtual IP addresses for a service load balancer
US10063468B2 (en) Leaking routes in a service chain
CN109937401B (en) Live Migration of Load Balanced VMs via Service Bypass
EP3225014B1 (en) Source ip address transparency systems and methods
US20060083177A1 (en) Listener mechanism in a distributed network system
US9712649B2 (en) CCN fragmentation gateway
US20150106526A1 (en) Provisioning a network for network traffic
US12273264B1 (en) Maintaining processing core affinity for fragmented packets in network devices
JP2024072265A (en) Apparatus, method, and non-transitory computer-readable storage medium for network access to a residential gateway - Patents.com
WO2018182467A1 (en) Techniques for congestion control in information-centric networks
JP2017182138A (en) Load balancing system
KR101538667B1 (en) Network system and method for controlling network
CN118138552A (en) Data transmission method and related equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20221028