WO2020177246A1 - 一种dpdk环境下基于nat的负载均衡方法 - Google Patents

一种dpdk环境下基于nat的负载均衡方法 Download PDF

Info

Publication number
WO2020177246A1
WO2020177246A1 PCT/CN2019/092690 CN2019092690W WO2020177246A1 WO 2020177246 A1 WO2020177246 A1 WO 2020177246A1 CN 2019092690 W CN2019092690 W CN 2019092690W WO 2020177246 A1 WO2020177246 A1 WO 2020177246A1
Authority
WO
WIPO (PCT)
Prior art keywords
nat
server
data packet
dpdk
module
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.)
Ceased
Application number
PCT/CN2019/092690
Other languages
English (en)
French (fr)
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.)
Nanjing University of Posts and Telecommunications
Original Assignee
Nanjing University of Posts and Telecommunications
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 Nanjing University of Posts and Telecommunications filed Critical Nanjing University of Posts and Telecommunications
Priority to JP2021521491A priority Critical patent/JP7177548B2/ja
Publication of WO2020177246A1 publication Critical patent/WO2020177246A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming

Definitions

  • the invention belongs to the field of network communication, and specifically relates to a load balancing method based on NAT (Network Address Translation, network address translation) in a DPDK (Data Plane Development Kit) environment.
  • NAT Network Address Translation, network address translation
  • DPDK Data Plane Development Kit
  • the scheduler In the case of traditional NAT for load balancing, for external requests, the scheduler generally uses a polling method after intercepting it. Randomly finds the address of an internal server in the address pool to replace the destination address, and the source address remains unchanged . Then send it to the internal server for processing. The internal and external communication is exactly the opposite process. The scheduler replaces the source address of the data packet sent by the server with the global address owned by the scheduler, and the destination address remains unchanged, and it is sent out.
  • the advantage of traditional NAT for load balancing is that the server can run any operating system that supports TCP/IP, because only one IP needs to be configured on the scheduler, and the server group can use its own private IP address, saving the IP of the public network.
  • the address is relatively flexible.
  • the scheduler needs to perform frequent search and replacement operations on data packets, although this workload is much less than that of the detailed processing of data packets by the server, once the amount of data increases, the scheduler cannot bear this. High frequency work. Generally speaking, when the number of server nodes rises to 20, the scheduler itself may become a new bottleneck in the system.
  • each server has an equal opportunity to be favored by the scheduler, and to a certain extent, each server can be used in a balanced manner, but this situation ignores the server itself
  • the difference in performance is exaggerated to say that the load capacity of server A is 10 times that of server B.
  • A can reach 1/10 of the upper limit of load. This is unfair to the B server and will undoubtedly reduce the performance of the entire system.
  • the present invention proposes a NAT-based load balancing method in a DPDK environment, in which the DPDK module Take over the processing module of the scheduler, use the fast processing capability of DPDK for data packets, and combine the status record table of the NAT module to schedule and forward data packets; overcome the performance limitations of the scheduler itself, increase the upper limit of load balancing, and achieve balance Forwarding, the specific technical solutions are as follows:
  • a load balancing method based on NAT in a DPDK environment is implemented using a scheduler including a DPDK module and a NAT module, and specifically includes the steps:
  • step S3 Traverse the NAT rule table according to the hash value, and query whether there is IP and port information of the internal server corresponding to the hash value in the NAT rule table; if so, based on the NAT rule table pair Replace the source and destination IP, and send the data packet to the corresponding server, otherwise, perform step S4;
  • step S2 it further includes determining whether the data packet is sent from the client to the server or from the server to the customer service terminal, and if the data packet is sent from the client to the server, steps S3 to S4 are executed; Otherwise, perform the steps:
  • step S1 further includes: classifying the servers in the status record table according to the remaining load according to a specified rule.
  • the DPDK module adopts the rte_eth_tx_burst() function to receive the data packet.
  • the beneficial effects of the NAT-based load balancing method in the DPDK environment of the present invention are as follows: (1) Large-scale traffic adaptability: DPDK is used to bypass the traditional protocol stack and discard some of the traditional protocol stack The processing flow speeds up the processing of data packets, breaking through the limitations of the traditional NAT-based load balancing scheduler itself, allowing the scheduler to schedule more servers and achieving load balancing under large-scale traffic; (2) Good balance , To improve the overall performance of the server cluster: using the remaining load of the status record table and the value obtained from the performance comparison can quickly find the server with the most remaining load.
  • Figure 1 is a schematic block diagram of a flow diagram of a communication between a client and a server using the method of the present invention
  • FIG. 2 is a schematic diagram of the structure of the NAT rule table in the embodiment of the present invention.
  • Figure 3 is a schematic diagram of a model structure for completing the method in an embodiment of the present invention.
  • a NAT-based load balancing method in a DPDK environment is provided.
  • the scheduler of the present invention is provided with a DPDK module and a NAT module, and the method of the present invention is completed based on the scheduler.
  • the figure is a schematic flow chart of using this method to implement a communication between a client and a server. It can be seen from this that the method of the present invention specifically includes the steps:
  • the DPDK module implements the sending and receiving of data packets
  • the NAT module maintains the NAT rule table and the state record table.
  • the NAT rule table is a hash table.
  • each key value corresponds to two values. One is used to replace the destination IP and port and sent to the internal server when receiving, and the other is to replace the source address with the IP address and port of the external dispatcher when sending. , And then sent to the client; the NAT rule table is established during initialization and updated when the scheduler receives the data packet.
  • the dispatcher first determines whether the data packet is received by the external client or the internal server according to the source port address of the data packet when querying It needs to be sent out, and then hash according to the client's IP and port information to determine whether to use the first value of the key to replace the destination IP, port, or the second value to replace the source IP port.
  • the present invention sets the internal server inquiry period of a NAT module, and how to set it according to the actual situation.
  • the present invention There are no restrictions and fixes; in an inquiry cycle, the NAT module will regularly inquire the internal server, query the current load of the current internal server, and combine the performance of each internal server for comprehensive consideration; among them, the comprehensive consideration program is implemented
  • the DPDK module uses the rte_eth_tx_burst() function to receive data packets, and the program realization process of the rte_eth_tx_burst() function is:
  • the RTE_CACHE_LINE_SIZE, socket_id) function allocates the queue structure and fills the structure.
  • the scheduler judges the data of the received data packet Whether the packet is sent from the client to the server or from the server to the customer service end, if the data packet is sent from the server to the client, the corresponding hash value is obtained by hash calculation according to the IP and port, and the NAT rule table is traversed according to the hash value , Query the source and destination IP and port information corresponding to the hash value of the NAT rule, replace the source and destination IP and port, and send the data packet to the corresponding client through the DPDK module through the rte_eth_tx_burst() function; otherwise, if the data packet is from The client sends to the server, and also performs a hash calculation based on the source and destination IP and port to obtain the hash value of the data packet, and executes the following
  • step S3 Search the NAT rule table according to the hash value, and query whether there is the IP and port information of the internal server corresponding to the hash value in the NAT rule table; if it exists, replace the source and destination IP based on the NAT rule table, and send the data packet Send to the corresponding server, otherwise, go to step S4;
  • the rte_eth_tx_burst() function receives the data packet, it records the information of the source and destination IP address and port of the data packet.
  • the scheduler recognizes that this is the received data packet and uses the source port and IP information to perform a hash calculation.
  • the hash value Look up whether the NAT rule table has the IP and port information of the corresponding internal server; if it exists, replace the source and destination IP based on the NAT rule table, and send the data packet to the corresponding server; otherwise, perform step S4.
  • IP and port information of the internal server corresponding to the hash value does not exist in the NAT, search for the server with the largest remaining load in the state record table, and send the data packet to the server with the largest remaining load, and record the server with the largest remaining load
  • the communication information with the client is sent to the NAT rule table and the NAT rule table is updated.
  • the scheduler will look up the status record table to find the one with the largest number in the status record table, and set The corresponding internal server IP is taken out, and then the scheduler replaces the destination address of the data packet, which is sent to the internal server by the rte_eth_tx_burst() function of the DPDK module, and records the communication information between the server with the largest remaining load and the client to the NAT rule table and Update the NAT rule table for next use.
  • the method of the present invention uses DPDK to bypass the traditional protocol stack, discards some processing procedures of the traditional protocol stack, accelerates the processing of data packets, and breaks through the limitations of the traditional NAT-based load balancing scheduler itself.
  • This enables the scheduler to schedule more servers, realizes load balancing under large-scale traffic, makes the scheduler adapt to larger-scale traffic, and has a wider application field; the present invention uses the remaining load and performance comparison of the status record table to compare The value obtained can quickly find the server with the most remaining load.
  • the performance difference of the server is considered, and the real load balancing is realized, which can be well balanced.
  • the load between the servers improves the overall performance of the server cluster; the present invention can improve the processing performance of the scheduler based on software, and realize the load balancing of large-scale traffic; Compared with the hardware system, there are many common API interfaces for subsequent Development has good support; at the same time, the software can be further developed according to actual needs, so that the scheduler has good scalability.

Landscapes

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

Abstract

本发明公开了一种DPDK环境下基于NAT的负载均衡方法,方法运用包括DPDK模块和NAT模块的调度器实现,包括步骤:对DPDK模块和NAT模块初始化,得到收发队列端口和NAT规则表和状态记录表;使用DPDK模块记录接收数据包的源目IP和地址,计算源目IP和地址对应的哈希值;根据哈希值查找NAT规则表,判断NAT规则表中是否有与得到的哈希值对应的服务器IP和端口信息,若有就将所述源目IP和地址替换,实现数据报传输,否则寻找状态记录表中负载剩余最大服务器,并将数据包发送至负载剩余最大服务器,并记录负载剩余最大服务器与客户端的通信信息至NAT规则表并更新NAT规则表;本发明可提升调度器对大规模流量的适用性,具有良好的拓展性,并且有利于服务器负载的均衡。

Description

一种DPDK环境下基于NAT的负载均衡方法 技术领域
本发明属于网络通信领域,具体涉及一种DPDK(Data Plane Development Kit,数据平面开发套件)环境下基于NAT(Network Address Translation,网络地址转换)的负载均衡方法。
背景技术
现如今随着计算机用户的爆炸式的增长,网络流量也变得越来越大,对于服务器的负载能力也提出了更大的挑战。就目前而言即使性能最好的单台服务器也无法承受现如今的大流量的请求。所以利用集群的思想来实现负载均衡就显得格为的重要。对于传统的基于NAT的负载均衡来说,其部署在传统的TCP/IP协议栈上,系统频繁的中断,上下文的不停调度无疑占用了其大量的时间。因而对于传统的利用NAT实现负载均衡来说,调度器本身已经成为其负载均衡的瓶颈。由于调度器的性能问题,一般情况下来说能对10台左右的服务器进行调度,这对于绝大部分情况下已经可以适用,但对于网络流量日渐爆炸的今天,尤其是DDOS技术的日渐成熟,攻击流量上百GB/S级别已经不是问题。在这种背景下传统基于NAT实现的负载均衡显然是胜任不了这份工作,因此寻找能抵抗更大规模流量的负载均衡技术已经亟不可待。
在传统的NAT做负载均衡情况下,对于外部的请求,调度器截获到后一般采用轮询的方法,在地址池中随机找出一个内部服务器的地址将目的地址替换掉,源地址保持不变。再将其发往内部服务器去 处理。而对于内部与外部的通信刚好是一个相反的过程,调度器将服务器传过来的数据包的源地址替换为调度器拥有的全局地址,目的地址不变,将其发送出去。
显然传统下NAT做负载均衡的优点是服务器可以运行任何支持TCP/IP的操作系统,因为只需要在调度器上配置好一个IP,服务器组可以使用自己私有的IP地址,节约了公网的IP地址比较的灵活。
但是调度器由于需要对数据包进行频繁的查找,替换操作,虽然相比于服务器对数据包细节处理,这种工作量少了很多,但是在量一旦大了起来,调度器也承受不了这样的高频率的工作。一般情况下来说当服务器结点数目升到20时,调度器本身有可能成为系统的新瓶颈。
此外,传统的利用NAT做负载均衡时,一般考虑轮询的方法,即每个服务器机会均等的被调度器垂青,使用一定程度上可以使得各个服务器得到均衡使用,但是这种情况忽略了服务器本身性能的不同,夸张来说A服务器负载能力是B服务器的10倍,对于这种轮询的方法,当B服务器负载达到上限时,A才堪堪达到负载上限的1/10。这样对于B服务器是不公平的,无疑也降低了整个系统的性能。
发明内容
针对上述现有技术中无法满足更大规模流量、以及由于调度的不公平而导致整个系统性能降低的问题,本发明于提出一种DPDK环境下基于NAT的负载均衡方法,该方法中由DPDK模块接管调度器的处理模块,利用DPDK对数据包的快速处理能力,结合NAT模块 的状态记录表对数据包进行调度转发;克服了调度器本身性能的限制,提高了负载均衡的上限,实现了均衡转发,具体技术方案如下:
一种DPDK环境下基于NAT的负载均衡方法,所述方法运用包括DPDK模块和NAT模块的调度器实现,具体包括步骤:
S1、初始化所述DPDK模块和NAT模块,配置完成所述调度器的收发队列及对应的端口,并设置好对应的NAT规则表和状态记录表;
S2、使用DPDK模块记录所述调度器接收到数据包的源目IP和端口,基于所述源目IP和端口进行哈希计算得到所述数据包的哈希值;
S3、根据所述哈希值遍历所述NAT规则表,查询所述NAT规则表中是否存在对应所述哈希值的内部服务器的IP和端口信息;若存在,则基于所述NAT规则表对所述源目IP进行替换,并将所述数据包发送给对应服务器,否则,执行步骤S4;
S4、若所述NAT中不存在对应所述哈希值的内部服务器的IP和端口信息,则寻找所述状态记录表中负载剩余最大服务器,并将所述数据包发送至所述负载剩余最大服务器,并记录所述负载剩余最大服务器与客户端的通信信息至所述NAT规则表并更新所述NAT规则表。
进一步的,所述步骤S2中,还包括判断所述数据包是从客户端发送到服务器还是从服务器发送到客服端,若所述数据包从客户端发送到服务器,则执行步骤S3~S4;否则,执行步骤:
根据所述哈希值遍历所述NAT规则表,查询所述NAT规则对应所述哈希值的源目IP和端口信息,并将所述源目IP和端口替换,将所述数据包发送给对应客户端。
进一步的,所述步骤S1中还包括:对所述状态记录表中服务器按照剩余负载按照指定规律进行等级划分。
进一步的,所述DPDK模块中采用rte_eth_tx_burst()函数接收所述数据包。
与现有技术相比,本发明的DPDK环境下基于NAT的负载均衡方法的有益效果为:(1)具有大规模流量的适应性:利用DPDK绕过传统协议栈,摈弃了传统协议栈的一些处理流程,加速数据包的处理,突破传统基于NAT负载均衡调度器本身的限制,使得调度器可以调度更多的服务器,实现了在大规模流量下的负载均衡;(2)具有良好的均衡性,提升服务器集群的整体性能:利用状态记录表的剩余负载和性能对比得出的值可以快速的找出真正的剩余负载最多的服务器,相比于传统下使用轮询各个服务器的做法,考虑了服务器的性能差异,实现了真正意义上的负载均衡;(3)具有可扩展性:基于软件对调度器的处理性能进行提升,实现大规模流量的负载均衡;相比于硬件系统,有很多通用的API接口对后续的开发具有良好的支持;同时,也可以根据实际需要对软件进行进一步的开发。
附图说明
图1是采用本发明方法实现一次客户端和服务器通信的流程框图示意;
图2是本发明实施例中所述NAT规则表的结构示意图;
图3是本发明实施例中完成所述方法的模型结构图示意。
具体实施方式
为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述。
在本发明实施例中,提供了一种DPDK环境下基于NAT的负载均衡方法,参阅图3,本发明中调度器内设置有DPDK模块和NAT模块,本发明的方法基于所述调度器完成,参阅图1,图示为使用本方法方法实现一次客户端和服务器通信的流程图示意,从中可知,本发明方法具体包括步骤:
S1、初始化DPDK模块和NAT模块,配置完成调度器的收发队列及对应的端口,并设置好对应的NAT规则表和状态记录表;
在本发明实施例中,由DPDK模块来实现数据包的收发处理,由NAT模块来对NAT规则表和状态记录表维护,其中,NAT规则表是一个哈希表,具体可参阅图2,从中可知,每个键值对应两个值,一个是用于接收时,将目的IP,端口替换,发送给内部服务器,一个是用于发送时,将源地址替换为外部调度器的IP地址,端口,然后发送给客户端;NAT规则表在初始化时建立,并且在调度器接收到数据包时进行更新,每次将根据客户段的IP,端口信息进行哈希,将内部服务器的IP,端口信息放在第一个位置,将调度器使用的外部IP,端口信息放在第二个位置;调度器在查询时先根据数据包的源端 口地址确定该数据包是外部客户端接收过来还是内部服务器需要发送出去的,然后再根据客户端的IP和端口信息进行哈希,确定是使用键的第一个值替换目的IP,端口,还是第二个值替换源IP端口。
而对于本发明中状态记录表,用于记录还具有剩余负载的服务器的具体情况:本发明设定一个NAT模块的内部服务器询问周期,具体如何可根据实际情况进行设定,对此,本发明并不进行限制和固定;在一个询问周期内,NAT模块会定时向内部服务器进行询问,查询当前内部服务器的当前负载,并结合各个内部服务器的性能,进行综合考量;其中,综合考量的程序实现过程为:for t←0to n;state record[t]←server_load[t]*server_kind[t]*r,用server_kind=[S1,S2...Sn]记录各个服务器的性能信息,数值越大则代表服务器的性能越强,并将当前负载server_load与server_kind进行运算得到服务器的真实的剩余负载情况,其中r是修正常量,用于限定state_record在1-100之间;最后得到的划分好的等级记录插入在状态记录表state_record中,这样的方式避免了传统NAT使用轮询的方式中,因为忽略服务器性能的差异性,而造成整个系统的整体性能的降低的情况发生;优选的,本实施例将内部服务器的负载情况等级划分为1-100共100个等级,当然,此仅为本发明的较佳实施例,并不是对本发明方案的限制和固定。
S2、使用DPDK模块记录调度器接收到数据包的源目IP和端口,基于源目IP和端口进行哈希计算得到数据包的哈希值;
在本发明的具体实施例中,DPDK模块采用rte_eth_tx_burst()函 数接收数据包,rte_eth_tx_burst()函数的程序实现过程为:
从rte_eth_dev_configure()开始配置好收发队列,然后通过memcpy(&dev->data->dev_conf,sizeof(dev->data->dev_conf))函数将配置参数拷贝到设备的数据区并用(*dev->dev_ops->dev_infos_get)(dev,&dev_info)获取设备信息;同时,本发明通过rte_eth_rx_queue_setup()函数给接收队列初始化端口并配置8个队列,接着利用rxq=rte_zmalloc_socket("ethdev RX queue",sizeof(structixgbe_rx_queue),RTE_CACHE_LINE_SIZE,socket_id)函数分配队列结构并填充结构体,配置完成利用rte_eth_tx_burst()函数接收数据包,并记录对应数据包的源目IP和端口信息;同时,调度器对接收到的数据包进行判断数据包是从客户端发送到服务器还是从服务器发送到客服端,若数据包从服务器发送到客户端;根据IP和端口进行哈希计算得到对应的哈希值,并根据哈希值遍历NAT规则表,查询NAT规则对应所述哈希值的源目IP和端口信息,并将源目IP和端口替换,通过rte_eth_tx_burst()函数将数据包通过DPDK模块发送给对应客户端;否则,若数据包从客户端发送到服务器,同样基于源目IP和端口进行哈希计算得到数据包的哈希值,根据得到的哈希值执行下述步骤S3~S4。
S3、根据哈希值查找NAT规则表,查询NAT规则表中是否存在对应哈希值的内部服务器的IP和端口信息;若存在,则基于NAT规则表对源目IP进行替换,并将数据包发送给对应服务器,否则,执行步骤S4;
具体的,在rte_eth_tx_burst()函数接收到数据包后记录数据包源目IP地址端口的信息,调度器识别出这是接收的数据包,利用源端口,IP信息进行哈希计算,根据哈希值查找NAT规则表是否有对应的内部服务器的IP,端口信息;若存在,则基于NAT规则表对源目IP进行替换,并将数据包发送给对应服务器,否则,执行步骤S4。
S4、若NAT中不存在对应所述哈希值的内部服务器的IP和端口信息,则寻找状态记录表中负载剩余最大服务器,并将数据包发送至负载剩余最大服务器,并记录负载剩余最大服务器与客户端的通信信息至NAT规则表并更新NAT规则表。
具体的,如果在NAT规则表中没有找到对应的信息,则代表这是客户端第一次请求,那么调度器就查找状态记录表,找出状态记录表中记录数字最大的那一位,将其对应的内部服务器的IP取出,然后调度器将该数据包目的地址替换,在由DPDK模块的rte_eth_tx_burst()函数发送给内部的服务器,记录负载剩余最大服务器与客户端的通信信息至NAT规则表并更新NAT规则表,以供下次使用。
上述为基于图1进行的使用本发明方法进行一次服务器和客户端通信的完成过程描述,多次通信的原理和机制与一次通信的一样,在此不再进行赘述。
综上可知,与现有技术相比,本发明方法利用DPDK绕过传统协议栈,摈弃了传统协议栈的一些处理流程,加速数据包的处理,突破传统基于NAT负载均衡调度器本身的限制,使得调度器可以调度 更多的服务器,实现了在大规模流量下的负载均衡,使得调度器可适应更大规模的流量,应用领域更广;本发明利用状态记录表的剩余负载和性能对比得出的值可以快速的找出真正的剩余负载最多的服务器,相比于传统下使用轮询各个服务器的做法,考虑了服务器的性能差异,实现了真正意义上的负载均衡,能够很好地均衡服务器之间的负载,提升服务器集群的整体性能;本发明可基于软件对调度器的处理性能进行提升,实现大规模流量的负载均衡;相比于硬件系统,有很多通用的API接口对后续的开发具有良好的支持;同时,也可以根据实际需要对软件进行进一步的开发,使得调度器具有良好的可扩展性。
以上仅为本发明的较佳实施例,但并不限制本发明的专利范围,尽管参照前述实施例对本发明进行了详细的说明,对于本领域的技术人员而言,其依然可以对前述各具体实施方式所记载的技术方案进行修改,或者对其中部分技术特征进行等效替换。凡是利用本发明说明书及附图内容所做的等效结构,直接或间接运用在其他相关的技术领域,均同理在本发明专利保护范围之内。

Claims (4)

  1. 一种DPDK环境下基于NAT的负载均衡方法,其特征在于,所述方法运用包括DPDK模块和NAT模块的调度器实现,具体包括步骤:
    S1、初始化所述DPDK模块和NAT模块,配置完成所述调度器的收发队列及对应的端口,并设置好对应的NAT规则表和状态记录表;
    S2、使用DPDK模块记录所述调度器接收到数据包的源目IP和端口,基于所述源目IP和端口进行哈希计算得到所述数据包的哈希值;
    S3、根据所述哈希值遍历所述NAT规则表,查询所述NAT规则表中是否存在对应所述哈希值的内部服务器的IP和端口信息;若存在,则基于所述NAT规则表对所述源目IP进行替换,并将所述数据包发送给对应服务器,否则,执行步骤S4;
    S4、若所述NAT中不存在对应所述哈希值的内部服务器的IP和端口信息,则寻找所述状态记录表中负载剩余最大服务器,并将所述数据包发送至所述负载剩余最大服务器,并记录所述负载剩余最大服务器与客户端的通信信息至所述NAT规则表并更新所述NAT规则表。
  2. 如权利要求1所述的DPDK环境下基于NAT的负载均衡方法,其特征在于,所述步骤S2中,还包括判断所述数据包是从客户端发送到服务器还是从服务器发送到客服端,若所述数据包从客户端发送到服务器,则执行步骤S3~S4;否则,执行步骤:
    根据所述哈希值遍历所述NAT规则表,查询所述NAT规则对应所述哈希值的源目IP和端口信息,并将所述源目IP和端口替换,将所述数据包发送给对应客户端。
  3. 如权利要求1所述的DPDK环境下基于NAT的负载均衡方法,其特征在于,所述步骤S1中还包括:对所述状态记录表中服务器按照剩余负载按照指定规律进行等级划分。
  4. 如权利要求1~3任一项所述的DPDK环境下基于NAT的负载均衡方法,其特征在于,所述DPDK模块中采用rte_eth_tx_burst()函数接收所述数据包。
PCT/CN2019/092690 2019-03-04 2019-06-25 一种dpdk环境下基于nat的负载均衡方法 Ceased WO2020177246A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2021521491A JP7177548B2 (ja) 2019-03-04 2019-06-25 Dpdk環境でのnatに基づく負荷分散方法

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910158676.6A CN109787912A (zh) 2019-03-04 2019-03-04 一种dpdk环境下基于nat的负载均衡方法
CN201910158676.6 2019-03-04

Publications (1)

Publication Number Publication Date
WO2020177246A1 true WO2020177246A1 (zh) 2020-09-10

Family

ID=66487429

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/092690 Ceased WO2020177246A1 (zh) 2019-03-04 2019-06-25 一种dpdk环境下基于nat的负载均衡方法

Country Status (3)

Country Link
JP (1) JP7177548B2 (zh)
CN (1) CN109787912A (zh)
WO (1) WO2020177246A1 (zh)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113518270A (zh) * 2021-05-24 2021-10-19 北京邮电大学 面向移动网络的异构数据采集装置和方法
CN115720222A (zh) * 2022-12-19 2023-02-28 广西大学 基于dpdk的在arm多核架构上实现http转发的方法及存储介质
CN116389495A (zh) * 2023-03-28 2023-07-04 国网福建省电力有限公司 一种针对电力物联网设备信息的智能优化扫描方法
CN116527410A (zh) * 2023-07-05 2023-08-01 北京亿赛通科技发展有限责任公司 一种反向代理模式下的防火墙多进程处理方法和装置
CN119814720A (zh) * 2025-02-13 2025-04-11 浪潮云信息技术股份公司 一种网络地址转换方法、装置、设备及存储介质

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109787912A (zh) * 2019-03-04 2019-05-21 南京邮电大学 一种dpdk环境下基于nat的负载均衡方法
CN110661904B (zh) * 2019-10-25 2022-06-14 浪潮云信息技术股份公司 一种实现源网络地址转换网关水平扩展的方法
CN111010342B (zh) * 2019-11-21 2023-04-07 天津卓朗科技发展有限公司 一种分布式负载均衡实现方法及装置
CN111338793A (zh) * 2020-02-14 2020-06-26 拉扎斯网络科技(上海)有限公司 集群任务分发方法、装置、设备及存储介质
CN112217919B (zh) * 2020-12-11 2021-03-23 广东省新一代通信与网络创新研究院 一种用于实现网络地址转换的方法及系统
CN114598746B (zh) * 2022-03-07 2022-10-14 中南大学 基于智能网卡的服务器间负载均衡性能优化方法
CN120238520B (zh) * 2025-06-03 2025-09-09 谱睿仪器(深圳)有限公司 一种基于物理端口分配固定ip地址的实现方法、路由器、服务器及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107196870A (zh) * 2017-07-20 2017-09-22 哈尔滨工业大学 一种基于dpdk的流量动态负载均衡方法
US20180014081A1 (en) * 2016-07-11 2018-01-11 Harmonic, Inc. Multiple core software forwarding
CN107786458A (zh) * 2017-11-02 2018-03-09 下代互联网重大应用技术(北京)工程研究中心有限公司 基于dpdk的多端口准入准出的方法
CN109787912A (zh) * 2019-03-04 2019-05-21 南京邮电大学 一种dpdk环境下基于nat的负载均衡方法

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102970242B (zh) * 2012-11-09 2015-06-17 深圳市共进电子股份有限公司 一种实现负载均衡的方法
CN103152444B (zh) * 2013-03-25 2016-08-03 华为技术有限公司 中继方式的网络地址转换及报文传输方法及装置、系统
WO2016104537A1 (ja) 2014-12-24 2016-06-30 エヌ・ティ・ティ・コミュニケーションズ株式会社 負荷分散装置、負荷分散方法及びプログラム
CN107438012B (zh) * 2016-05-27 2020-07-28 北京金山云网络技术有限公司 一种负载均衡服务转发方法、系统、均衡装置和宿主机
US10321360B2 (en) * 2017-01-25 2019-06-11 Affirmed Networks, Inc. Load balancing of wireless subscriber packet processing over multiple packet processing cores on a virtual machine platform
CN108600120A (zh) * 2018-05-04 2018-09-28 广东唯网络科技有限公司 一种基于dpdk下实现nat的方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180014081A1 (en) * 2016-07-11 2018-01-11 Harmonic, Inc. Multiple core software forwarding
CN107196870A (zh) * 2017-07-20 2017-09-22 哈尔滨工业大学 一种基于dpdk的流量动态负载均衡方法
CN107786458A (zh) * 2017-11-02 2018-03-09 下代互联网重大应用技术(北京)工程研究中心有限公司 基于dpdk的多端口准入准出的方法
CN109787912A (zh) * 2019-03-04 2019-05-21 南京邮电大学 一种dpdk环境下基于nat的负载均衡方法

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113518270A (zh) * 2021-05-24 2021-10-19 北京邮电大学 面向移动网络的异构数据采集装置和方法
CN115720222A (zh) * 2022-12-19 2023-02-28 广西大学 基于dpdk的在arm多核架构上实现http转发的方法及存储介质
CN116389495A (zh) * 2023-03-28 2023-07-04 国网福建省电力有限公司 一种针对电力物联网设备信息的智能优化扫描方法
CN116527410A (zh) * 2023-07-05 2023-08-01 北京亿赛通科技发展有限责任公司 一种反向代理模式下的防火墙多进程处理方法和装置
CN116527410B (zh) * 2023-07-05 2023-09-26 北京亿赛通科技发展有限责任公司 一种反向代理模式下的防火墙多进程处理方法和装置
CN119814720A (zh) * 2025-02-13 2025-04-11 浪潮云信息技术股份公司 一种网络地址转换方法、装置、设备及存储介质

Also Published As

Publication number Publication date
CN109787912A (zh) 2019-05-21
JP7177548B2 (ja) 2022-11-24
JP2022505453A (ja) 2022-01-14

Similar Documents

Publication Publication Date Title
JP7177548B2 (ja) Dpdk環境でのnatに基づく負荷分散方法
US11223579B2 (en) Data processing method, network interface card, and server
JP4343760B2 (ja) ネットワークプロトコル処理装置
KR102318338B1 (ko) 멀티-테넌트 환경에서 보안 네트워크 통신을 위해 통합된 방화벽을 제공하는 시스템 및 방법
US8489761B2 (en) Onload network protocol stacks
CN1206600C (zh) 一种全分布式的集群网络服务器系统
US6941379B1 (en) Congestion avoidance for threads in servers
US9934273B1 (en) Metadata synchronization in flow management systems
US11212176B2 (en) Consistent processing of transport node network data in a physical sharding architecture
CN118647976A (zh) 加密数据分组转发
CN111464446B (zh) 多线路服务器访问的通信方法、装置和服务器
CN106790420B (zh) 一种多会话通道建立方法和系统
US20240069977A1 (en) Data transmission method and data transmission server
WO2018032399A1 (en) Server and method having high concurrency capability
CN107079060A (zh) 用于运营商级nat优化的系统和方法
CN104205080A (zh) 为联网设备虚拟化卸载分组处理
CN110768994B (zh) 一种基于dpdk技术的提高sip网关性能的方法
CN110838935B (zh) 高可用sdn控制器集群方法、系统、存储介质及设备
US10924423B2 (en) Adaptive mechanism to adjust UDT packet size based on actual network condition
CN110099076A (zh) 一种镜像拉取的方法及其系统
CN111371920A (zh) Dns前端解析方法及系统
WO2021098425A1 (zh) 配置业务的服务质量策略方法、装置和计算设备
WO2017028399A1 (zh) 通信数据传输方法及系统
US20070174479A1 (en) Systems and methods for implementing host-based security in a computer network
WO2014067055A1 (zh) 流表刷新的方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19917561

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2021521491

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19917561

Country of ref document: EP

Kind code of ref document: A1