[go: up one dir, main page]

CN115604272A - Load balancing method, device, system and system creation method, equipment and medium - Google Patents

Load balancing method, device, system and system creation method, equipment and medium Download PDF

Info

Publication number
CN115604272A
CN115604272A CN202211518396.XA CN202211518396A CN115604272A CN 115604272 A CN115604272 A CN 115604272A CN 202211518396 A CN202211518396 A CN 202211518396A CN 115604272 A CN115604272 A CN 115604272A
Authority
CN
China
Prior art keywords
virtual
subnet
load balancer
layer
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.)
Granted
Application number
CN202211518396.XA
Other languages
Chinese (zh)
Other versions
CN115604272B (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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202211518396.XA priority Critical patent/CN115604272B/en
Publication of CN115604272A publication Critical patent/CN115604272A/en
Application granted granted Critical
Publication of CN115604272B publication Critical patent/CN115604272B/en
Priority to PCT/CN2023/108189 priority patent/WO2024113895A1/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/70Virtual switches

Landscapes

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

Abstract

本申请公开了负载均衡方法、装置、系统及系统创建方法及设备和介质,涉及计算机技术领域,该负载均衡方法包括:接收客户端的请求,并根据请求在服务池中确定目标虚拟服务器;判断目标虚拟服务器所在的子网与七层负载均衡器关联的子网是否相同;若否,则将请求依次通过七层负载均衡器关联的虚拟交换机、虚拟路由器、目标虚拟服务器所在的子网对应的虚拟交换机发送至目标虚拟服务器,并依次通过目标虚拟服务器所在的子网对应的虚拟交换机、虚拟路由器、七层负载均衡器关联的虚拟交换机接收目标虚拟服务器对请求的响应;将响应返回至客户端。本申请实现了对跨多子网的多个虚拟化服务器七层负载均衡。

Figure 202211518396

The application discloses a load balancing method, device, system, system creation method, equipment and media, and relates to the field of computer technology. The load balancing method includes: receiving a request from a client, and determining a target virtual server in a service pool according to the request; judging the target Whether the subnet where the virtual server is located is the same as the subnet associated with the Layer 7 load balancer; The switch sends it to the target virtual server, and receives the response of the target virtual server to the request through the virtual switch corresponding to the subnet where the target virtual server is located, the virtual router, and the virtual switch associated with the seven-layer load balancer; and returns the response to the client. This application realizes seven-layer load balancing of multiple virtualized servers across multiple subnets.

Figure 202211518396

Description

负载均衡方法、装置、系统及系统创建方法及设备和介质Load balancing method, device, system and system creation method, equipment and medium

技术领域technical field

本申请涉及计算机技术领域,更具体地说,涉及一种负载均衡方法、装置、系统、一种负载均衡系统的创建方法、装置及一种电子设备和一种计算机可读存储介质。The present application relates to the field of computer technology, and more specifically, to a load balancing method, device, system, a method and device for creating a load balancing system, an electronic device, and a computer-readable storage medium.

背景技术Background technique

随着云计算的不断发展,虚拟化服务器集群越来越庞大,相应的虚拟化网络越来越复杂。目前虚拟化环境中的负载均衡方案基本都是针对单一子网中虚拟服务器的七层负载均衡,或针对跨多子网的虚拟服务器四层负载均衡。With the continuous development of cloud computing, virtualized server clusters are becoming larger and larger, and corresponding virtualized networks are becoming more and more complex. Currently, load balancing solutions in a virtualized environment are basically aimed at layer-7 load balancing of virtual servers in a single subnet, or layer-4 load balancing of virtual servers across multiple subnets.

因此,如何实现对跨多子网的多个虚拟化服务器七层负载均衡是本领域技术人员需要解决的技术问题。Therefore, how to implement layer-7 load balancing for multiple virtualized servers across multiple subnets is a technical problem to be solved by those skilled in the art.

发明内容Contents of the invention

本申请的目的在于提供一种负载均衡方法、装置、系统、一种负载均衡系统的创建方法、装置及一种电子设备和一种计算机可读存储介质,实现了对跨多子网的多个虚拟化服务器七层负载均衡。The purpose of this application is to provide a load balancing method, device, system, a method for creating a load balancing system, a device, an electronic device, and a computer-readable storage medium, so as to realize multiple load balancing across multiple subnets. Layer-7 load balancing of virtualized servers.

为实现上述目的,本申请提供了一种负载均衡方法,应用于负载均衡系统中的七层负载均衡器,所述负载均衡系统包括虚拟网关、与所述虚拟网关关联的虚拟路由器、与所述虚拟路由器关联的多个虚拟交换机,与任一个所述虚拟交换机关联的所述七层负载均衡器、与所述七层负载均衡器关联的服务池,每个所述虚拟交换机形成对应的子网,每个所述子网分别关联多个虚拟服务器,所述服务池中包含每个子网关联的至少一个虚拟服务器;In order to achieve the above purpose, the present application provides a load balancing method, which is applied to a seven-layer load balancer in a load balancing system, and the load balancing system includes a virtual gateway, a virtual router associated with the virtual gateway, and the A plurality of virtual switches associated with a virtual router, the layer-7 load balancer associated with any one of the virtual switches, and the service pool associated with the layer-7 load balancer, each of the virtual switches forms a corresponding subnet , each subnet is associated with a plurality of virtual servers, and the service pool includes at least one virtual server associated with each subnet;

所述方法包括:The methods include:

接收客户端的请求,并根据所述请求在所述服务池中确定目标虚拟服务器;receiving a request from a client, and determining a target virtual server in the service pool according to the request;

判断所述目标虚拟服务器所在的子网与所述七层负载均衡器关联的子网是否相同;Judging whether the subnet where the target virtual server is located is the same as the subnet associated with the layer-7 load balancer;

若否,则将所述请求依次通过所述七层负载均衡器关联的虚拟交换机、所述虚拟路由器、所述目标虚拟服务器所在的子网对应的虚拟交换机发送至所述目标虚拟服务器,并依次通过所述目标虚拟服务器所在的子网对应的虚拟交换机、所述虚拟路由器、所述七层负载均衡器关联的虚拟交换机接收所述目标虚拟服务器对所述请求的响应;If not, the request is sequentially sent to the target virtual server through the virtual switch associated with the layer-7 load balancer, the virtual router, and the virtual switch corresponding to the subnet where the target virtual server is located, and sequentially receiving the response of the target virtual server to the request through the virtual switch corresponding to the subnet where the target virtual server is located, the virtual router, and the virtual switch associated with the layer-7 load balancer;

将所述响应返回至所述客户端。The response is returned to the client.

其中,所述判断所述目标虚拟服务器所在的子网与所述七层负载均衡器关联的子网是否相同之后,还包括:Wherein, after the judging whether the subnet where the target virtual server is located is the same as the subnet associated with the layer-7 load balancer, it also includes:

若所述目标虚拟服务器所在的子网与所述七层负载均衡器关联的子网相同,则将所述请求通过所述七层负载均衡器关联的虚拟交换机发送至所述目标虚拟服务器,并通过所述七层负载均衡器关联的虚拟交换机接收所述目标虚拟服务器对所述请求的响应。If the subnet where the target virtual server is located is the same as the subnet associated with the layer-7 load balancer, the request is sent to the target virtual server through the virtual switch associated with the layer-7 load balancer, and A response of the target virtual server to the request is received through a virtual switch associated with the layer-7 load balancer.

其中,所述接收客户端的请求,包括:Wherein, the request of receiving the client includes:

依次通过所述虚拟网关、所述虚拟路由器和所述七层负载均衡器关联的虚拟交换机接收公网客户端的请求;Receive the request of the public network client through the virtual gateway, the virtual router, and the virtual switch associated with the seven-layer load balancer in turn;

相应的,将所述响应返回至所述客户端,包括:Correspondingly, return the response to the client, including:

依次通过所述七层负载均衡器关联的虚拟交换机、所述虚拟路由器和所述虚拟网关将所述响应返回至所述公网客户端。Returning the response to the public network client through the virtual switch associated with the layer-7 load balancer, the virtual router, and the virtual gateway in sequence.

其中,所述接收客户端的请求,包括:Wherein, the request of receiving the client includes:

接收目标子网中子网客户端的请求;Receive requests from subnet clients in the target subnet;

相应的,将所述响应返回至所述客户端,包括:Correspondingly, return the response to the client, including:

将所述响应返回至所述子网客户端。The response is returned to the subnet client.

其中,所述接收目标子网中子网客户端的请求,包括:Wherein, the receiving the request of the subnet client in the target subnet includes:

若所述目标子网与所述七层负载均衡器关联的子网相同,则通过所述目标子网对应的虚拟交换机接收所述目标子网中子网客户端的请求;If the target subnet is the same as the subnet associated with the layer-7 load balancer, receiving a request from a subnet client in the target subnet through a virtual switch corresponding to the target subnet;

相应的,将所述响应返回至所述子网客户端,包括:Correspondingly, return the response to the subnet client, including:

通过所述目标子网对应的虚拟交换机将所述响应返回至所述子网客户端。Returning the response to the subnet client through the virtual switch corresponding to the target subnet.

其中,所述接收目标子网中子网客户端的请求,包括:Wherein, the receiving the request of the subnet client in the target subnet includes:

若所述目标子网与所述七层负载均衡器关联的子网不同,则依次通过所述目标子网对应的虚拟交换机、所述虚拟路由器、所述七层负载均衡器关联的虚拟交换机接收所述目标子网中子网客户端的请求;If the target subnet is different from the subnet associated with the layer-7 load balancer, the virtual switch corresponding to the target subnet, the virtual router, and the virtual switch associated with the layer-7 load balancer are received in sequence a request from a subnet client in the target subnet;

相应的,将所述响应返回至所述子网客户端,包括:Correspondingly, return the response to the subnet client, including:

依次通过所述七层负载均衡器关联的虚拟交换机、所述虚拟路由器、所述目标子网对应的虚拟交换机将所述响应返回至所述子网客户端。The response is returned to the subnet client through the virtual switch associated with the layer-7 load balancer, the virtual router, and the virtual switch corresponding to the target subnet in sequence.

为实现上述目的,本申请提供了一种负载均衡系统的创建方法,包括:To achieve the above purpose, this application provides a method for creating a load balancing system, including:

创建虚拟路由器和虚拟网关,将所述虚拟网关关联至所述虚拟路由器;其中,所述虚拟网关用于提供浮动IP地址;Create a virtual router and a virtual gateway, and associate the virtual gateway to the virtual router; wherein the virtual gateway is used to provide a floating IP address;

创建多个虚拟交换机关联至所述虚拟路由器,每个所述虚拟交换机形成对应的子网;creating a plurality of virtual switches associated with the virtual router, each of the virtual switches forming a corresponding subnet;

创建多个包含多个虚拟服务器的虚拟服务器集群,设置每个所述虚拟服务器的IP地址,并将每个所述虚拟服务器集群中的虚拟服务器分别关联至对应的虚拟交换机中,以将每个所述虚拟服务器集群中的虚拟服务器加入所述虚拟交换机对应的子网中;Create a plurality of virtual server clusters that contain multiple virtual servers, set the IP address of each virtual server, and associate each virtual server in the virtual server cluster with a corresponding virtual switch, so that each The virtual server in the virtual server cluster joins the subnet corresponding to the virtual switch;

创建服务池,设置所述服务池的端口,将每个所述子网中的至少一个虚拟服务器关联到所述服务池;其中,所述服务池的端口为所述服务池中的虚拟服务器提供真实服务的端口;Create a service pool, set the port of the service pool, and associate at least one virtual server in each of the subnets with the service pool; wherein, the port of the service pool is provided for the virtual server in the service pool The port of the real service;

基于预置包含七层负载均衡器的系统镜像创建七层负载均衡器,将所述七层负载均衡器关联至任一个所述虚拟交换机,设置所述七层负载均衡器的IP地址和端口;其中,所述七层负载均衡器的IP地址在关联的虚拟交换机对应的子网的范围内;Create a layer-7 load balancer based on a preset system image containing a layer-7 load balancer, associate the layer-7 load balancer with any one of the virtual switches, and set the IP address and port of the layer-7 load balancer; Wherein, the IP address of the seven-layer load balancer is within the scope of the subnet corresponding to the associated virtual switch;

将所述服务池关联至所述七层负载均衡器,在所述七层负载均衡器中配置所述服务池中的虚拟服务器的IP地址与所述服务池的端口之间的对应关系。Associating the service pool with the layer-7 load balancer, and configuring the corresponding relationship between the IP addresses of the virtual servers in the service pool and the ports of the service pool in the layer-7 load balancer.

其中,将所述服务池关联至所述七层负载均衡器之后,还包括:Wherein, after associating the service pool with the seven-layer load balancer, it also includes:

解绑与所述七层负载均衡器关联的服务池,并将新的服务池关联至所述七层负载均衡器。Unbinding the service pool associated with the layer-7 load balancer, and associating a new service pool with the layer-7 load balancer.

其中,所述将每个所述子网中的至少一个虚拟服务器关联到所述服务池之后,还包括:Wherein, after associating at least one virtual server in each of the subnets with the service pool, further includes:

在所述服务池中添加新的虚拟服务器;adding a new virtual server in said service pool;

或,删除所述服务池中的虚拟服务器。Or, delete the virtual server in the service pool.

其中,所述创建多个虚拟交换机关联至所述虚拟路由器之后,还包括:Wherein, after creating a plurality of virtual switches associated with the virtual router, it also includes:

将新的虚拟交换机关联至所述虚拟路由器;associating a new virtual switch to the virtual router;

或,删除所述虚拟交换机关联的虚拟交换机。Or, delete the virtual switch associated with the virtual switch.

为实现上述目的,本申请提供了一种负载均衡装置,应用于负载均衡系统中的七层负载均衡器,所述负载均衡系统包括虚拟网关、与所述虚拟网关关联的虚拟路由器、与所述虚拟路由器关联的多个虚拟交换机,与任一个所述虚拟交换机关联的所述七层负载均衡器、与所述七层负载均衡器关联的服务池,每个所述虚拟交换机形成对应的子网,每个所述子网分别关联多个虚拟服务器,所述服务池中包含每个子网关联的至少一个虚拟服务器;In order to achieve the above purpose, the present application provides a load balancing device, which is applied to a seven-layer load balancer in a load balancing system, and the load balancing system includes a virtual gateway, a virtual router associated with the virtual gateway, and the A plurality of virtual switches associated with a virtual router, the layer-7 load balancer associated with any one of the virtual switches, and the service pool associated with the layer-7 load balancer, each of the virtual switches forms a corresponding subnet , each subnet is associated with a plurality of virtual servers, and the service pool includes at least one virtual server associated with each subnet;

所述装置包括:The devices include:

确定模块,用于接收客户端的请求,并根据所述请求在所述服务池中确定目标虚拟服务器;A determining module, configured to receive a request from a client, and determine a target virtual server in the service pool according to the request;

判断模块,用于判断所述目标虚拟服务器所在的子网与所述七层负载均衡器关联的子网是否相同;A judging module, configured to judge whether the subnet where the target virtual server is located is the same as the subnet associated with the layer-7 load balancer;

第一响应模块,用于当所述目标虚拟服务器所在的子网与所述七层负载均衡器关联的子网不同时,将所述请求依次通过所述七层负载均衡器关联的虚拟交换机、所述虚拟路由器、所述目标虚拟服务器所在的子网对应的虚拟交换机发送至所述目标虚拟服务器,并依次通过所述目标虚拟服务器所在的子网对应的虚拟交换机、所述虚拟路由器、所述七层负载均衡器关联的虚拟交换机接收所述目标虚拟服务器对所述请求的响应;The first response module is configured to pass the request sequentially through the virtual switch associated with the layer-7 load balancer when the subnet where the target virtual server is located is different from the subnet associated with the layer-7 load balancer, The virtual router and the virtual switch corresponding to the subnet where the target virtual server is located send to the target virtual server, and sequentially pass through the virtual switch corresponding to the subnet where the target virtual server is located, the virtual router, the The virtual switch associated with the seven-layer load balancer receives the response of the target virtual server to the request;

返回模块,用于将所述响应返回至所述客户端。A return module, configured to return the response to the client.

为实现上述目的,本申请提供了一种负载均衡系统的创建装置,包括:To achieve the above purpose, the present application provides a device for creating a load balancing system, including:

第一创建模块,用于创建虚拟路由器和虚拟网关,将所述虚拟网关关联至所述虚拟路由器;其中,所述虚拟网关用于提供浮动IP地址;The first creation module is used to create a virtual router and a virtual gateway, and associate the virtual gateway with the virtual router; wherein, the virtual gateway is used to provide a floating IP address;

第二创建模块,用于创建多个虚拟交换机关联至所述虚拟路由器,每个所述虚拟交换机形成对应的子网;The second creation module is used to create a plurality of virtual switches associated with the virtual router, and each of the virtual switches forms a corresponding subnet;

第三创建模块,用于创建多个包含多个虚拟服务器的虚拟服务器集群,设置每个所述虚拟服务器的IP地址,并将每个所述虚拟服务器集群中的虚拟服务器分别关联至对应的虚拟交换机中,以将每个所述虚拟服务器集群中的虚拟服务器加入所述虚拟交换机对应的子网中;The third creation module is used to create a plurality of virtual server clusters containing a plurality of virtual servers, set the IP address of each virtual server, and associate each virtual server in the virtual server cluster with the corresponding virtual server In the switch, the virtual server in each virtual server cluster is added to the subnet corresponding to the virtual switch;

第四创建模块,用于创建服务池,设置所述服务池的端口,将每个所述子网中的至少一个虚拟服务器关联到所述服务池;其中,所述服务池的端口为所述服务池中的虚拟服务器提供真实服务的端口;The fourth creation module is used to create a service pool, set the port of the service pool, and associate at least one virtual server in each subnet with the service pool; wherein, the port of the service pool is the The virtual server in the service pool provides the port of the real service;

第五创建模块,用于基于预置包含七层负载均衡器的系统镜像创建七层负载均衡器,将所述七层负载均衡器关联至任一个所述虚拟交换机,设置所述七层负载均衡器的IP地址和端口;其中,所述七层负载均衡器的IP地址在关联的虚拟交换机对应的子网的范围内;The fifth creation module is used to create a layer-7 load balancer based on a preset system image containing a layer-7 load balancer, associate the layer-7 load balancer with any one of the virtual switches, and set the layer-7 load balancer The IP address and port of the load balancer; wherein, the IP address of the seven-layer load balancer is within the scope of the subnet corresponding to the associated virtual switch;

关联模块,用于将所述服务池关联至所述七层负载均衡器,在所述七层负载均衡器中配置所述服务池中的虚拟服务器的IP地址与所述服务池的端口之间的对应关系。An association module, configured to associate the service pool with the seven-layer load balancer, and configure the connection between the IP address of the virtual server in the service pool and the port of the service pool in the seven-layer load balancer corresponding relationship.

为实现上述目的,本申请提供了一种负载均衡系统,包括:To achieve the above purpose, the application provides a load balancing system, including:

与公网连接的虚拟网关;A virtual gateway connected to the public network;

与所述虚拟网关关联的虚拟路由器;a virtual router associated with said virtual gateway;

与所述虚拟路由器关联的多个虚拟交换机;其中,每个所述虚拟交换机形成对应的子网,每个所述子网分别关联对应的虚拟服务器集群,每个所述虚拟服务器集群包括多个虚拟服务器;A plurality of virtual switches associated with the virtual router; wherein each of the virtual switches forms a corresponding subnet, and each of the subnets is associated with a corresponding virtual server cluster, and each of the virtual server clusters includes multiple virtual server;

与任一个所述虚拟交换机关联的七层负载均衡器;a Layer 7 load balancer associated with any one of said virtual switches;

与所述七层负载均衡器关联的服务池;其中,所述服务池中包含每个所述子网关联的至少一个虚拟服务器。A service pool associated with the seven-layer load balancer; wherein, the service pool includes at least one virtual server associated with each of the subnets.

为实现上述目的,本申请提供了一种电子设备,包括:In order to achieve the above purpose, the application provides an electronic device, including:

存储器,用于存储计算机程序;memory for storing computer programs;

处理器,用于执行所述计算机程序时实现如上述负载均衡方法或负载均衡系统的创建方法的步骤。A processor configured to implement the steps of the load balancing method or the method for creating a load balancing system as described above when executing the computer program.

为实现上述目的,本申请提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如上述负载均衡方法或负载均衡系统的创建方法的步骤。In order to achieve the above object, the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the above load balancing method or load balancing system is implemented. Steps to create a method.

通过以上方案可知,本申请提供的一种负载均衡方法,应用于负载均衡系统中的七层负载均衡器,所述负载均衡系统包括虚拟网关、与所述虚拟网关关联的虚拟路由器、与所述虚拟路由器关联的多个虚拟交换机,与任一个所述虚拟交换机关联的所述七层负载均衡器、与所述七层负载均衡器关联的服务池,每个所述虚拟交换机形成对应的子网,每个所述子网分别关联多个虚拟服务器,所述服务池中包含每个子网关联的至少一个虚拟服务器;所述方法包括:接收客户端的请求,并根据所述请求在所述服务池中确定目标虚拟服务器;判断所述目标虚拟服务器所在的子网与所述七层负载均衡器关联的子网是否相同;若否,则将所述请求依次通过所述七层负载均衡器关联的虚拟交换机、所述虚拟路由器、所述目标虚拟服务器所在的子网对应的虚拟交换机发送至所述目标虚拟服务器,并依次通过所述目标虚拟服务器所在的子网对应的虚拟交换机、所述虚拟路由器、所述七层负载均衡器关联的虚拟交换机接收所述目标虚拟服务器对所述请求的响应;将所述响应返回至所述客户端。From the above solutions, it can be seen that a load balancing method provided by the present application is applied to a seven-layer load balancer in a load balancing system, and the load balancing system includes a virtual gateway, a virtual router associated with the virtual gateway, and the A plurality of virtual switches associated with a virtual router, the layer-7 load balancer associated with any one of the virtual switches, and the service pool associated with the layer-7 load balancer, each of the virtual switches forms a corresponding subnet , each of the subnets is associated with a plurality of virtual servers, and the service pool contains at least one virtual server associated with each subnet; the method includes: receiving a request from a client, and according to the request in the service pool determine the target virtual server; determine whether the subnet where the target virtual server is located is the same as the subnet associated with the seven-layer load balancer; if not, then pass the request sequentially through the associated seven-layer load balancer The virtual switch, the virtual router, and the virtual switch corresponding to the subnet where the target virtual server is located send to the target virtual server, and pass through the virtual switch corresponding to the subnet where the target virtual server is located, and the virtual router in turn . The virtual switch associated with the layer-7 load balancer receives a response from the target virtual server to the request; and returns the response to the client.

本申请基于现有的虚拟化平台,该平台可以方便控制子网和虚拟路由的关联关系以及子网和虚拟服务器的关联关系,通过新增可控的七层负载均衡器和子网的关联关系、服务池和虚拟服务器的关联关系以及七层负载均衡器和服务池的关联关系,可以实现对跨多子网环境的虚拟服务器七层负载均衡,灵活控制被七层负载均衡器代理的虚拟服务器范围,被七层负载均衡器代理的虚拟服务器控制粒度最大为一个服务池,最小为一台虚拟服务器,而相关技术中的负载均衡器控制粒度都是一台服务器,本申请扩大了控制粒度提高了部署效率。本申请还公开了一种负载均衡装置、系统、一种负载均衡系统的创建方法、装置及一种电子设备和一种计算机可读存储介质,同样能实现上述技术效果。This application is based on the existing virtualization platform, which can conveniently control the relationship between subnets and virtual routes and the relationship between subnets and virtual servers. By adding a controllable seven-layer load balancer and the relationship between subnets, The relationship between the service pool and the virtual server and the relationship between the seven-layer load balancer and the service pool can realize the seven-layer load balancing of the virtual server across the multi-subnet environment, and flexibly control the range of virtual servers proxied by the seven-layer load balancer , the maximum control granularity of the virtual server proxied by the seven-layer load balancer is a service pool, and the minimum is a virtual server, and the control granularity of the load balancer in the related art is a server. This application expands the control granularity and improves the deployment efficiency. The present application also discloses a load balancing device and system, a creation method and device of a load balancing system, an electronic device, and a computer-readable storage medium, which can also achieve the above-mentioned technical effects.

应当理解的是,以上的一般描述和后文的细节描述仅是示例性的,并不能限制本申请。It is to be understood that both the foregoing general description and the following detailed description are exemplary only and are not restrictive of the application.

附图说明Description of drawings

为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。附图是用来提供对本公开的进一步理解,并且构成说明书的一部分,与下面的具体实施方式一起用于解释本公开,但并不构成对本公开的限制。在附图中:In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present application. Those skilled in the art can also obtain other drawings based on these drawings without creative work. The accompanying drawings are used to provide a further understanding of the present disclosure, and constitute a part of the description, together with the following specific embodiments, are used to explain the present disclosure, but do not constitute a limitation to the present disclosure. In the attached picture:

图1为根据一示例性实施例示出的一种负载均衡系统的结构图;FIG. 1 is a structural diagram of a load balancing system according to an exemplary embodiment;

图2为根据一示例性实施例示出的一种负载均衡方法的流程图;Fig. 2 is a flow chart showing a load balancing method according to an exemplary embodiment;

图3为根据一示例性实施例示出的另一种负载均衡方法的流程图;Fig. 3 is a flow chart showing another load balancing method according to an exemplary embodiment;

图4为根据一示例性实施例示出的油一种负载均衡方法的流程图;Fig. 4 is a flowchart of a load balancing method according to an exemplary embodiment;

图5为根据一示例性实施例示出的一种负载均衡系统的创建方法的流程图;Fig. 5 is a flow chart showing a method for creating a load balancing system according to an exemplary embodiment;

图6为根据一示例性实施例示出的另一种负载均衡系统的结构图;Fig. 6 is a structural diagram of another load balancing system shown according to an exemplary embodiment;

图7为根据一示例性实施例示出的一种七层负载均衡器访问服务池的数据流示意图;Fig. 7 is a schematic diagram of a data flow of a seven-layer load balancer accessing a service pool according to an exemplary embodiment;

图8为根据一示例性实施例示出的一种子网用户访问七层负载均衡器的数据流示意图;FIG. 8 is a schematic diagram of a data flow of a subnet user accessing a layer-7 load balancer according to an exemplary embodiment;

图9为根据一示例性实施例示出的一种公网用户访问七层负载均衡器的数据流示意图;FIG. 9 is a schematic diagram of a data flow of a public network user accessing a layer-7 load balancer according to an exemplary embodiment;

图10为根据一示例性实施例示出的一种负载均衡装置的结构图;Fig. 10 is a structural diagram of a load balancing device according to an exemplary embodiment;

图11为根据一示例性实施例示出的一种负载均衡系统的创建装置的结构图;Fig. 11 is a structural diagram of an apparatus for creating a load balancing system according to an exemplary embodiment;

图12为根据一示例性实施例示出的一种电子设备的结构图。Fig. 12 is a structural diagram of an electronic device according to an exemplary embodiment.

具体实施方式detailed description

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。另外,在本申请实施例中,“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Apparently, the described embodiments are only some of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of this application. In addition, in the embodiments of the present application, "first", "second", etc. are used to distinguish similar objects, and are not necessarily used to describe a specific sequence or sequence.

本实施例提供一种负载均衡系统,实现了对跨多子网的多个虚拟化服务器七层负载均衡。This embodiment provides a load balancing system, which implements layer-7 load balancing for multiple virtualized servers spanning multiple subnets.

参见图1,图1为根据一示例性实施例示出的一种负载均衡系统的结构图,如图1所示,包括:Referring to FIG. 1, FIG. 1 is a structural diagram of a load balancing system according to an exemplary embodiment, as shown in FIG. 1, including:

与公网连接的虚拟网关10;A virtual gateway 10 connected to the public network;

与所述虚拟网关10关联的虚拟路由器20;A virtual router 20 associated with the virtual gateway 10;

与所述虚拟路由器20关联的多个虚拟交换机30;其中,每个所述虚拟交换机形成对应的子网,每个所述子网分别关联对应的虚拟服务器集群40,每个所述虚拟服务器集群40包括多个虚拟服务器401;A plurality of virtual switches 30 associated with the virtual router 20; wherein each of the virtual switches forms a corresponding subnet, and each of the subnets is associated with a corresponding virtual server cluster 40, and each of the virtual server clusters 40 includes a plurality of virtual servers 401;

与任一个所述虚拟交换机30关联的七层负载均衡器50;A seven-layer load balancer 50 associated with any one of the virtual switches 30;

与所述七层负载均衡器50关联的服务池60;其中,所述服务池60中包含每个所述子网关联的至少一个虚拟服务器401。A service pool 60 associated with the layer-7 load balancer 50; wherein, the service pool 60 includes at least one virtual server 401 associated with each subnet.

在具体实施中,虚拟路由器与多个子网关联,每个子网分别关联一个虚拟服务器集群。七层负载均衡器与任一个子网关联,实现与多个虚拟服务器集群互通。每个虚拟服务器集群中一个或多个虚拟服务器加入服务池,服务池关联七层负载均衡器,七层负载均衡器为这个服务池提供负载均衡。虚拟网关与虚拟路由器关联,虚拟网关对外提供浮动IP,用于七层负载均衡器连接公网。In a specific implementation, the virtual router is associated with multiple subnets, and each subnet is associated with a virtual server cluster. The seven-layer load balancer is associated with any subnet to realize intercommunication with multiple virtual server clusters. One or more virtual servers in each virtual server cluster join the service pool, and the service pool is associated with a layer-7 load balancer, which provides load balancing for the service pool. The virtual gateway is associated with the virtual router, and the virtual gateway provides a floating IP externally, which is used for the seven-layer load balancer to connect to the public network.

本申请实施例基于现有的虚拟化平台,该平台可以方便控制子网和虚拟路由的关联关系以及子网和虚拟服务器的关联关系,通过新增可控的七层负载均衡器和子网的关联关系、服务池和虚拟服务器的关联关系以及七层负载均衡器和服务池的关联关系,可以实现对跨多子网环境的虚拟服务器七层负载均衡,灵活控制被七层负载均衡器代理的虚拟服务器范围,被七层负载均衡器代理的虚拟服务器控制粒度最大为一个服务池,最小为一台虚拟服务器,而相关技术中的负载均衡器控制粒度都是一台服务器,本申请实施例扩大了控制粒度提高了部署效率。The embodiment of the present application is based on the existing virtualization platform, which can conveniently control the relationship between subnets and virtual routes and the relationship between subnets and virtual servers. By adding a controllable seven-layer load balancer and subnet association relationship, the association between service pools and virtual servers, and the association between layer-7 load balancers and service pools, which can realize layer-7 load balancing of virtual servers across multiple subnet environments, and flexibly control the virtual servers proxied by layer-7 load balancers. In the range of servers, the control granularity of the virtual server proxied by the seven-layer load balancer is at most one service pool, and the minimum is one virtual server, while the control granularity of the load balancer in the related art is one server, the embodiment of this application expands Granularity of control improves deployment efficiency.

本实施例提供一种负载均衡方法,应用于上述负载均衡系统中的七层负载均衡器。参见图2,图2为根据一示例性实施例示出的一种负载均衡方法的流程图,如图2所示,包括:This embodiment provides a load balancing method, which is applied to the seven-layer load balancer in the above load balancing system. Referring to FIG. 2, FIG. 2 is a flowchart of a load balancing method according to an exemplary embodiment, as shown in FIG. 2, including:

S101:接收客户端的请求,并根据所述请求在所述服务池中确定目标虚拟服务器;S101: Receive a request from a client, and determine a target virtual server in the service pool according to the request;

本实施例的执行主体为上述负载均衡系统中的七层负载均衡器。在具体实施中,客户端向负载均衡系统发送请求,该客户端可以为公网客户端,通过虚拟网关对外提供的浮动IP地址访问负载均衡系统,该客户端也可以为负载均衡系统中某一子网中的客户端,在此不进行具体限定。七层负载均衡器接收到客户端的请求时,访问服务池确定目标虚拟服务器。The execution subject of this embodiment is the seven-layer load balancer in the above load balancing system. In the specific implementation, the client sends a request to the load balancing system. The client can be a public network client and access the load balancing system through the floating IP address provided by the virtual gateway. The client can also be a server in the load balancing system. Clients in the subnet are not specifically limited here. When the seven-layer load balancer receives a request from a client, the access service pool determines the target virtual server.

S102:判断所述目标虚拟服务器所在的子网与所述七层负载均衡器关联的子网是否相同;若是,则进入S103;若否,则进入S104;S102: Determine whether the subnet where the target virtual server is located is the same as the subnet associated with the layer-7 load balancer; if yes, proceed to S103; if not, proceed to S104;

S103:将所述请求通过所述七层负载均衡器关联的虚拟交换机发送至所述目标虚拟服务器,并通过所述七层负载均衡器关联的虚拟交换机接收所述目标虚拟服务器对所述请求的响应;S103: Send the request to the target virtual server through the virtual switch associated with the layer-7 load balancer, and receive the request from the target virtual server through the virtual switch associated with the layer-7 load balancer response;

S104:将所述请求依次通过所述七层负载均衡器关联的虚拟交换机、所述虚拟路由器、所述目标虚拟服务器所在的子网对应的虚拟交换机发送至所述目标虚拟服务器,并依次通过所述目标虚拟服务器所在的子网对应的虚拟交换机、所述虚拟路由器、所述七层负载均衡器关联的虚拟交换机接收所述目标虚拟服务器对所述请求的响应;S104: Send the request to the target virtual server sequentially through the virtual switch associated with the layer-7 load balancer, the virtual router, and the virtual switch corresponding to the subnet where the target virtual server is located, and sequentially pass through the The virtual switch corresponding to the subnet where the target virtual server is located, the virtual router, and the virtual switch associated with the seven-layer load balancer receive the response of the target virtual server to the request;

在具体实施中,若目标虚拟服务器所在的子网与七层负载均衡器关联的子网是否相同,则七层负载均衡器通过该子网对应的虚拟交换机将客户端的请求发送至目标虚拟服务器,并接收目标虚拟服务器对请求的响应。In a specific implementation, if the subnet where the target virtual server is located is the same as the subnet associated with the layer-7 load balancer, the layer-7 load balancer sends the client's request to the target virtual server through the virtual switch corresponding to the subnet, And receive the target virtual server's response to the request.

S105:将所述响应返回至所述客户端。S105: Return the response to the client.

在具体实施中,七层负载均衡器将目标虚拟服务器对请求的响应返回至客户端。In a specific implementation, the seven-layer load balancer returns the target virtual server's response to the request to the client.

本申请实施例基于现有的虚拟化平台,该平台可以方便控制子网和虚拟路由的关联关系以及子网和虚拟服务器的关联关系,通过新增可控的七层负载均衡器和子网的关联关系、服务池和虚拟服务器的关联关系以及七层负载均衡器和服务池的关联关系,可以实现对跨多子网环境的虚拟服务器七层负载均衡,灵活控制被七层负载均衡器代理的虚拟服务器范围,被七层负载均衡器代理的虚拟服务器控制粒度最大为一个服务池,最小为一台虚拟服务器,而相关技术中的负载均衡器控制粒度都是一台服务器,本申请实施例扩大了控制粒度提高了部署效率。The embodiment of the present application is based on the existing virtualization platform, which can conveniently control the relationship between subnets and virtual routes and the relationship between subnets and virtual servers. By adding a controllable seven-layer load balancer and subnet association relationship, the association between service pools and virtual servers, and the association between layer-7 load balancers and service pools, which can realize layer-7 load balancing of virtual servers across multiple subnet environments, and flexibly control the virtual servers proxied by layer-7 load balancers. In the range of servers, the control granularity of the virtual server proxied by the seven-layer load balancer is at most one service pool, and the minimum is one virtual server, while the control granularity of the load balancer in the related art is one server, the embodiment of this application expands Granularity of control improves deployment efficiency.

本申请实施例公开了一种负载均衡方法,相对于上一实施例,本实施例对技术方案作了进一步的说明和优化。具体的:The embodiment of the present application discloses a load balancing method. Compared with the previous embodiment, this embodiment further explains and optimizes the technical solution. specific:

参见图3,根据一示例性实施例示出的另一种负载均衡方法的流程图,如图3所示,包括:Referring to FIG. 3 , a flow chart of another load balancing method shown according to an exemplary embodiment, as shown in FIG. 3 , includes:

S201:依次通过所述虚拟网关、所述虚拟路由器和所述七层负载均衡器关联的虚拟交换机接收公网客户端的请求;S201: Receive a request from a public network client through the virtual gateway, the virtual router, and the virtual switch associated with the layer-7 load balancer in sequence;

在本实施例中,公网客户端通过虚拟网关对外提供的浮动IP地址访问负载均衡系统,也即向虚拟网关发送请求,虚拟网关将该请求发送至虚拟路由器,虚拟路由器将该请求发送至七层负载均衡器关联的虚拟交换机,该虚拟交换机将该请求发送至七层负载均衡器。In this embodiment, the public network client accesses the load balancing system through the floating IP address provided by the virtual gateway, that is, sends a request to the virtual gateway, the virtual gateway sends the request to the virtual router, and the virtual router sends the request to the seven The virtual switch associated with the layer load balancer, which sends the request to the layer-7 load balancer.

S202:根据所述请求在所述服务池中确定目标虚拟服务器;S202: Determine a target virtual server in the service pool according to the request;

S203:判断所述目标虚拟服务器所在的子网与所述七层负载均衡器关联的子网是否相同;若是,则进入S204;若否,则进入S205;S203: Determine whether the subnet where the target virtual server is located is the same as the subnet associated with the layer-7 load balancer; if yes, proceed to S204; if not, proceed to S205;

S204:将所述请求通过所述七层负载均衡器关联的虚拟交换机发送至所述目标虚拟服务器,并通过所述七层负载均衡器关联的虚拟交换机接收所述目标虚拟服务器对所述请求的响应;S204: Send the request to the target virtual server through the virtual switch associated with the layer-7 load balancer, and receive the request from the target virtual server through the virtual switch associated with the layer-7 load balancer response;

S205:将所述请求依次通过所述七层负载均衡器关联的虚拟交换机、所述虚拟路由器、所述目标虚拟服务器所在的子网对应的虚拟交换机发送至所述目标虚拟服务器,并依次通过所述目标虚拟服务器所在的子网对应的虚拟交换机、所述虚拟路由器、所述七层负载均衡器关联的虚拟交换机接收所述目标虚拟服务器对所述请求的响应;S205: Send the request to the target virtual server sequentially through the virtual switch associated with the layer-7 load balancer, the virtual router, and the virtual switch corresponding to the subnet where the target virtual server is located, and sequentially pass through the The virtual switch corresponding to the subnet where the target virtual server is located, the virtual router, and the virtual switch associated with the seven-layer load balancer receive the response of the target virtual server to the request;

S206:依次通过所述七层负载均衡器关联的虚拟交换机、所述虚拟路由器和所述虚拟网关将所述响应返回至所述公网客户端。S206: Return the response to the public network client through the virtual switch associated with the layer-7 load balancer, the virtual router, and the virtual gateway in sequence.

在具体实施中,七层负载均衡器基于接收请求的路径将目标虚拟服务器对请求的响应返回至公网客户端,也即依次通过七层负载均衡器关联的虚拟交换机、虚拟路由器和虚拟网关将响应返回至公网客户端。In the specific implementation, the seven-layer load balancer returns the response of the target virtual server to the request to the public network client based on the path of the received request, that is, through the virtual switch, virtual router and virtual gateway associated with the seven-layer load balancer in turn. The response is returned to the public network client.

本申请实施例公开了一种负载均衡方法,相对于第一个负载均衡方法的实施例,本实施例对技术方案作了进一步的说明和优化。具体的:The embodiment of the present application discloses a load balancing method. Compared with the first embodiment of the load balancing method, this embodiment further explains and optimizes the technical solution. specific:

参见图4,根据一示例性实施例示出的又一种负载均衡方法的流程图,如图4所示,包括:Referring to FIG. 4 , a flow chart of another load balancing method shown according to an exemplary embodiment, as shown in FIG. 4 , includes:

S301:接收目标子网中子网客户端的请求;S301: Receive a request from a subnet client in the target subnet;

在本实施例中,目标子网为负载均衡系统中的一个子网,目标子网可以与七层负载均衡器关联的子网相同,也可以与七层负载均衡器关联的子网不同,在此不进行具体限定。目标子网中的子网客户端可以通过负载均衡系统中的关联关系访问七层负载均衡器,也即向七层负载均衡器发送请求。In this embodiment, the target subnet is a subnet in the load balancing system. The target subnet can be the same as the subnet associated with the Layer 7 load balancer, or it can be different from the subnet associated with the Layer 7 load balancer. This is not specifically limited. Subnet clients in the target subnet can access the layer-7 load balancer through the association relationship in the load balancing system, that is, send requests to the layer-7 load balancer.

S302:根据所述请求在所述服务池中确定目标虚拟服务器;S302: Determine a target virtual server in the service pool according to the request;

S303:判断所述目标虚拟服务器所在的子网与所述七层负载均衡器关联的子网是否相同;若是,则进入S304;若否,则进入S305;S303: Determine whether the subnet where the target virtual server is located is the same as the subnet associated with the layer-7 load balancer; if yes, proceed to S304; if not, proceed to S305;

S304:将所述请求通过所述七层负载均衡器关联的虚拟交换机发送至所述目标虚拟服务器,并通过所述七层负载均衡器关联的虚拟交换机接收所述目标虚拟服务器对所述请求的响应;S304: Send the request to the target virtual server through the virtual switch associated with the layer-7 load balancer, and receive the request from the target virtual server through the virtual switch associated with the layer-7 load balancer response;

S305:将所述请求依次通过所述七层负载均衡器关联的虚拟交换机、所述虚拟路由器、所述目标虚拟服务器所在的子网对应的虚拟交换机发送至所述目标虚拟服务器,并依次通过所述目标虚拟服务器所在的子网对应的虚拟交换机、所述虚拟路由器、所述七层负载均衡器关联的虚拟交换机接收所述目标虚拟服务器对所述请求的响应;S305: Send the request to the target virtual server sequentially through the virtual switch associated with the layer-7 load balancer, the virtual router, and the virtual switch corresponding to the subnet where the target virtual server is located, and sequentially pass through the The virtual switch corresponding to the subnet where the target virtual server is located, the virtual router, and the virtual switch associated with the seven-layer load balancer receive the response of the target virtual server to the request;

S306:将所述响应返回至所述子网客户端。S306: Return the response to the subnet client.

在具体实施中,七层负载均衡器基于接收请求的路径将目标虚拟服务器对请求的响应返回至子网客户端。In a specific implementation, the seven-layer load balancer returns the response of the target virtual server to the request to the subnet client based on the path of the received request.

作为一种可行的实施方式,所述接收目标子网中子网客户端的请求,包括:若所述目标子网与所述七层负载均衡器关联的子网相同,则通过所述目标子网对应的虚拟交换机接收所述目标子网中子网客户端的请求;相应的,将所述响应返回至所述子网客户端,包括:通过所述目标子网对应的虚拟交换机将所述响应返回至所述子网客户端。As a feasible implementation manner, the receiving the request from the subnet client in the target subnet includes: if the target subnet is the same as the subnet associated with the layer-7 load balancer, passing through the target subnet The corresponding virtual switch receives the request from the subnet client in the target subnet; correspondingly, returning the response to the subnet client includes: returning the response through the virtual switch corresponding to the target subnet to the subnet client.

在具体实施中,若目标子网与七层负载均衡器关联的子网相同,则目标子网中的子网客户端向目标子网对应的虚拟交换机发送请求,该虚拟交换机将该请求发送至七层负载均衡器。七层负载均衡器接收到目标虚拟服务器对请求的响应后,通过该虚拟交换机将其返回至子网客户端。In a specific implementation, if the target subnet is the same as the subnet associated with the Layer 7 load balancer, the subnet client in the target subnet sends a request to the virtual switch corresponding to the target subnet, and the virtual switch sends the request to Layer-7 load balancer. After the Layer 7 load balancer receives the target virtual server's response to the request, it returns it to the subnet client through the virtual switch.

作为另一种可行的实施方式,所述接收目标子网中子网客户端的请求,包括:若所述目标子网与所述七层负载均衡器关联的子网不同,则依次通过所述目标子网对应的虚拟交换机、所述虚拟路由器、所述七层负载均衡器关联的虚拟交换机接收所述目标子网中子网客户端的请求;相应的,将所述响应返回至所述子网客户端,包括:依次通过所述七层负载均衡器关联的虚拟交换机、所述虚拟路由器、所述目标子网对应的虚拟交换机将所述响应返回至所述子网客户端。As another feasible implementation manner, the receiving the request from the subnet client in the target subnet includes: if the target subnet is different from the subnet associated with the layer-7 load balancer, sequentially passing through the target subnet The virtual switch corresponding to the subnet, the virtual router, and the virtual switch associated with the seven-layer load balancer receive the request from the subnet client in the target subnet; correspondingly, return the response to the subnet client The terminal includes: returning the response to the subnet client through the virtual switch associated with the layer-7 load balancer, the virtual router, and the virtual switch corresponding to the target subnet in sequence.

在具体实施中,若目标子网与七层负载均衡器关联的子网不同,则目标子网中的子网客户端向目标子网对应的虚拟交换机发送请求,该虚拟交换机将该请求发送至七层负载均衡器。七层负载均衡器接收到目标虚拟服务器对请求的响应后,通过该虚拟交换机将其返回至子网客户端。In a specific implementation, if the target subnet is different from the subnet associated with the Layer 7 load balancer, the subnet client in the target subnet sends a request to the virtual switch corresponding to the target subnet, and the virtual switch sends the request to Layer-7 load balancer. After the Layer 7 load balancer receives the target virtual server's response to the request, it returns it to the subnet client through the virtual switch.

本实施例提供一种负载均衡系统的创建方法,参见图5,图5为根据一示例性实施例示出的一种负载均衡系统的创建方法的流程图,如图5所示,包括:This embodiment provides a method for creating a load balancing system. Referring to FIG. 5 , FIG. 5 is a flowchart of a method for creating a load balancing system according to an exemplary embodiment, as shown in FIG. 5 , including:

S401:创建虚拟路由器和虚拟网关,将所述虚拟网关关联至所述虚拟路由器;其中,所述虚拟网关用于提供浮动IP地址;S401: Create a virtual router and a virtual gateway, and associate the virtual gateway with the virtual router; wherein, the virtual gateway is used to provide a floating IP address;

本实施例基于虚拟化平台进行负载均衡系统的拓扑创建,在本步骤中,新建虚拟路由器和虚拟网关,关联虚拟网关到虚拟路由器,虚拟网关提供浮动IP,基于端口转发功能使七层负载均衡器连接公网。In this embodiment, the topology of the load balancing system is created based on the virtualization platform. In this step, a new virtual router and a virtual gateway are created, and the virtual gateway is associated with the virtual router. The virtual gateway provides a floating IP. Based on the port forwarding function, the seven-layer load balancer Connect to the public network.

S402:创建多个虚拟交换机关联至所述虚拟路由器,每个所述虚拟交换机形成对应的子网;S402: Create a plurality of virtual switches associated with the virtual router, and each of the virtual switches forms a corresponding subnet;

在本步骤中,新建多个虚拟交换机关联到虚拟路由器,一个虚拟交换机形成一个子网。In this step, create multiple virtual switches and associate them with virtual routers, and one virtual switch forms a subnet.

S403:创建多个包含多个虚拟服务器的虚拟服务器集群,设置每个所述虚拟服务器的IP地址,并将每个所述虚拟服务器集群中的虚拟服务器分别关联至对应的虚拟交换机中,以将每个所述虚拟服务器集群中的虚拟服务器加入所述虚拟交换机对应的子网中;S403: Create multiple virtual server clusters containing multiple virtual servers, set the IP address of each virtual server, and associate each virtual server in the virtual server cluster with a corresponding virtual switch, so that Each virtual server in the virtual server cluster joins the subnet corresponding to the virtual switch;

在本步骤中,创建多台虚拟服务器,设置虚拟服务器IP地址,并分成多组分别关联到多个虚拟交换机,形成多个虚拟服务器集群。In this step, create multiple virtual servers, set virtual server IP addresses, and divide them into multiple groups and associate them with multiple virtual switches to form multiple virtual server clusters.

S404:创建服务池,设置所述服务池的端口,将每个所述子网中的至少一个虚拟服务器关联到所述服务池;其中,所述服务池的端口为所述服务池中的虚拟服务器提供真实服务的端口;S404: Create a service pool, set the port of the service pool, and associate at least one virtual server in each subnet with the service pool; wherein, the port of the service pool is a virtual server in the service pool The port where the server provides real services;

在本步骤中,新建服务池,设置服务池的端口,关联每个子网中的一个或多个虚拟服务器到服务池。该服务池端口即服务池中的虚拟服务器提供真实服务的端口。In this step, create a new service pool, set the port of the service pool, and associate one or more virtual servers in each subnet to the service pool. The service pool port is the port on which the virtual server in the service pool provides real services.

S405:基于预置包含七层负载均衡器的系统镜像创建七层负载均衡器,将所述七层负载均衡器关联至任一个所述虚拟交换机,设置所述七层负载均衡器的IP地址和端口;其中,所述七层负载均衡器的IP地址在关联的虚拟交换机对应的子网的范围内;S405: Create a layer-7 load balancer based on a preset system image containing a layer-7 load balancer, associate the layer-7 load balancer with any one of the virtual switches, and set the IP address of the layer-7 load balancer and port; wherein, the IP address of the seven-layer load balancer is within the scope of the subnet corresponding to the associated virtual switch;

在本步骤中,基于预置包含七层负载均衡器的系统镜像新建七层负载均衡器,七层负载均衡器关联到其中一个虚拟交换机,设置七层负载均衡器的IP地址和端口,用于提供七层负载均衡服务,IP地址必须在所关联子网范围内。用户通过该IP地址和端口访问七层负载均衡服务。In this step, create a new layer-7 load balancer based on the preset system image containing a layer-7 load balancer. The layer-7 load balancer is associated with one of the virtual switches, and the IP address and port of the layer-7 load balancer are set for To provide layer-7 load balancing services, the IP address must be within the range of the associated subnet. Users access the Layer 7 load balancing service through this IP address and port.

S406:将所述服务池关联至所述七层负载均衡器,在所述七层负载均衡器中配置所述服务池中的虚拟服务器的IP地址与所述服务池的端口之间的对应关系。S406: Associating the service pool with the layer-7 load balancer, configuring in the layer-7 load balancer the corresponding relationship between the IP address of the virtual server in the service pool and the port of the service pool .

在本步骤中,关联服务池到七层负载均衡器,系统自动配置“服务器IP:服务池端口”到七层负载均衡器。一个七层负载均衡器只能关联一个服务池。In this step, associate the service pool with the layer-7 load balancer, and the system will automatically configure "server IP: service pool port" to the layer-7 load balancer. A layer-7 load balancer can only be associated with one service pool.

在上述实施例的基础上,作为一种优选实施方式,将所述服务池关联至所述七层负载均衡器之后,还包括:解绑与所述七层负载均衡器关联的服务池,并将新的服务池关联至所述七层负载均衡器。On the basis of the above embodiments, as a preferred implementation manner, after associating the service pool with the layer-7 load balancer, it further includes: unbinding the service pool associated with the layer-7 load balancer, and Associate the new service pool to the layer-7 load balancer.

在具体实施中,可以解绑与负载均衡器已关联的服务池,并关联新的服务池,从而实现更新服务池。通过更新服务池操作达到控制一个服务池所有虚拟服务器的粒度。系统会根据更新服务池的结果自动更新七层负载均衡器的配置,并重启负载均衡器使配置生效,保证提供正确的七层负载均衡服务。In a specific implementation, the service pool associated with the load balancer can be unbound and associated with a new service pool, so as to update the service pool. The granularity of controlling all virtual servers in a service pool is achieved by updating the service pool operation. The system will automatically update the configuration of the seven-layer load balancer according to the result of updating the service pool, and restart the load balancer to make the configuration take effect, ensuring that the correct seven-layer load balancing service is provided.

在上述实施例的基础上,作为一种优选实施方式,所述将每个所述子网中的至少一个虚拟服务器关联到所述服务池之后,还包括:在所述服务池中添加新的虚拟服务器,或,删除所述服务池中的虚拟服务器。On the basis of the above embodiments, as a preferred implementation manner, after associating at least one virtual server in each of the subnets with the service pool, further includes: adding a new virtual server to the service pool virtual server, or, delete the virtual server in the service pool.

在具体实施中,可以添加虚拟服务器到服务池或删除服务池中的虚拟服务器,从而实现更新虚拟服务器。通过更新虚拟服务器操作达到控制服务池中单台服务器的粒度,系统会根据更新虚拟服务器的结果自动更新七层负载均衡器的配置,并重启七层负载均衡器使配置生效,保证提供正确的七层负载均衡服务。In a specific implementation, a virtual server can be added to the service pool or a virtual server in the service pool can be deleted, so as to update the virtual server. By updating the virtual server operation to achieve the granularity of controlling a single server in the service pool, the system will automatically update the configuration of the seven-layer load balancer according to the result of updating the virtual server, and restart the seven-layer load balancer to make the configuration take effect, ensuring that the correct seven-layer load balancer is provided. layer load balancing service.

在上述实施例的基础上,作为一种优选实施方式,所述创建多个虚拟交换机关联至所述虚拟路由器之后,还包括:将新的虚拟交换机关联至所述虚拟路由器,或,删除所述虚拟交换机关联的虚拟交换机。On the basis of the above embodiments, as a preferred implementation manner, after creating multiple virtual switches and associating them with the virtual router, it also includes: associating a new virtual switch with the virtual router, or deleting the The virtual switch associated with the virtual switch.

在具体实施中,可以关联新的虚拟交换机到虚拟路由器或删除已关联到虚拟路由器的虚拟交换机,从而添加或删除已关联虚拟交换机的虚拟服务器集群,从而实现更新虚拟服务器集群。其中,添加虚拟服务器集群后,该集群中的虚拟服务器即可允许被加入服务池。而删除虚拟服务器集群,即可自动解除所有已关联到服务池的该集群虚拟服务器。In a specific implementation, a new virtual switch can be associated with the virtual router or a virtual switch associated with the virtual router can be deleted, so as to add or delete the virtual server cluster associated with the virtual switch, so as to update the virtual server cluster. Wherein, after the virtual server cluster is added, the virtual servers in the cluster can be allowed to be added to the service pool. And deleting a virtual server cluster can automatically release all the cluster virtual servers associated with the service pool.

下面介绍本申请提供的一种应用实施例,参见图6,图6为根据一示例性实施例示出的另一种负载均衡系统的结构图。如图6所示,虚拟路由器与子网1、子网2和子网3关联,三个子网分别关联三个虚拟服务器集群。七层负载均衡器与子网1关联,与三个虚拟服务器集群互通。虚拟服务器2、4、6、7加入同一个服务池,服务池关联七层负载均衡器,负载均衡器为这个服务池提供负载均衡。虚拟网关与虚拟路由器关联,对外提供浮动IP,用于七层负载均衡器连接公网。An application embodiment provided by the present application is introduced below. Referring to FIG. 6 , FIG. 6 is a structural diagram of another load balancing system according to an exemplary embodiment. As shown in Figure 6, the virtual router is associated with subnet 1, subnet 2, and subnet 3, and the three subnets are respectively associated with three virtual server clusters. The Layer 7 load balancer is associated with subnet 1 and communicates with the three virtual server clusters. Virtual servers 2, 4, 6, and 7 join the same service pool, and the service pool is associated with a layer-7 load balancer, which provides load balancing for this service pool. The virtual gateway is associated with the virtual router and provides a floating IP to the outside world for the Layer 7 load balancer to connect to the public network.

基于现有虚拟化平台,用户的组网配置流程如下:Based on the existing virtualization platform, the user's networking configuration process is as follows:

步骤1:新建虚拟路由器和虚拟网关,关联虚拟网关到虚拟路由器,虚拟网关提供浮动IP,基于端口转发功能使七层负载均衡器连接公网。Step 1: Create a new virtual router and virtual gateway, associate the virtual gateway to the virtual router, the virtual gateway provides a floating IP, and connect the layer-7 load balancer to the public network based on the port forwarding function.

步骤2:新建三个虚拟交换机关联到虚拟路由器,一个虚拟交换机形成一个子网。Step 2: Create three virtual switches and associate them with the virtual router, and one virtual switch forms a subnet.

步骤3:新建九台虚拟服务器,设置虚拟服务器IP地址,并分成三组分别关联到三个虚拟交换机,形成三个虚拟服务器集群。Step 3: Create nine virtual servers, set virtual server IP addresses, and divide them into three groups and associate them with three virtual switches to form three virtual server clusters.

步骤4:新建服务池,设置服务池的端口,关联虚拟服务器2、4、6、7到服务池。该服务池端口即服务池中的虚拟服务器提供真实服务的端口。Step 4: Create a new service pool, set the port of the service pool, and associate virtual servers 2, 4, 6, and 7 to the service pool. The service pool port is the port on which the virtual server in the service pool provides real services.

步骤5:基于预置包含七层负载均衡器的系统镜像新建七层负载均衡器,七层负载均衡器关联到其中一个虚拟交换机,设置七层负载均衡器的IP地址和端口,用于提供七层负载均衡服务,IP地址必须在所关联子网范围内。用户通过该IP地址和端口访问七层负载均衡服务。Step 5: Create a new layer-7 load balancer based on the preset system image containing a layer-7 load balancer. The layer-7 load balancer is associated with one of the virtual switches, and the IP address and port of the layer-7 load balancer are set to provide seven Layer load balancing service, the IP address must be within the range of the associated subnet. Users access the Layer 7 load balancing service through this IP address and port.

步骤6:关联服务池到七层负载均衡器,系统自动配置“服务器IP:服务池端口”到七层负载均衡器。一个七层负载均衡器只能关联一个服务池。Step 6: Associate the service pool with the seven-layer load balancer, and the system automatically configures "server IP: service pool port" to the seven-layer load balancer. A layer-7 load balancer can only be associated with one service pool.

对于控制场景,可以包括更新服务池、更新虚拟服务器、更新虚拟服务器集群的操作。For the control scenario, it may include operations of updating service pools, updating virtual servers, and updating virtual server clusters.

更新服务池指解绑与负载均衡器已关联的服务池,并关联新的服务池。通过更新服务池操作达到控制一个服务池所有虚拟服务器的粒度。系统会根据更新服务池的结果自动更新七层负载均衡器的配置,并重启负载均衡器使配置生效,保证提供正确的七层负载均衡服务。Updating the service pool refers to unbinding the service pool associated with the load balancer and associating a new service pool. The granularity of controlling all virtual servers in a service pool is achieved by updating the service pool operation. The system will automatically update the configuration of the seven-layer load balancer according to the result of updating the service pool, and restart the load balancer to make the configuration take effect, ensuring that the correct seven-layer load balancing service is provided.

更新虚拟服务器指添加虚拟服务器到服务池或删除服务池中的虚拟服务器。通过更新虚拟服务器操作达到控制服务池中单台服务器的粒度,系统会根据更新虚拟服务器的结果自动更新七层负载均衡器的配置,并重启七层负载均衡器使配置生效,保证提供正确的七层负载均衡服务。Updating a virtual server refers to adding a virtual server to a service pool or deleting a virtual server from a service pool. By updating the virtual server operation to achieve the granularity of controlling a single server in the service pool, the system will automatically update the configuration of the seven-layer load balancer according to the result of updating the virtual server, and restart the seven-layer load balancer to make the configuration take effect, ensuring that the correct seven-layer load balancer is provided. layer load balancing service.

更新虚拟服务器集群指关联新的虚拟交换机到虚拟路由器或删除已关联到虚拟路由器的虚拟交换机,从而添加或删除已关联虚拟交换机的虚拟服务器集群。其中添加虚拟服务器集群后,该集群中的虚拟服务器即可允许被加入服务池;而删除虚拟服务器集群,即可自动解除所有已关联到服务池的该集群虚拟服务器。Updating a virtual server cluster refers to associating a new virtual switch to a virtual router or deleting a virtual switch that has been associated to a virtual router, thereby adding or deleting a virtual server cluster that has been associated with a virtual switch. After adding a virtual server cluster, the virtual servers in the cluster can be allowed to be added to the service pool; and deleting the virtual server cluster can automatically release all the cluster virtual servers associated with the service pool.

对于数据流,七层负载均衡器访问服务池即访问服务池中的虚拟服务器,假设七层负载均衡器已和子网1绑定,并且以选择本次请求分发给虚拟服务器4,七层负载均衡器访问服务池的数据流如图7所示,七层负载均衡器通过子网1发送请求到虚拟路由器,虚拟路由器转发请求到子网2的虚拟服务器4,数据流向为1、2、3、4;虚拟服务器4发送响应给七层负载均衡器,数据流向为5、6、7、8。For data flow, the Layer-7 load balancer accesses the service pool, that is, accesses the virtual servers in the service pool. Assume that the Layer-7 load balancer has been bound to subnet 1, and selects this request to distribute to virtual server 4, and the Layer-7 load balancer The data flow of the server accessing the service pool is shown in Figure 7. The seven-layer load balancer sends the request to the virtual router through the subnet 1, and the virtual router forwards the request to the virtual server 4 of the subnet 2, and the data flow direction is 1, 2, 3, 4; Virtual server 4 sends a response to the seven-layer load balancer, and the data flow direction is 5, 6, 7, and 8.

子网用户访问七层负载均衡器的数据流如图8所示,假设七层负载均衡器已和子网1绑定,子网2的用户访问七层负载均衡器。用户通过子网2发送请求到虚拟路由器,虚拟路由器转发请求到子网1的七层负载均衡器,数据流向为1、2、3、4;七层负载均衡器访问服务池获取响应,然后转发响应给用户,响应数据流向为5、6、7、8。The data flow of subnet users accessing the Layer 7 load balancer is shown in Figure 8. Assume that the Layer 7 load balancer has been bound to the subnet 1, and the users of the subnet 2 access the Layer 7 load balancer. The user sends a request to the virtual router through subnet 2, and the virtual router forwards the request to the seven-layer load balancer of subnet 1, and the data flow direction is 1, 2, 3, 4; the seven-layer load balancer accesses the service pool to obtain the response, and then forwards Respond to the user, the response data flow is 5, 6, 7, 8.

公网用户访问七层负载均衡器的数据流如图9所示,假设负载均衡器已和子网1绑定,公网用户访问七层负载均衡器。用户通过网关发送请求到虚拟路由器,虚拟路由器转发请求到子网1的七层负载均衡器,数据流向为1、2、3、4;七层负载均衡器访问服务池获取响应,然后转发响应给用户,响应数据流向为5、6、7、8。The data flow of public network users accessing the Layer-7 load balancer is shown in Figure 9. Assume that the load balancer has been bound to subnet 1, and public network users access the Layer-7 load balancer. The user sends a request to the virtual router through the gateway, and the virtual router forwards the request to the seven-layer load balancer of subnet 1, and the data flow direction is 1, 2, 3, and 4; the seven-layer load balancer accesses the service pool to obtain the response, and then forwards the response to User, the response data flow direction is 5, 6, 7, 8.

下面对本申请实施例提供的一种负载均衡装置进行介绍,下文描述的一种负载均衡装置与上文描述的一种负载均衡方法可以相互参照。A load balancing device provided by an embodiment of the present application is introduced below, and a load balancing device described below and a load balancing method described above may refer to each other.

参见图10,根据一示例性实施例示出的一种负载均衡装置的结构图,如图10所示,包括:Referring to FIG. 10 , a structural diagram of a load balancing device according to an exemplary embodiment, as shown in FIG. 10 , includes:

确定模块101,用于接收客户端的请求,并根据所述请求在所述服务池中确定目标虚拟服务器;A determination module 101, configured to receive a request from a client, and determine a target virtual server in the service pool according to the request;

判断模块102,用于判断所述目标虚拟服务器所在的子网与所述七层负载均衡器关联的子网是否相同;A judging module 102, configured to judge whether the subnet where the target virtual server is located is the same as the subnet associated with the layer-7 load balancer;

第一响应模块103,用于当所述目标虚拟服务器所在的子网与所述七层负载均衡器关联的子网不同时,将所述请求依次通过所述七层负载均衡器关联的虚拟交换机、所述虚拟路由器、所述目标虚拟服务器所在的子网对应的虚拟交换机发送至所述目标虚拟服务器,并依次通过所述目标虚拟服务器所在的子网对应的虚拟交换机、所述虚拟路由器、所述七层负载均衡器关联的虚拟交换机接收所述目标虚拟服务器对所述请求的响应;The first response module 103 is configured to pass the request sequentially through the virtual switch associated with the layer-7 load balancer when the subnet where the target virtual server is located is different from the subnet associated with the layer-7 load balancer , the virtual router, and the virtual switch corresponding to the subnet where the target virtual server is located send to the target virtual server, and sequentially pass through the virtual switch corresponding to the subnet where the target virtual server is located, the virtual router, and the The virtual switch associated with the seven-layer load balancer receives the response of the target virtual server to the request;

返回模块104,用于将所述响应返回至所述客户端。A return module 104, configured to return the response to the client.

本申请实施例基于现有的虚拟化平台,该平台可以方便控制子网和虚拟路由的关联关系以及子网和虚拟服务器的关联关系,通过新增可控的七层负载均衡器和子网的关联关系、服务池和虚拟服务器的关联关系以及七层负载均衡器和服务池的关联关系,可以实现对跨多子网环境的虚拟服务器七层负载均衡,灵活控制被七层负载均衡器代理的虚拟服务器范围,被七层负载均衡器代理的虚拟服务器控制粒度最大为一个服务池,最小为一台虚拟服务器,而相关技术中的负载均衡器控制粒度都是一台服务器,本申请实施例扩大了控制粒度提高了部署效率。The embodiment of the present application is based on the existing virtualization platform, which can conveniently control the relationship between subnets and virtual routes and the relationship between subnets and virtual servers. By adding a controllable seven-layer load balancer and subnet association relationship, the association between service pools and virtual servers, and the association between layer-7 load balancers and service pools, which can realize layer-7 load balancing of virtual servers across multiple subnet environments, and flexibly control the virtual servers proxied by layer-7 load balancers. In the range of servers, the control granularity of the virtual server proxied by the seven-layer load balancer is at most one service pool, and the minimum is one virtual server, while the control granularity of the load balancer in the related art is one server, the embodiment of this application expands Granularity of control improves deployment efficiency.

在上述实施例的基础上,作为一种优选实施方式,还包括:On the basis of the foregoing embodiments, as a preferred implementation manner, it also includes:

第二响应模块,用于当所述目标虚拟服务器所在的子网与所述七层负载均衡器关联的子网相同时,将所述请求通过所述七层负载均衡器关联的虚拟交换机发送至所述目标虚拟服务器,并通过所述七层负载均衡器关联的虚拟交换机接收所述目标虚拟服务器对所述请求的响应。The second response module is configured to send the request to the virtual switch associated with the layer-7 load balancer when the subnet where the target virtual server is located is the same as the subnet associated with the layer-7 load balancer the target virtual server, and receive the response of the target virtual server to the request through the virtual switch associated with the layer-7 load balancer.

在上述实施例的基础上,作为一种优选实施方式,所述确定模块101具体用于:依次通过所述虚拟网关、所述虚拟路由器和所述七层负载均衡器关联的虚拟交换机接收公网客户端的请求,并根据所述请求在所述服务池中确定目标虚拟服务器;On the basis of the above-mentioned embodiments, as a preferred implementation manner, the determining module 101 is specifically configured to: sequentially receive the public network information through the virtual gateway, the virtual router, and the virtual switch associated with the layer-7 load balancer. a client's request, and determine a target virtual server in the service pool according to the request;

相应的,所述返回模块104具体用于:依次通过所述七层负载均衡器关联的虚拟交换机、所述虚拟路由器和所述虚拟网关将所述响应返回至所述公网客户端。Correspondingly, the returning module 104 is specifically configured to: return the response to the public network client through the virtual switch associated with the layer-7 load balancer, the virtual router, and the virtual gateway in sequence.

在上述实施例的基础上,作为一种优选实施方式,所述确定模块101具体用于:接收目标子网中子网客户端的请求,并根据所述请求在所述服务池中确定目标虚拟服务器;On the basis of the above embodiments, as a preferred implementation manner, the determining module 101 is specifically configured to: receive a request from a subnet client in a target subnet, and determine a target virtual server in the service pool according to the request ;

相应的,所述返回模块104具体用于:将所述响应返回至所述子网客户端。Correspondingly, the returning module 104 is specifically configured to: return the response to the subnet client.

在上述实施例的基础上,作为一种优选实施方式,所述确定模块101具体用于:若所述目标子网与所述七层负载均衡器关联的子网相同,则通过所述目标子网对应的虚拟交换机接收所述目标子网中子网客户端的请求,并根据所述请求在所述服务池中确定目标虚拟服务器;On the basis of the above-mentioned embodiments, as a preferred implementation manner, the determining module 101 is specifically configured to: if the target subnet is the same as the subnet associated with the layer-7 load balancer, then pass the target subnet The virtual switch corresponding to the network receives the request of the subnet client in the target subnet, and determines the target virtual server in the service pool according to the request;

相应的,所述返回模块104具体用于:通过所述目标子网对应的虚拟交换机将所述响应返回至所述子网客户端。Correspondingly, the returning module 104 is specifically configured to: return the response to the subnet client through the virtual switch corresponding to the target subnet.

在上述实施例的基础上,作为一种优选实施方式,所述确定模块101具体用于:若所述目标子网与所述七层负载均衡器关联的子网不同,则依次通过所述目标子网对应的虚拟交换机、所述虚拟路由器、所述七层负载均衡器关联的虚拟交换机接收所述目标子网中子网客户端的请求,并根据所述请求在所述服务池中确定目标虚拟服务器;On the basis of the above-mentioned embodiments, as a preferred implementation manner, the determining module 101 is specifically configured to: if the target subnet is different from the subnet associated with the layer-7 load balancer, sequentially pass through the target The virtual switch corresponding to the subnet, the virtual router, and the virtual switch associated with the seven-layer load balancer receive the request from the subnet client in the target subnet, and determine the target virtual server in the service pool according to the request. server;

相应的,所述返回模块104具体用于:依次通过所述七层负载均衡器关联的虚拟交换机、所述虚拟路由器、所述目标子网对应的虚拟交换机将所述响应返回至所述子网客户端。Correspondingly, the returning module 104 is specifically configured to: return the response to the subnet through the virtual switch associated with the layer-7 load balancer, the virtual router, and the virtual switch corresponding to the target subnet in sequence client.

下面对本申请实施例提供的一种负载均衡系统的创建装置进行介绍,下文描述的一种负载均衡系统的创建装置与上文描述的一种负载均衡系统的创建方法可以相互参照。The following is an introduction to an apparatus for creating a load balancing system provided in an embodiment of the present application. The apparatus for creating a load balancing system described below and the method for creating a load balancing system described above may refer to each other.

参见图11,根据一示例性实施例示出的一种负载均衡系统的创建装置的结构图,如图11所示,包括:Referring to FIG. 11 , a structural diagram of an apparatus for creating a load balancing system according to an exemplary embodiment, as shown in FIG. 11 , includes:

第一创建模块201,用于创建虚拟路由器和虚拟网关,将所述虚拟网关关联至所述虚拟路由器;其中,所述虚拟网关用于提供浮动IP地址;The first creating module 201 is used to create a virtual router and a virtual gateway, and associate the virtual gateway with the virtual router; wherein, the virtual gateway is used to provide a floating IP address;

第二创建模块202,用于创建多个虚拟交换机关联至所述虚拟路由器,每个所述虚拟交换机形成对应的子网;The second creating module 202 is configured to create a plurality of virtual switches associated with the virtual router, and each of the virtual switches forms a corresponding subnet;

第三创建模块203,用于创建多个包含多个虚拟服务器的虚拟服务器集群,设置每个所述虚拟服务器的IP地址,并将每个所述虚拟服务器集群中的虚拟服务器分别关联至对应的虚拟交换机中,以将每个所述虚拟服务器集群中的虚拟服务器加入所述虚拟交换机对应的子网中;The third creation module 203 is used to create multiple virtual server clusters containing multiple virtual servers, set the IP address of each virtual server, and associate each virtual server in the virtual server cluster with the corresponding In the virtual switch, the virtual server in each virtual server cluster is added to the subnet corresponding to the virtual switch;

第四创建模块204,用于创建服务池,设置所述服务池的端口,将每个所述子网中的至少一个虚拟服务器关联到所述服务池;其中,所述服务池的端口为所述服务池中的虚拟服务器提供真实服务的端口;The fourth creation module 204 is used to create a service pool, set the port of the service pool, and associate at least one virtual server in each subnet with the service pool; wherein, the port of the service pool is the The virtual server in the above service pool provides the port of the real service;

第五创建模块205,用于基于预置包含七层负载均衡器的系统镜像创建七层负载均衡器,将所述七层负载均衡器关联至任一个所述虚拟交换机,设置所述七层负载均衡器的IP地址和端口;其中,所述七层负载均衡器的IP地址在关联的虚拟交换机对应的子网的范围内;The fifth creation module 205 is configured to create a layer-7 load balancer based on a preset system image containing a layer-7 load balancer, associate the layer-7 load balancer with any one of the virtual switches, and set the layer-7 load balancer The IP address and port of the balancer; wherein, the IP address of the seven-layer load balancer is within the scope of the subnet corresponding to the associated virtual switch;

关联模块206,用于将所述服务池关联至所述七层负载均衡器,在所述七层负载均衡器中配置所述服务池中的虚拟服务器的IP地址与所述服务池的端口之间的对应关系。An associating module 206, configured to associate the service pool with the layer-7 load balancer, and configure the connection between the IP address of the virtual server in the service pool and the port of the service pool in the layer-7 load balancer Correspondence between.

本申请实施例基于现有的虚拟化平台,该平台可以方便控制子网和虚拟路由的关联关系以及子网和虚拟服务器的关联关系,通过新增可控的七层负载均衡器和子网的关联关系、服务池和虚拟服务器的关联关系以及七层负载均衡器和服务池的关联关系,可以实现对跨多子网环境的虚拟服务器七层负载均衡,灵活控制被七层负载均衡器代理的虚拟服务器范围,被七层负载均衡器代理的虚拟服务器控制粒度最大为一个服务池,最小为一台虚拟服务器,而相关技术中的负载均衡器控制粒度都是一台服务器,本申请实施例扩大了控制粒度提高了部署效率。The embodiment of the present application is based on the existing virtualization platform, which can conveniently control the relationship between subnets and virtual routes and the relationship between subnets and virtual servers. By adding a controllable seven-layer load balancer and subnet association relationship, the association between service pools and virtual servers, and the association between layer-7 load balancers and service pools, which can realize layer-7 load balancing of virtual servers across multiple subnet environments, and flexibly control the virtual servers proxied by layer-7 load balancers. In the range of servers, the control granularity of the virtual server proxied by the seven-layer load balancer is at most one service pool, and the minimum is one virtual server, while the control granularity of the load balancer in the related art is one server, the embodiment of this application expands Granularity of control improves deployment efficiency.

在上述实施例的基础上,作为一种优选实施方式,还包括:On the basis of the foregoing embodiments, as a preferred implementation manner, it also includes:

第一更新模块,用于解绑与所述七层负载均衡器关联的服务池,并将新的服务池关联至所述七层负载均衡器。The first update module is configured to unbind the service pool associated with the layer-7 load balancer, and associate a new service pool with the layer-7 load balancer.

在上述实施例的基础上,作为一种优选实施方式,还包括:On the basis of the foregoing embodiments, as a preferred implementation manner, it also includes:

第二更新模块,用于在所述服务池中添加新的虚拟服务器,或,删除所述服务池中的虚拟服务器。The second update module is configured to add a new virtual server in the service pool, or delete a virtual server in the service pool.

在上述实施例的基础上,作为一种优选实施方式,还包括:On the basis of the foregoing embodiments, as a preferred implementation manner, it also includes:

第三更新模块,用于将新的虚拟交换机关联至所述虚拟路由器,或,删除所述虚拟交换机关联的虚拟交换机。The third update module is configured to associate a new virtual switch with the virtual router, or delete a virtual switch associated with the virtual switch.

关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the apparatus in the foregoing embodiments, the specific manner in which each module executes operations has been described in detail in the embodiments related to the method, and will not be described in detail here.

基于上述程序模块的硬件实现,且为了实现本申请实施例的方法,本申请实施例还提供了一种电子设备,图12为根据一示例性实施例示出的一种电子设备的结构图,如图12所示,电子设备包括:Based on the hardware implementation of the above program modules, and in order to implement the method of the embodiment of the present application, the embodiment of the present application also provides an electronic device. FIG. 12 is a structural diagram of an electronic device according to an exemplary embodiment, as shown in As shown in Figure 12, the electronic equipment includes:

通信接口1,能够与其它设备比如网络设备等进行信息交互;Communication interface 1, which can exchange information with other devices such as network devices;

处理器2,与通信接口1连接,以实现与其它设备进行信息交互,用于运行计算机程序时,执行上述一个或多个技术方案提供的负载均衡方法或负载均衡系统的创建方法。而所述计算机程序存储在存储器3上。The processor 2 is connected to the communication interface 1 to realize information interaction with other devices, and is used to execute the load balancing method or the creation method of the load balancing system provided by the above one or more technical solutions when running the computer program. Instead, the computer program is stored on the memory 3 .

当然,实际应用时,电子设备中的各个组件通过总线系统4耦合在一起。可理解,总线系统4用于实现这些组件之间的连接通信。总线系统4除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图12中将各种总线都标为总线系统4。Of course, in actual application, various components in the electronic device are coupled together through the bus system 4 . It can be understood that the bus system 4 is used to realize connection and communication between these components. In addition to the data bus, the bus system 4 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the various buses are labeled as bus system 4 in FIG. 12 .

本申请实施例中的存储器3用于存储各种类型的数据以支持电子设备的操作。这些数据的示例包括:用于在电子设备上操作的任何计算机程序。The memory 3 in the embodiment of the present application is used to store various types of data to support the operation of the electronic device. Examples of such data include: any computer program used to operate on an electronic device.

可以理解,存储器3可以是易失性存储器或非易失性存储器,也可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(ROM,Read Only Memory)、可编程只读存储器(PROM,Programmable Read-Only Memory)、可擦除可编程只读存储器(EPROM,Erasable Programmable Read-Only Memory)、电可擦除可编程只读存储器(EEPROM,Electrically Erasable Programmable Read-Only Memory)、磁性随机存取存储器(FRAM,ferromagnetic random access memory)、快闪存储器(Flash Memory)、磁表面存储器、光盘、只读光盘(CD-ROM,Compact Disc Read-Only Memory);磁表面存储器可以是磁盘存储器或磁带存储器。易失性存储器可以是随机存取存储器(RAM,Random AccessMemory),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(SRAM,Static Random Access Memory)、同步静态随机存取存储器(SSRAM,Synchronous Static Random Access Memory)、动态随机存取存储器(DRAM,Dynamic Random Access Memory)、同步动态随机存取存储器(SDRAM,SynchronousDynamic Random Access Memory)、双倍数据速率同步动态随机存取存储器(DDRSDRAM,Double Data Rate Synchronous Dynamic Random Access Memory)、增强型同步动态随机存取存储器(ESDRAM,Enhanced Synchronous Dynamic Random Access Memory)、同步连接动态随机存取存储器(SLDRAM,SyncLink Dynamic Random Access Memory)、直接内存总线随机存取存储器(DRRAM,Direct Rambus Random Access Memory)。本申请实施例描述的存储器3旨在包括但不限于这些和任意其它适合类型的存储器。It can be understood that the memory 3 may be a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. Among them, the non-volatile memory can be read-only memory (ROM, Read Only Memory), programmable read-only memory (PROM, Programmable Read-Only Memory), erasable programmable read-only memory (EPROM, Erasable Programmable Read-Only Memory), Only Memory), Electrically Erasable Programmable Read-Only Memory (EEPROM, Electrically Erasable Programmable Read-Only Memory), Magnetic Random Access Memory (FRAM, ferromagnetic random access memory), Flash Memory (Flash Memory), Magnetic Surface Memory , CD, CD-ROM (CD-ROM, Compact Disc Read-Only Memory); magnetic surface storage can be disk storage or tape storage. The volatile memory may be Random Access Memory (RAM, Random Access Memory), which is used as an external cache. By way of illustration and not limitation, many forms of RAM are available such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory Memory (DRAM, Dynamic Random Access Memory), Synchronous Dynamic Random Access Memory (SDRAM, Synchronous Dynamic Random Access Memory), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM, Double Data Rate Synchronous Dynamic Random Access Memory), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM, Enhanced Synchronous Dynamic Random Access Memory), Synchronous Connection Dynamic Random Access Memory (SLDRAM, SyncLink Dynamic Random Access Memory), Direct Memory Bus Random Access Memory (DRRAM, Direct Rambus Random Access Memory) . The memory 3 described in the embodiment of the present application is intended to include but not limited to these and any other suitable types of memory.

上述本申请实施例揭示的方法可以应用于处理器2中,或者由处理器2实现。处理器2可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器2中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器2可以是通用处理器、DSP,或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。处理器2可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者任何常规的处理器等。结合本申请实施例所公开的方法的步骤,可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于存储介质中,该存储介质位于存储器3,处理器2读取存储器3中的程序,结合其硬件完成前述方法的步骤。The methods disclosed in the foregoing embodiments of the present application may be applied to the processor 2 or implemented by the processor 2 . Processor 2 may be an integrated circuit chip with signal processing capability. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor 2 or instructions in the form of software. The aforementioned processor 2 may be a general-purpose processor, DSP, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and the like. The processor 2 may implement or execute various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method disclosed in the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module can be located in the storage medium, and the storage medium is located in the memory 3, and the processor 2 reads the program in the memory 3, and completes the steps of the foregoing method in combination with its hardware.

处理器2执行所述程序时实现本申请实施例的各个方法中的相应流程,为了简洁,在此不再赘述。When the processor 2 executes the program, the corresponding processes in the various methods of the embodiments of the present application are implemented, and details are not repeated here for the sake of brevity.

在示例性实施例中,本申请实施例还提供了一种存储介质,即计算机存储介质,具体为计算机可读存储介质,例如包括存储计算机程序的存储器3,上述计算机程序可由处理器2执行,以完成前述方法所述步骤。计算机可读存储介质可以是FRAM、ROM、PROM、EPROM、EEPROM、Flash Memory、磁表面存储器、光盘、CD-ROM等存储器。In an exemplary embodiment, the embodiment of the present application also provides a storage medium, that is, a computer storage medium, specifically a computer-readable storage medium, for example, including a memory 3 storing a computer program, and the above-mentioned computer program can be executed by the processor 2, To complete the steps described in the aforementioned method. The computer-readable storage medium may be memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface memory, optical disk, CD-ROM, or the like.

本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:移动存储设备、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。Those of ordinary skill in the art can understand that all or part of the steps for realizing the above-mentioned method embodiments can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the It includes the steps of the above method embodiments; and the aforementioned storage medium includes: various media that can store program codes such as removable storage devices, ROM, RAM, magnetic disks or optical disks.

或者,本申请上述集成的单元如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台电子设备(可以是个人计算机、服务器、网络设备等)执行本申请各个实施例所述方法的全部或部分。而前述的存储介质包括:移动存储设备、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。Alternatively, if the above-mentioned integrated units of the present application are realized in the form of software function modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for Make an electronic device (which may be a personal computer, server, network device, etc.) execute all or part of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: various media capable of storing program codes such as removable storage devices, ROM, RAM, magnetic disks or optical disks.

以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above is only a specific implementation of the application, but the scope of protection of the application is not limited thereto. Anyone familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the application. Should be covered within the protection scope of this application. Therefore, the protection scope of the present application should be determined by the protection scope of the claims.

Claims (15)

1. A load balancing method is characterized in that the method is applied to a seven-layer load balancer in a load balancing system, the load balancing system comprises a virtual gateway, a virtual router associated with the virtual gateway, a plurality of virtual switches associated with the virtual router, the seven-layer load balancer associated with any one virtual switch, and a service pool associated with the seven-layer load balancer, each virtual switch forms a corresponding subnet, each subnet is respectively associated with a plurality of virtual servers, and the service pool comprises at least one virtual server associated with each subnet;
the method comprises the following steps:
receiving a request of a client, and determining a target virtual server in the service pool according to the request;
judging whether the subnet where the target virtual server is located is the same as the subnet associated with the seven-layer load balancer;
if not, sending the request to the target virtual server sequentially through the virtual switch associated with the seven-layer load balancer, the virtual router and the virtual switch corresponding to the subnet where the target virtual server is located, and receiving the response of the target virtual server to the request sequentially through the virtual switch corresponding to the subnet where the target virtual server is located, the virtual router and the virtual switch associated with the seven-layer load balancer;
returning the response to the client.
2. The load balancing method according to claim 1, wherein after determining whether the subnet where the target virtual server is located is the same as the subnet associated with the seven-layer load balancer, the method further comprises:
and if the subnet where the target virtual server is located is the same as the subnet associated with the seven-layer load balancer, sending the request to the target virtual server through the virtual switch associated with the seven-layer load balancer, and receiving the response of the target virtual server to the request through the virtual switch associated with the seven-layer load balancer.
3. The load balancing method according to claim 1, wherein the receiving a request from a client comprises:
receiving a request of a public network client through a virtual switch associated with the virtual gateway, the virtual router and the seven-layer load balancer in sequence;
correspondingly, returning the response to the client includes:
and returning the response to the public network client through the virtual switch, the virtual router and the virtual gateway which are associated with the seven-layer load balancer in sequence.
4. The load balancing method according to claim 1, wherein the receiving a request from a client comprises:
receiving a request of a subnet client in a target subnet;
correspondingly, returning the response to the client includes:
returning the response to the subnet client.
5. The load balancing method of claim 4, wherein the receiving a request from a subnet client in the target subnet comprises:
if the target subnet is the same as the subnet associated with the seven-layer load balancer, receiving a request of a subnet client in the target subnet through a virtual switch corresponding to the target subnet;
correspondingly, returning the response to the subnet client includes:
and returning the response to the subnet client through the virtual switch corresponding to the target subnet.
6. The load balancing method of claim 4, wherein the receiving a request from a subnet client in the target subnet comprises:
if the target subnet is different from the subnet associated with the seven-layer load balancer, the request of the subnet client in the target subnet is received sequentially through the virtual switch corresponding to the target subnet, the virtual router and the virtual switch associated with the seven-layer load balancer;
correspondingly, returning the response to the subnet client includes:
and returning the response to the subnet client through the virtual switch associated with the seven-layer load balancer, the virtual router and the virtual switch corresponding to the target subnet in sequence.
7. A method for creating a load balancing system, comprising:
creating a virtual router and a virtual gateway, and associating the virtual gateway to the virtual router; wherein the virtual gateway is configured to provide a floating IP address;
creating a plurality of virtual switches associated to the virtual router, each of the virtual switches forming a corresponding subnet;
creating a plurality of virtual server clusters comprising a plurality of virtual servers, setting an IP address of each virtual server, and respectively associating the virtual servers in each virtual server cluster to a corresponding virtual switch so as to add the virtual servers in each virtual server cluster to a subnet corresponding to the virtual switch;
creating a service pool, setting a port of the service pool, and associating at least one virtual server in each subnet to the service pool; the port of the service pool provides a port of real service for a virtual server in the service pool;
establishing a seven-layer load balancer based on a preset system mirror image containing the seven-layer load balancer, associating the seven-layer load balancer to any one of the virtual switches, and setting an IP address and a port of the seven-layer load balancer; the IP address of the seven-layer load balancer is in the range of the subnet corresponding to the associated virtual switch;
and associating the service pool to the seven-layer load balancer, and configuring the corresponding relation between the IP address of the virtual server in the service pool and the port of the service pool in the seven-layer load balancer.
8. The method for creating a load balancing system according to claim 7, wherein after associating the service pool to the seven-layer load balancer, further comprising:
unbinding the service pool associated with the seven-tier load balancer and associating a new service pool to the seven-tier load balancer.
9. The method for creating a load balancing system according to claim 7, wherein said associating at least one virtual server in each of said sub-networks to said service pool further comprises:
adding a new virtual server in the service pool;
or deleting the virtual server in the service pool.
10. The method for creating a load balancing system according to claim 7, wherein after creating the plurality of virtual switches associated with the virtual router, further comprising:
associating a new virtual switch to the virtual router;
or deleting the virtual switch associated with the virtual switch.
11. The load balancing device is characterized by being applied to a seven-layer load balancer in a load balancing system, wherein the load balancing system comprises a virtual gateway, a virtual router associated with the virtual gateway, a plurality of virtual switches associated with the virtual router, the seven-layer load balancer associated with any one virtual switch, and a service pool associated with the seven-layer load balancer, each virtual switch forms a corresponding subnet, each subnet is respectively associated with a plurality of virtual servers, and the service pool comprises at least one virtual server associated with each subnet;
the device comprises:
the determining module is used for receiving a request of a client and determining a target virtual server in the service pool according to the request;
the judging module is used for judging whether the subnet where the target virtual server is located is the same as the subnet associated with the seven-layer load balancer;
a first response module, configured to, when a subnet where the target virtual server is located is different from a subnet associated with the seven-layer load balancer, send the request to the target virtual server sequentially through the virtual switch associated with the seven-layer load balancer, the virtual router, and the virtual switch corresponding to the subnet where the target virtual server is located, and receive, by sequentially through the virtual switch corresponding to the subnet where the target virtual server is located, the virtual router, and the virtual switch associated with the seven-layer load balancer, a response of the target virtual server to the request;
and the return module is used for returning the response to the client.
12. An apparatus for creating a load balancing system, comprising:
a first creation module for creating a virtual router and a virtual gateway, associating the virtual gateway to the virtual router; wherein the virtual gateway is configured to provide a floating IP address;
a second creation module for creating a plurality of virtual switches associated to the virtual router, each virtual switch forming a corresponding subnet;
a third creating module, configured to create a plurality of virtual server clusters including a plurality of virtual servers, set an IP address of each virtual server, and associate a virtual server in each virtual server cluster with a corresponding virtual switch, respectively, so as to add the virtual server in each virtual server cluster into a subnet corresponding to the virtual switch;
a fourth creating module, configured to create a service pool, set a port of the service pool, and associate at least one virtual server in each subnet to the service pool; the port of the service pool provides a port of real service for a virtual server in the service pool;
a fifth creating module, configured to create a seven-layer load balancer based on a preset system image including the seven-layer load balancer, associate the seven-layer load balancer with any one of the virtual switches, and set an IP address and a port of the seven-layer load balancer; the IP address of the seven-layer load balancer is in the range of the subnet corresponding to the associated virtual switch;
and the association module is used for associating the service pool to the seven-layer load balancer, and configuring the corresponding relation between the IP address of the virtual server in the service pool and the port of the service pool in the seven-layer load balancer.
13. A load balancing system, comprising:
a virtual gateway connected to the public network;
a virtual router associated with the virtual gateway;
a plurality of virtual switches associated with the virtual router; each virtual switch forms a corresponding subnet, each subnet is respectively associated with a corresponding virtual server cluster, and each virtual server cluster comprises a plurality of virtual servers;
a seven-layer load balancer associated with any one of the virtual switches;
a service pool associated with the seven-tier load balancer; wherein the service pool comprises at least one virtual server associated with each subnet.
14. An electronic device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the load balancing method according to any one of claims 1 to 6 or the creation method of the load balancing system according to any one of claims 7 to 10 when executing the computer program.
15. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the load balancing method according to any one of claims 1 to 6 or the creating method of the load balancing system according to any one of claims 7 to 10.
CN202211518396.XA 2022-11-30 2022-11-30 Load balancing method, device, system and system creation method, equipment and medium Active CN115604272B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202211518396.XA CN115604272B (en) 2022-11-30 2022-11-30 Load balancing method, device, system and system creation method, equipment and medium
PCT/CN2023/108189 WO2024113895A1 (en) 2022-11-30 2023-07-19 Load balancing method, apparatus and system, system creation method, and device and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211518396.XA CN115604272B (en) 2022-11-30 2022-11-30 Load balancing method, device, system and system creation method, equipment and medium

Publications (2)

Publication Number Publication Date
CN115604272A true CN115604272A (en) 2023-01-13
CN115604272B CN115604272B (en) 2023-03-14

Family

ID=84853646

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211518396.XA Active CN115604272B (en) 2022-11-30 2022-11-30 Load balancing method, device, system and system creation method, equipment and medium

Country Status (2)

Country Link
CN (1) CN115604272B (en)
WO (1) WO2024113895A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024113895A1 (en) * 2022-11-30 2024-06-06 苏州元脑智能科技有限公司 Load balancing method, apparatus and system, system creation method, and device and medium
CN118158222A (en) * 2024-05-11 2024-06-07 中移(苏州)软件技术有限公司 Load balancer deployment method, device, electronic device, storage medium and product

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119248517A (en) * 2024-12-03 2025-01-03 杭州优云科技股份有限公司 A server load balancing method, device, equipment and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030225859A1 (en) * 2002-05-31 2003-12-04 Sun Microsystems, Inc. Request mapping for load balancing
CN101778048A (en) * 2010-02-22 2010-07-14 浪潮(北京)电子信息产业有限公司 Data forwarding method, load balance scheduler and load balance system
CN104243337A (en) * 2013-06-09 2014-12-24 杭州华三通信技术有限公司 Method and device for cross-cluster load balancing
CN106686085A (en) * 2016-12-29 2017-05-17 华为技术有限公司 A load balancing method, device and system
CN107086966A (en) * 2016-02-16 2017-08-22 阿里巴巴集团控股有限公司 A kind of load balancing of network, control and network interaction method and device
US20180063233A1 (en) * 2016-08-25 2018-03-01 Nhn Entertainment Corporation Method and system for processing load balancing using virtual switch in virtual network environment
US20180121225A1 (en) * 2016-11-03 2018-05-03 Salesforce.Com, Inc. Cost efficient and on-demand pool of running instances in a virtual machine environment
CN109547354A (en) * 2018-11-21 2019-03-29 广州市百果园信息技术有限公司 Load-balancing method, device, system, core layer switch and storage medium
CN111901409A (en) * 2020-07-24 2020-11-06 山东海量信息技术研究院 Load balancing implementation method and device of virtualized cloud platform and readable storage medium
CN112740628A (en) * 2018-09-21 2021-04-30 思科技术公司 Segment Routing with Fast Rerouting for Container Networking

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110166544B (en) * 2019-05-17 2023-05-19 平安科技(深圳)有限公司 Load balancing application creation method and device, computer equipment and storage medium
CN113839894B (en) * 2021-07-28 2023-10-27 新华三大数据技术有限公司 Message processing method and system
CN113572856B (en) * 2021-09-18 2022-01-11 云宏信息科技股份有限公司 Method, control method and medium for configuring seven-layer load balancing for OVN architecture
CN115604272B (en) * 2022-11-30 2023-03-14 苏州浪潮智能科技有限公司 Load balancing method, device, system and system creation method, equipment and medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030225859A1 (en) * 2002-05-31 2003-12-04 Sun Microsystems, Inc. Request mapping for load balancing
CN101778048A (en) * 2010-02-22 2010-07-14 浪潮(北京)电子信息产业有限公司 Data forwarding method, load balance scheduler and load balance system
CN104243337A (en) * 2013-06-09 2014-12-24 杭州华三通信技术有限公司 Method and device for cross-cluster load balancing
CN107086966A (en) * 2016-02-16 2017-08-22 阿里巴巴集团控股有限公司 A kind of load balancing of network, control and network interaction method and device
US20180063233A1 (en) * 2016-08-25 2018-03-01 Nhn Entertainment Corporation Method and system for processing load balancing using virtual switch in virtual network environment
US20180121225A1 (en) * 2016-11-03 2018-05-03 Salesforce.Com, Inc. Cost efficient and on-demand pool of running instances in a virtual machine environment
CN106686085A (en) * 2016-12-29 2017-05-17 华为技术有限公司 A load balancing method, device and system
CN112740628A (en) * 2018-09-21 2021-04-30 思科技术公司 Segment Routing with Fast Rerouting for Container Networking
CN109547354A (en) * 2018-11-21 2019-03-29 广州市百果园信息技术有限公司 Load-balancing method, device, system, core layer switch and storage medium
CN111901409A (en) * 2020-07-24 2020-11-06 山东海量信息技术研究院 Load balancing implementation method and device of virtualized cloud platform and readable storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024113895A1 (en) * 2022-11-30 2024-06-06 苏州元脑智能科技有限公司 Load balancing method, apparatus and system, system creation method, and device and medium
CN118158222A (en) * 2024-05-11 2024-06-07 中移(苏州)软件技术有限公司 Load balancer deployment method, device, electronic device, storage medium and product

Also Published As

Publication number Publication date
WO2024113895A1 (en) 2024-06-06
CN115604272B (en) 2023-03-14

Similar Documents

Publication Publication Date Title
CN115604272B (en) Load balancing method, device, system and system creation method, equipment and medium
US11695730B2 (en) Providing services for logical networks
US11277471B2 (en) Managing replication of computing nodes for provided computer networks
JP7281531B2 (en) Multi-cloud connectivity using SRv6 and BGP
US9577953B2 (en) Determination of a suitable target for an initiator by a control plane processor
US10664301B2 (en) Methods and systems for establishing connections associated with virtual machine migrations
CN113268308B (en) Information processing method, device and storage medium
CN112350918B (en) A service flow scheduling method, device, equipment and storage medium
US10237235B1 (en) System for network address translation
CN114172853B (en) Configuration method and device of traffic forwarding and bare computer server
CN107317832A (en) Message forwarding method and device
CN111130838A (en) A process-level service instance dynamic expansion and network bandwidth limitation method and device
CN113676564A (en) Data transmission method, device and storage medium
US10999196B2 (en) Global replication mode for overlay runtime state migration
CN115622815B (en) Port isolation implementation method, device, equipment and medium based on virtualization environment
CN117255018A (en) Network configuration method and device for bare metal instance and computer equipment
CN115766868A (en) A service access method, device, equipment and computer storage medium
CN115865921A (en) A method, system, storage medium, and electronic device for constructing a container network
JP7212158B2 (en) Provider network service extension
CN115065730B (en) Data processing method, first container, electronic equipment and storage medium
CN117499293B (en) Routing table maintenance method, path selection method, device, system and storage medium
CN113127145B (en) Information processing method, device and storage medium
CN117478596B (en) SDN traffic forwarding system, equipment and method
CN103685607B (en) address resolution protocol addressing method and device
WO2024078427A1 (en) Serverless function configuration system, method and apparatus

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