[go: up one dir, main page]

WO2015192563A1 - Method and device for implementing load balancing and load balancing service system - Google Patents

Method and device for implementing load balancing and load balancing service system Download PDF

Info

Publication number
WO2015192563A1
WO2015192563A1 PCT/CN2014/088970 CN2014088970W WO2015192563A1 WO 2015192563 A1 WO2015192563 A1 WO 2015192563A1 CN 2014088970 W CN2014088970 W CN 2014088970W WO 2015192563 A1 WO2015192563 A1 WO 2015192563A1
Authority
WO
WIPO (PCT)
Prior art keywords
virtual
load balancing
network
subnet
virtual machine
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2014/088970
Other languages
French (fr)
Chinese (zh)
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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Publication of WO2015192563A1 publication Critical patent/WO2015192563A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • 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
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/14Multichannel or multilink protocols

Definitions

  • Cloud computing is an Internet-based computing method. In this way, software and hardware resources and network information can be shared according to the needs of computers or other devices. .
  • SaaS Software-as-a-Service
  • the load balancing service is a common network device, and its main function is to provide an effective and transparent method for expanding the bandwidth of the network device and the server, increasing the throughput, strengthening the network data processing capability, and improving the network. Flexibility and usability, etc.
  • load balancing services in cloud computing are usually set up.
  • a virtual network of the user that is, a virtual network belonging to the user belongs to the same layer 2 network.
  • the load balancing service is applied to the network device in the virtual machine network, the data can be directly forwarded without addressing.
  • the embodiment of the present application provides a method for implementing load balancing, including:
  • the data packet requiring load balancing processing is forwarded to the virtual machine for processing by the load balancing module.
  • the creating a virtual subnet is specifically: creating at least one level one virtual subnet, and directly connecting the virtual switch in the level one virtual subnet to the virtual network system.
  • the first-level virtual sub-network implements network isolation in any one of the following manners in the virtual network system: a virtual local area network (VLAN), and a general routing package. (Generic Routing Encapsulation, GRE for short), Virtual eXtensible Local Area Network (VXLAN); the network information corresponding to the virtual machine in the first-level virtual subnet is any one of the following information: VLAN information, GRE information, and VXLAN information.
  • GRE Global Routing Encapsulation
  • VXLAN Virtual eXtensible Local Area Network
  • the creating module is configured to separately create a virtual network system and a load balancing module according to the creation request, and connect the load balancing module to the virtual network system, where the virtual network system includes at least one virtual machine;
  • the load balancing creation unit is configured to create a load balancing module and directly connect the load balancing module to the virtual network system.
  • the virtual subnet created by the subnet creating unit implements network isolation in any one of the following manners in the virtual network system: VLAN, GRE, VXLAN; corresponding to the first level
  • the network information of the virtual machine in the virtual subnet is any one of the following information: VLAN information, GRE information, and VXLAN information.
  • the processing module further includes an obtaining unit and a creating unit;
  • FIG. 1 is a network architecture of a cloud computing system in the prior art provided by the present invention.
  • FIG. 3 is a schematic diagram of a cloud computing network architecture composed of a virtual network system and a load balancing module when the virtual subnet is a primary virtual subnet provided by the first embodiment of the present invention
  • On-demand self-service Cloud consumers can unilaterally and automatically deploy computing power such as server time and network storage on-demand, without the need for human interaction with service providers.
  • Hybrid Cloud A cloud infrastructure consists of two or more deployment models of clouds (private, community, or public) that remain unique entities, but with standardized or proprietary technologies that enable data and applications to be ported. (For example, cloud burst traffic sharing technology for load balancing between clouds) is bundled together.
  • the load balancing module when the load balancing module is created according to the creation request, the load balancing algorithm, the health check and the session hold function of the load balancing module are further included:
  • the session retention refers to maintaining the continuity and consistency of the session. Since it is difficult for the servers to synchronize the user access information in real time, it is required to keep the user's front and back access sessions to a server for processing.
  • the load balancing device generally configures some session-maintaining options by default, such as session keeping of the source address, keeping the cookie session, etc., depending on different applications, configuring different session holdings, otherwise the load may be unbalanced or even accessed abnormally.
  • FIG. 4 is a schematic structural diagram of an apparatus for implementing load balancing according to an embodiment of the present disclosure, where the apparatus includes: a creating module 401, a processing module 402, and a forwarding module 403;
  • the creating module 401 includes a subnet creating unit 4011 and a load balancing creating unit 4012;
  • the processing module 402 further includes an information creating unit 4022;
  • a load balancing service system is provided.
  • the system includes a virtual network system 501 and a load balancing module 502.
  • Step 606 When the virtual machine is isolated by using the VLAN, the load balancing module obtains the VLAN information.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

Provided are a method and device for implementing load balancing and load balancing service system, solving the problem of low performance of load balancing service. The method comprises: creating a virtual network system and a load balancing module according to a creation request, and connecting the created load balancing module to the virtual network system, the created virtual network system comprising at least one virtual machine; storing in the load balancing module the network information of the virtual machine in different network segments with the load balancing module; when a received data packet requiring load balancing is present in a virtual load balancing processing network, forwarding the data packet to the virtual machine by the load balancing module for processing. The solution of the present application can solve the problem of low performance of load balancing service.

Description

一种实现负载均衡的方法、装置及负载均衡服务系统Method, device and load balancing service system for implementing load balancing 技术领域Technical field

本发明涉及云计算领域,尤其涉及一种实现负载均衡的方法、装置及负载均衡服务系统。The present invention relates to the field of cloud computing, and in particular, to a method, an apparatus, and a load balancing service system for implementing load balancing.

背景技术Background technique

随着互联网的发展,云计算的使用范围越来越广泛,云计算是一种基于互联网的计算方式,通过这种方式,可以实现将软硬件资源以及网络信息按计算机或者其他设备的需求进行共享。With the development of the Internet, the use of cloud computing is more and more extensive. Cloud computing is an Internet-based computing method. In this way, software and hardware resources and network information can be shared according to the needs of computers or other devices. .

现有云计算中有三种服务模式:There are three service modes in existing cloud computing:

软件即服务(Software-as-a-Service,简称为SaaS):消费者使用应用程序,但并不掌控操作系统、硬件或运作的网络基础架构。是一种服务观念的基础,软件服务供应商,以租赁的概念提供客户服务,而非购买,比较常见的模式是提供一组账号密码。Software-as-a-Service (SaaS for short): Consumers use applications, but do not control the operating system, hardware, or operational network infrastructure. It is the basis of a service concept. The software service provider provides customer service with the concept of leasing instead of purchasing. The more common mode is to provide a set of account passwords.

平台即服务(Platform-as-a-Service,简称为PaaS):消费者使用主机操作应用程序。消费者掌控运作应用程序的环境(也拥有主机部分掌控权),但并不掌控操作系统、硬件或运作的网络基础架构。平台通常是应用程序基础架构。Platform-as-a-Service (PaaS for short): Consumers use host operations applications. Consumers control the environment in which the application runs (and also have control over the host), but do not control the operating system, hardware, or operational network infrastructure. The platform is usually the application infrastructure.

基础架构即服务(Infrastructure-as-a-Service,简称为IaaS):提供给消费者的服务是对所有设施的利用,包括处理、存储、网络和其它基本的计算资源,用户能够部署和运行任意软件,包括操作系统和应用程序。消费者不管理或控制任何云计算基础设施,但能控制操作系统的选择、储存空间、部署的应用,也有可能获得有限制的网络组件(例如,防火墙,负载均衡器等)的控制。Infrastructure-as-a-Service (IaaS): The service provided to consumers is the utilization of all facilities, including processing, storage, network and other basic computing resources, users can deploy and run arbitrary Software, including operating systems and applications. Consumers do not manage or control any cloud computing infrastructure, but can control the choice of operating system, storage space, deployed applications, and possibly control of restricted network components (eg, firewalls, load balancers, etc.).

图1是现有常见的一种云计算架构模式,在该模式中,用户通过控制台创建自己的云环境,例如可以创建虚机、创建网络、创建镜像模板等等;在现有技术中,云计算还扩充了其他的服务,比如负载均衡服务、防火墙、VPN(Virtual Private Network,虚拟专用网络)等等。FIG. 1 is a common cloud computing architecture mode in which a user creates his own cloud environment through a console, for example, a virtual machine can be created, a network is created, a mirror template is created, and the like; in the prior art, Cloud computing also expands other services, such as load balancing services, firewalls, VPNs (Virtual Private Network), and more.

在上述扩充的服务中,其中负载均衡服务是一种常见的网络设备,主要作用在于提供一种有效透明的方法扩展网络设备和服务器的带宽、增加吞吐量、加强网络数据处理能力、提高网络的灵活性和可用性等。目前,云计算中的负载均衡服务通常设置 在用户的一个虚拟网络中,也即与用户的一个虚拟网络属于同一个二层网络,当负载均衡服务于该虚机网络中的网络设备时,直接就可以进行数据的转发,不需要寻址等额外操作;而对于其他与负载均衡服务不属于同一个二层网络的虚拟网络,当负载均衡服务于该虚拟网络中的网络设备时,需要通过路由寻址才可以进行数据的转发,在该情况下,当有大量的云计算服务需要处理时,会对云计算及负载均衡系统构成较大的冲击,所以,降低了负载均衡处理服务的性能。Among the above-mentioned extended services, the load balancing service is a common network device, and its main function is to provide an effective and transparent method for expanding the bandwidth of the network device and the server, increasing the throughput, strengthening the network data processing capability, and improving the network. Flexibility and usability, etc. Currently, load balancing services in cloud computing are usually set up. In a virtual network of the user, that is, a virtual network belonging to the user belongs to the same layer 2 network. When the load balancing service is applied to the network device in the virtual machine network, the data can be directly forwarded without addressing. For other virtual networks that do not belong to the same Layer 2 network as the load balancing service, when load balancing services the network devices in the virtual network, the data needs to be forwarded through route addressing. In this case, when a large number of cloud computing services need to be processed, it will have a large impact on the cloud computing and load balancing system, so the performance of the load balancing processing service is reduced.

因此,在云计算中如何提高负载均衡服务的服务性能,是需要解决的关键问题。Therefore, how to improve the service performance of load balancing services in cloud computing is a key issue that needs to be solved.

发明内容Summary of the invention

本发明要解决的技术问题在于,提供一种实现负载均衡的方法、装置及负载均衡服务系统,能够解决负载均衡服务性能低的问题。The technical problem to be solved by the present invention is to provide a method, a device and a load balancing service system for implementing load balancing, which can solve the problem of low performance of the load balancing service.

为了将解决上述问题,本申请实施例提供了一种实现负载均衡的方法,包括:In order to solve the above problem, the embodiment of the present application provides a method for implementing load balancing, including:

根据创建请求分别创建虚拟网络系统和负载均衡模块,并将所述负载均衡模块接入所述虚拟网络系统,所述虚拟网络系统包括至少一个虚拟机;Creating a virtual network system and a load balancing module according to the creation request, and connecting the load balancing module to the virtual network system, where the virtual network system includes at least one virtual machine;

将与所述负载均衡模块不在同一个网段的虚拟机的网络信息存储在负载均衡模块中,并将所述虚拟机配置为负载均衡模块后端的应用服务节点;Storing the network information of the virtual machine that is not on the same network segment as the load balancing module in the load balancing module, and configuring the virtual machine as an application service node at the back end of the load balancing module;

需要负载均衡处理的数据包通过所述负载均衡模块转发到所述虚拟机中进行处理。The data packet requiring load balancing processing is forwarded to the virtual machine for processing by the load balancing module.

在本发明一实施例中,所述创建虚拟网络系统和负载均衡模块,并将所述负载均衡模块接入所述虚拟网络系统具体为:In an embodiment of the present invention, the creating a virtual network system and a load balancing module, and accessing the load balancing module to the virtual network system is specifically:

创建虚拟子网,所述虚拟子网包括:一级虚拟子网和/或多级虚拟子网;所述一级虚拟子网包括至少一个通过虚拟交换机接入虚拟网络系统的虚拟机;所述多级虚拟子网包括至少一个通过虚拟交换机接入虚拟网络系统的虚拟机;所述多级虚拟子网中的虚拟交换机通过其他至少一个一级虚拟子网中的虚拟交换机逐级接入虚拟网络系统;Creating a virtual subnet, the virtual subnet comprising: a first level virtual subnet and/or a multi-level virtual subnet; the first level virtual subnet comprising at least one virtual machine accessing the virtual network system through the virtual switch; The multi-level virtual subnet includes at least one virtual machine that accesses the virtual network system through the virtual switch; the virtual switch in the multi-level virtual subnet accesses the virtual network step by step through the virtual switch in the other at least one level one virtual subnet. system;

创建负载均衡模块,并将所述负载均衡模块直接接入虚拟网络系统。Create a load balancing module and directly connect the load balancing module to the virtual network system.

在本发明一实施例中,所述创建虚拟子网具体为:创建至少一个一级虚拟子网,将一级虚拟子网中的虚拟交换机直接接入虚拟网络系统。 In an embodiment of the present invention, the creating a virtual subnet is specifically: creating at least one level one virtual subnet, and directly connecting the virtual switch in the level one virtual subnet to the virtual network system.

在本发明一实施例中,所述一级虚拟子网在所述虚拟网络系统中通过以下方式中的任意一种实现网络隔离:虚拟局域网(Virtual Local Area Network,简称为VLAN)、通用路由封装(Generic Routing Encapsulation,简称GRE)、虚拟可扩展局域网(Virtual eXtensible Local Area Network,简称为VXLAN);对应在所述一级虚拟子网中的虚拟机的网络信息为以下信息中的任意一种:VLAN信息、GRE信息、VXLAN信息。In an embodiment of the present invention, the first-level virtual sub-network implements network isolation in any one of the following manners in the virtual network system: a virtual local area network (VLAN), and a general routing package. (Generic Routing Encapsulation, GRE for short), Virtual eXtensible Local Area Network (VXLAN); the network information corresponding to the virtual machine in the first-level virtual subnet is any one of the following information: VLAN information, GRE information, and VXLAN information.

在本发明一实施例中,所述将与所述负载均衡模块不在同一个网段的虚拟机的网络信息存储在负载均衡模块中具体为:In an embodiment of the present invention, the network information of the virtual machine that is not in the same network segment as the load balancing module is stored in the load balancing module, specifically:

获取至少一个与所述负载均衡模块不在同一个网段的虚拟机的网络信息;Obtaining at least one network information of a virtual machine that is not in the same network segment as the load balancing module;

根据获取的所述虚拟机的网络信息创建对应于各虚拟机的虚拟网络设备或流表信息,并将其保存在负载均衡模块中。And creating virtual network device or flow table information corresponding to each virtual machine according to the acquired network information of the virtual machine, and saving the information in the load balancing module.

为了解决上述问题,本申请还提供了一种实现负载均衡的装置,包括:创建模块,处理模块和转发模块;In order to solve the above problem, the present application further provides an apparatus for implementing load balancing, including: a creating module, a processing module, and a forwarding module;

所述创建模块设置为根据创建请求分别创建虚拟网络系统和负载均衡模块,并将所述负载均衡模块接入所述虚拟网络系统,所述虚拟网络系统包括至少一个虚拟机;The creating module is configured to separately create a virtual network system and a load balancing module according to the creation request, and connect the load balancing module to the virtual network system, where the virtual network system includes at least one virtual machine;

所述处理模块设置为将与所述负载均衡模块不在同一个网段的虚拟机的网络信息存储在负载均衡模块中,并将所述虚拟机配置为负载均衡模块后端的应用服务节点;The processing module is configured to store network information of a virtual machine that is not in the same network segment as the load balancing module in a load balancing module, and configure the virtual machine as an application service node at a back end of the load balancing module;

所述转发模块设置为将需要负载均衡处理的数据包通过所述负载均衡模块转发到所述虚拟机中进行处理。The forwarding module is configured to forward the data packet requiring load balancing processing to the virtual machine through the load balancing module for processing.

在本发明一实施例中,所述创建模块包括子网创建单元和负载均衡创建单元;In an embodiment of the invention, the creating module includes a subnet creating unit and a load balancing creating unit;

所述子网创建单元设置为创建虚拟子网,所述虚拟子网包括:一级虚拟子网和/或多级虚拟子网;所述一级虚拟子网包括至少一个通过虚拟交换机接入虚拟网络系统的虚拟机;所述多级虚拟子网中的虚拟交换机通过其他至少一个一级虚拟子网中的虚拟交换机逐级接入虚拟网络系统;The subnet creating unit is configured to create a virtual subnet, where the virtual subnet includes: a first level virtual subnet and/or a multi-level virtual subnet; and the first level virtual subnet includes at least one virtual access through a virtual switch. a virtual machine in the network system; the virtual switch in the multi-level virtual subnet accesses the virtual network system step by step through virtual switches in the other at least one level one virtual subnet;

所述负载均衡创建单元设置为创建负载均衡模块,并将所述负载均衡模块直接接入虚拟网络系统。The load balancing creation unit is configured to create a load balancing module and directly connect the load balancing module to the virtual network system.

在本发明一实施例中,所述子网创建单元创建虚拟子网具体为:创建至少一个一级虚拟子网,将一级虚拟子网中的虚拟交换机直接接入虚拟网络系统。 In an embodiment of the present invention, the subnet creating unit creates a virtual subnet specifically: creating at least one level one virtual subnet, and directly connecting the virtual switch in the first level virtual subnet to the virtual network system.

在本发明一实施例中,所述子网创建单元创建的虚拟子网在所述虚拟网络系统中通过以下方式中的任意一种实现网络隔离:VLAN、GRE、VXLAN;对应在所述一级虚拟子网中的虚拟机的网络信息为以下信息中的任意一种:VLAN信息、GRE信息、VXLAN信息。In an embodiment of the present invention, the virtual subnet created by the subnet creating unit implements network isolation in any one of the following manners in the virtual network system: VLAN, GRE, VXLAN; corresponding to the first level The network information of the virtual machine in the virtual subnet is any one of the following information: VLAN information, GRE information, and VXLAN information.

在本发明一实施例中,处理模块还包括获取单元和创建单元;In an embodiment of the invention, the processing module further includes an obtaining unit and a creating unit;

所述获取单元设置为获取至少一个与所述负载均衡模块不在同一个网段的虚拟机的网络信息;The obtaining unit is configured to acquire network information of at least one virtual machine that is not in the same network segment as the load balancing module;

所述创建单元设置为根据获取的所述虚拟机的网络信息创建对应于各虚拟机的虚拟网络设备或者流表信息,并将其保存在负载均衡模块中。The creating unit is configured to create virtual network device or flow table information corresponding to each virtual machine according to the acquired network information of the virtual machine, and save the information in the load balancing module.

为了解决上述问题,本申请还提供了一种负载均衡服务系统,包括:虚拟网络系统和负载均衡模块;In order to solve the above problem, the present application further provides a load balancing service system, including: a virtual network system and a load balancing module;

所述负载均衡模块接入所述虚拟网络系统,并为所述虚拟网络系统中的至少一个虚拟机提供负载均衡服务;The load balancing module accesses the virtual network system and provides a load balancing service for at least one virtual machine in the virtual network system;

所述负载均衡模块设置为存储与其不在同一个网段的虚拟机的网络信息,同时将所述的虚拟机配置为其后端服务节点,以及用于将需要负载均衡处理的数据包通过所述负载均衡模块转发到所述虚拟机中进行处理。The load balancing module is configured to store network information of a virtual machine that is not in the same network segment as the virtual machine, and configure the virtual machine as its backend service node, and to pass the data packet requiring load balancing processing The load balancing module forwards to the virtual machine for processing.

本发明的有益效果是:The beneficial effects of the invention are:

本发明提供一种实现负载均衡的方法、装置及负载均衡服务系统,解决了负载均衡服务性能低的问题。本发明的内容是根据创建请求创建虚拟网络系统和负载均衡模块,并将创建的负载均衡模块接入虚拟网络系统中,创建的虚拟网络系统中包括至少一个虚拟机;将与负载均衡模块不在同一个网段的虚拟机的网络信息存储在负载均衡模块中;当接收到的需要均衡处理的数据包存在于虚拟负载均衡处理网路中时,将该数据包通过所述负载均衡模块转发到所述虚拟机中进行处理。可见,本申请与现有技术相比较,通过将负载均衡模块和虚拟机配置到虚拟负载均衡处理网络中,使得负载均衡模块与任何一个虚拟机之间都处于同一个二层网络环境,当需要进行数据包的转发时,不需要进行路由寻址,直接通过负载均衡模块即可实现数据的直接转发,增强了负载均衡处理数据包的性能。因此,采用本身请中的方案,能够解决负载均衡服务性能低的问题。 The invention provides a method, a device and a load balancing service system for implementing load balancing, which solves the problem that the performance of the load balancing service is low. The content of the present invention is to create a virtual network system and a load balancing module according to the creation request, and the created load balancing module is connected to the virtual network system, and the created virtual network system includes at least one virtual machine; The network information of the virtual machine of a network segment is stored in the load balancing module; when the received data packet requiring the equalization processing exists in the virtual load balancing processing network, the data packet is forwarded to the storage device through the load balancing module. Processing is performed in the virtual machine. It can be seen that, compared with the prior art, the present application configures the load balancing module and the virtual machine into the virtual load balancing processing network, so that the load balancing module and any one of the virtual machines are in the same layer 2 network environment, when needed. When forwarding data packets, routing addressing is not required, and the data can be directly forwarded directly through the load balancing module, which enhances the performance of the load balancing processing data packet. Therefore, the solution of the load balancing service can be solved by adopting the solution in itself.

附图说明DRAWINGS

图1是本发明提供的现有技术中的一种云计算系统网络架构;1 is a network architecture of a cloud computing system in the prior art provided by the present invention;

图2是本发明第一实施例提供的实现负载均衡的方法流程图;2 is a flowchart of a method for implementing load balancing according to a first embodiment of the present invention;

图3是本发明第一实施例提供的虚拟子网为一级虚拟子网时的虚拟网络系统和负载均衡模块组成的云计算网络架构图;3 is a schematic diagram of a cloud computing network architecture composed of a virtual network system and a load balancing module when the virtual subnet is a primary virtual subnet provided by the first embodiment of the present invention;

图4是本发明第二实施例提供的实现负载均衡的装置模块结构示意图;4 is a schematic structural diagram of a device module for implementing load balancing according to a second embodiment of the present invention;

图5是本发明第三实施例中提供的负载均衡服务系统结构示意图;5 is a schematic structural diagram of a load balancing service system provided in a third embodiment of the present invention;

图6是本发明第四实施例提供的一种在云计算中实现负载均衡创建的方法流程图。FIG. 6 is a flowchart of a method for implementing load balancing creation in cloud computing according to a fourth embodiment of the present invention.

具体实施方式detailed description

本实施例涉及在云计算中实现负载均衡的方法,进一步地,本实施例实际涉及在云计算中如何提高负载均衡服务性能的方法;应当理解,尽管本实施例公开包括关于云计算中提高负载均衡性能的详细描述,但其中记载的技术方案The embodiment relates to a method for implementing load balancing in cloud computing. Further, the embodiment actually relates to a method for improving load balancing service performance in cloud computing; it should be understood that although the embodiment disclosed includes improving load in cloud computing Detailed description of the balanced performance, but the technical solutions described therein

的实现却不限于云计算环境。而是本发明的各实施例能够结合现在己知或以后开发的任何其它类型的计算环境也可实现的方案。The implementation is not limited to the cloud computing environment. Rather, embodiments of the invention can be implemented in conjunction with any other type of computing environment now known or later developed.

云计算是一种服务交付模式,用于对共享的可配置计算资源池进行方便、按需的网络访问。可配置计算资源是能够以最小的管理成本或与服务提供者进行最少的交互就能快速部署和释放的资源,例如可以是网络、网络带宽、服务器、处理、内存、存储、应用、虚拟机和服务。这种云模式可以包括至少五个特征、至少三个服务模型(背景技术中已经说明)和至少四个部署模型。Cloud computing is a service delivery model for convenient, on-demand network access to shared configurable computing resource pools. A configurable computing resource is a resource that can be quickly deployed and released with minimal administrative cost or minimal interaction with a service provider, such as network, network bandwidth, servers, processing, memory, storage, applications, virtual machines, and service. Such a cloud model may include at least five features, at least three service models (already described in the background), and at least four deployment models.

特征包括:Features include:

按需自助式服务:云的消费者在无需与服务提供者进行人为交互的情况下能够单方面自动地按需部署诸如服务器时间和网络存储等的计算能力。On-demand self-service: Cloud consumers can unilaterally and automatically deploy computing power such as server time and network storage on-demand, without the need for human interaction with service providers.

广泛的网络接入:计算能力可以通过标准机制在网络上获取,这种标准机制促进了通过不同种类的瘦客户机平台或厚客户机平台(例如移动电话、膝上型电脑、个人数字助理PDA)对云的使用。 Extensive network access: Computational capabilities can be obtained on the network through standard mechanisms that facilitate the adoption of different types of thin client platforms or thick client platforms (eg mobile phones, laptops, personal digital assistant PDAs) ) the use of the cloud.

资源池:提供者的计算资源被归入资源池并通过多租户(multi-tenant)模式服务于多重消费者,其中按需将不同的实体资源和虚拟资源动态地分配和再分配。一般情况下,消费者不能控制或甚至并不知晓所提供的资源的确切位置,但可以在较高抽象程度上指定位置(例如国家、州或数据中心),因此具有位置无关性。Resource pool: The provider's computing resources are grouped into resource pools and serve multiple consumers through a multi-tenant model, where different physical and virtual resources are dynamically allocated and reallocated as needed. In general, consumers cannot control or even know the exact location of the resources provided, but can specify locations (such as countries, states, or data centers) at a higher level of abstraction and are therefore location-independent.

迅速弹性:能够迅速、有弹性地(有时是自动地)部署计算能力,以实现快速扩展,并且能迅速释放来快速缩小。在消费者看来,用于部署的可用计算能力往往显得是无限的,并能在任意时候都能获取任意数量的计算能力。Rapid resiliency: Ability to deploy computing power quickly, flexibly (and sometimes automatically) for rapid expansion and rapid release for rapid shrinking. In the consumer's view, the computing power available for deployment tends to be infinite and can capture any amount of computing power at any time.

可测量的服务:云系统通过利用适于服务类型(例如存储、处理、带宽和活跃消费者帐号)的某种抽象程度的计量能力,自动地控制和优化资源效用。可以监测、控制和报告资源使用情况,为所用服务的提供者和消费者双方提供透明度。Measurable Services: Cloud systems automatically control and optimize resource utility by leveraging some level of abstraction that is appropriate for the type of service (eg, storage, processing, bandwidth, and active consumer accounts). Resource usage can be monitored, controlled and reported to provide transparency to both providers and consumers of the services used.

部署模型如下:The deployment model is as follows:

私有云:云基础架构单独为某个组织运行。云基础架构可以由该组织或第三方管理并且可以存在于该组织内部或外部。Private cloud: The cloud infrastructure runs separately for an organization. The cloud infrastructure can be managed by the organization or a third party and can exist inside or outside the organization.

共同体云:云基础架构被若干组织共享并支持有共同利害关系(例如任务使命、安全要求、政策和合规考虑)的特定共同体。共同体云可以由共同体内的多个组织或第三方管理并且可以存在于该共同体内部或外部。Community Cloud: The cloud infrastructure is shared by several organizations and supports a specific community of shared interests such as mission mandates, security requirements, policies, and compliance considerations. The community cloud can be managed by multiple organizations or third parties within the community and can exist inside or outside the community.

公共云:云基础架构向公众或大型产业群提供并由出售云服务的组织拥有。Public cloud: The cloud infrastructure is provided to the public or large industry groups and is owned by organizations that sell cloud services.

混合云:云基础架构由两个或更多部署模型的云(私有云、共同体云或公共云)组成,这些云依然是独特的实体,但是通过使数据和应用能够移植的标准化技术或私有技术(例如用于云之间的负载平衡的云突发流量分担技术)绑定在一起。Hybrid Cloud: A cloud infrastructure consists of two or more deployment models of clouds (private, community, or public) that remain unique entities, but with standardized or proprietary technologies that enable data and applications to be ported. (For example, cloud burst traffic sharing technology for load balancing between clouds) is bundled together.

云计算环境是面向服务的,特点集中在无状态性、低祸合性、模块性和语意的互操作性。云计算的核心是包含互连节点网络的基础架构。The cloud computing environment is service-oriented, with features focused on statelessness, low-complexity, modularity, and semantic interoperability. At the heart of cloud computing is the infrastructure that encompasses the network of interconnected nodes.

本实施例中,根据创建请求创建虚拟网络系统和负载均衡模块,并将创建的负载均衡模块接入虚拟网络系统中,创建的虚拟网络系统中包括至少一个虚拟机;将与负载均衡模块不在同一个网段的虚拟机的网络信息存储在负载均衡模块中,并将所述虚拟机配置为负载均衡模块后端的应用服务节点;当接收到的需要均衡处理的数据包时,将该数据包通过负载均衡模块转发到虚拟机中进行处理。在本发明的一实施例中,创建虚拟网络系统和负载均衡模块的具体方式为:创建虚拟子网,该虚拟子网包括:一级虚拟子网和/或一个多级虚拟子网;该一级虚拟子网包括至少一个通过虚拟交换机接 入虚拟网络的虚拟机;该多级虚拟子网中的虚拟交换机通过其他至少一个一级虚拟子网中的虚拟交换机逐级接入虚拟网络;创建负载均衡模块,并将负载均衡模块直接接入虚拟网络系统;本实施例中,创建的云计算网络架构中,将与负载均衡模块不在同一个网段的虚拟机配置为负载均衡模块后端的应用服务节点,如此构建云计算网络架构的目的在于使得负载均衡模块与任何一个虚拟机即使不处于相同的网段(二层网络),也可不需要经过路由寻址即可进行数据包转发。采用本实施例中的方案,避免现有技术中当需要服务的虚拟机与负载均衡系统不在同一个网段时,需要进行路由寻址才可进行数据转发的问题,因此,采用本实施例中的方法能够解决负载均衡服务性能低的问题。In this embodiment, the virtual network system and the load balancing module are created according to the creation request, and the created load balancing module is connected to the virtual network system, and the created virtual network system includes at least one virtual machine; The network information of the virtual machine of a network segment is stored in the load balancing module, and the virtual machine is configured as an application service node at the back end of the load balancing module; when the received data packet requiring equalization processing is received, the data packet is passed. The load balancing module forwards to the virtual machine for processing. In an embodiment of the present invention, a specific manner of creating a virtual network system and a load balancing module is: creating a virtual subnet, where the virtual subnet includes: a first-level virtual subnet and/or a multi-level virtual subnet; Level virtual subnets include at least one connected through a virtual switch a virtual machine that enters a virtual network; the virtual switch in the multi-level virtual subnet accesses the virtual network step by step through virtual switches in at least one first-level virtual subnet; creates a load balancing module, and directly connects the load balancing module In the cloud computing network architecture, the virtual machine that is not in the same network segment as the load balancing module is configured as the application service node of the load balancing module backend, and the purpose of constructing the cloud computing network architecture is to Even if the load balancing module and any one of the virtual machines are not in the same network segment (Layer 2 network), the packet forwarding can be performed without routing. The solution in this embodiment is used to avoid the problem that the data forwarding is performed when the virtual machine that needs to be served is not in the same network segment as the load balancing system in the prior art. Therefore, in this embodiment, The method can solve the problem of low performance of the load balancing service.

为了对本实施例能够更好的理解,下面结合具体的实施例对本申请的内容做进一步说明:In order to better understand the present embodiment, the content of the present application will be further described below in conjunction with specific embodiments:

在本实施例中,所使用的术语只是为了描述特定实施例,而不对本公开作出限制。例如使用的,单数形式“一”、“一个”以及“所述”“该”也包括复数形式,除非上下文明确地指出。此外,术语“一”、“一个”等等的使用不表示对数量的限制,而是表示被引用的项中的至少一个的存在。进一步可以理解,本说明中所使用的术语“包括”表示指定的特点、步骤、操作、元件和/或组件的存在,但是不排除一个或多个其他特点、步骤、操作、元件、组件和/或其组合的存在或添加。In the present embodiment, the terminology used is for the purpose of describing particular embodiments, and is not intended to limit the invention. The singular forms "a", "the", and "the" Furthermore, the use of the terms "a", "an", etc. does not denote a limitation of the quantity, but rather the presence of at least one of the referenced items. It is further understood that the term "comprising", used in the <RTI ID=0.0> </RTI> <RTIgt; </ RTI> <RTIgt; </ RTI> <RTIgt; </ RTI> <RTIgt; </ RTI> <RTIgt; The presence or addition of a combination thereof.

实施例一:Embodiment 1:

图2为本实施例提供的一种实现负载均衡的方法流程图,包括:FIG. 2 is a flowchart of a method for implementing load balancing according to an embodiment of the present disclosure, including:

步骤101:根据创建请求分别创建包含有虚拟机的虚拟网络系统和负载均衡模块;Step 101: Create a virtual network system and a load balancing module including a virtual machine according to the creation request.

步骤102:将与负载均衡模块不在同一个网段的虚拟机的网络信息存储在负载均衡模块中,并将所述虚拟机配置为负载均衡模块后端的应用服务节点;Step 102: The network information of the virtual machine that is not in the same network segment as the load balancing module is stored in the load balancing module, and the virtual machine is configured as an application service node at the back end of the load balancing module.

步骤103:需要转发的数据包通过负载均衡模块转发到需要的虚拟机中进行处理。Step 103: The data packet to be forwarded is forwarded to the required virtual machine through the load balancing module for processing.

在本实施例中,发起创建请求的主体包括用户,用户通过操控台发起创建请求,系统接收到用户发起的创建请求后,根据创建请求的内容,创建用户所需要的虚拟网络架构,在本实施例中,根据用户发起的虚拟网络系统创建请求创建的虚拟网络系统至少包括:虚拟网络,网关,路由以及虚拟机等,并将创建的网关,路由以及虚拟机加入虚拟网络;根据用户发起的创建负载均衡服务请求创建负载均衡模块,并将创建 的虚拟配置为负载均衡模块后端的应用服务节点。在本实施例中,创建的该负载均衡模块可以为用户提供更高性能的负载均衡服务。In this embodiment, the entity that initiates the creation request includes a user, and the user initiates a creation request through the console. After receiving the creation request initiated by the user, the system creates a virtual network architecture required by the user according to the content of the creation request. In the example, the virtual network system created according to the user-initiated virtual network system creation request includes at least: a virtual network, a gateway, a route, a virtual machine, and the like, and the created gateway, the route, and the virtual machine are added to the virtual network; The load balancing service requests to create a load balancing module and will create The virtual configuration is the application service node of the load balancing module backend. In this embodiment, the created load balancing module can provide a higher performance load balancing service for the user.

在步骤101中,根据用户请求分别创建虚拟网络系统和负载均衡模块,创建的该虚拟网络系统包括至少一个虚拟机;在本实施例中,当创建的所述虚拟机为两个以上时,所述虚拟机可以属于同一个二层网络,也可属于不同的二层网络。在本实施例中,在创建完成虚拟网络系统和负载均衡模块以后,将创建的负载均衡模块接入创建的虚拟网络系统,保证负载均衡模块可以与虚拟网络系统网络互联。In the step 101, the virtual network system and the load balancing module are separately created according to the user request, and the created virtual network system includes at least one virtual machine. In this embodiment, when the virtual machine is created, the virtual machine is more than two. The VMs can belong to the same Layer 2 network or belong to different Layer 2 networks. In this embodiment, after the virtual network system and the load balancing module are created, the created load balancing module is connected to the created virtual network system to ensure that the load balancing module can be interconnected with the virtual network system network.

在本实施例中所述虚拟网络系统是指在云计算服务中为用户提供的虚拟3层网络,在该虚拟网络中用户可以创建自己的子网、路由、网关等等网络设备,也可以对不同网络进行互通设置操作,网络的表现和物理网络完全一致。In this embodiment, the virtual network system refers to a virtual layer 3 network provided for users in a cloud computing service, in which a user can create a network device such as a subnet, a route, a gateway, or the like, or Different networks perform interworking settings, and the performance of the network is exactly the same as the physical network.

在步骤102中,获取与负载均衡模块不在同一个网段的虚拟机的网络信息(该网络信息是之前已经配置好的网络信息),并将该网络信息存储在负载均衡模块中,同时,并将该虚拟机配置为负载均衡模块后端的应用服务节点。在本实施例中,所述的虚拟机与负载均衡模块不在同一个网段优选为虚拟与负载均衡模块不在同一个二层网络。In step 102, acquiring network information of the virtual machine that is not in the same network segment as the load balancing module (the network information is previously configured network information), and storing the network information in the load balancing module, and simultaneously The virtual machine is configured as an application service node at the back end of the load balancing module. In this embodiment, the virtual machine and the load balancing module are not in the same network segment, and the virtual and load balancing modules are not in the same Layer 2 network.

在本实施例中,通过该负载均衡模块可实现直接和虚拟机进行通讯,不需要负载均衡模块一定要和虚拟机在一个网段中。In this embodiment, the load balancing module can directly communicate with the virtual machine, and the load balancing module does not need to be in a network segment with the virtual machine.

优选地,在本实施例中,根据创建请求创建负载均衡模块时还包括配置负载均衡模块的负载均衡算法,健康检查和会话保持功能等功能:Preferably, in this embodiment, when the load balancing module is created according to the creation request, the load balancing algorithm, the health check and the session hold function of the load balancing module are further included:

所述负载均衡算法,包括轮询、比率、优先权、最少连接数、最快响应时间等等通用的负载均衡算法,也包括哈希算法、基于策略的负载均衡、基于数据包的内容分发等等高级算法。The load balancing algorithm includes a general load balancing algorithm such as polling, ratio, priority, minimum connection number, and fastest response time, and includes a hash algorithm, policy-based load balancing, packet-based content distribution, and the like. And other advanced algorithms.

所述健康检查,是指检查服务器开放的各种服务的可用状态。负载均衡设备一般会配置各种健康检查方法,例如Ping,传输控制协议(Transfer Control Protocol,简称TCP),用户数据协议(User Date Protocol,简称UDP),超文本传输协议(Hypertext Transfer Protocol,简称HTTP),文件传输协议(File Transfer Protocol,简称FTP),域名系统(Domain Name System,DNS)等。Ping属于第三层的健康检查,用于检查服务器IP的连通性,而TCP/UDP属于第四层的健康检查,用于检查服务端口的UP/DOWN,如果要检查的更准确,就要用到基于7层的健康检查,例如创建一个HTTP健康检查,Get一个页面回来,并且检查页面内容是否包含一个指定的字符串,如果包含,则服 务是UP的,如果不包含或者取不回页面,就认为该服务器的Web服务是不可用(DOWN)的。The health check refers to checking the available status of various services opened by the server. The load balancing device is generally configured with various health check methods, such as Ping, Transmission Control Protocol (TCP), User Data Protocol (UDP), and Hypertext Transfer Protocol (HTTP). ), File Transfer Protocol (FTP), Domain Name System (DNS), etc. Ping belongs to the third-level health check, which is used to check the connectivity of the server IP. TCP/UDP belongs to the fourth-level health check, which is used to check the UP/DOWN of the service port. If you want to check the more accurate, you need to use Go to a 7-layer based health check, such as creating an HTTP health check, getting a page back, and checking if the page content contains a specified string, if it is included, then The service is UP. If the page is not included or cannot be retrieved, the server's web service is considered to be unavailable (DOWN).

所述会话保持,是指保持会话的连续性和一致性,由于服务器之间很难做到实时同步用户访问信息,这就要求把用户的前后访问会话保持到一台服务器上来处理。负载均衡设备一般会默认配置一些会话保持的选项,例如源地址的会话保持,Cookie会话保持等,基于不同的应用要配置不同的会话保持,否则会引起负载的不均衡甚至访问异常。The session retention refers to maintaining the continuity and consistency of the session. Since it is difficult for the servers to synchronize the user access information in real time, it is required to keep the user's front and back access sessions to a server for processing. The load balancing device generally configures some session-maintaining options by default, such as session keeping of the source address, keeping the cookie session, etc., depending on different applications, configuring different session holdings, otherwise the load may be unbalanced or even accessed abnormally.

在步骤103中,当接收到需要进行负载均衡处理的数据包时,优选地将该数据包根据负载均衡模块中的网络信息将接收到的数据包转发到虚拟机进行处理。In step 103, when receiving the data packet requiring load balancing processing, the data packet is preferably forwarded to the virtual machine for processing according to the network information in the load balancing module.

优选地,在本实施例中,创建的该负载均衡模块提供的负载均衡服务可以通过硬件实现,也可以通过软件实现,具体实现方式在本实施例中不做限制。Preferably, in this embodiment, the load balancing service provided by the load balancing module may be implemented by using hardware or by software. The specific implementation manner is not limited in this embodiment.

在本实施例中,优选该负载均衡模块为进行负载均衡处理的数据包提供对外地址,其中,该对外地址可以为用户自己创建的虚拟网络的地址,也可以直接为对外服务的公网地址,在本实施例中不做进一步限定。In this embodiment, the load balancing module is configured to provide an external address for the data packet that is subjected to the load balancing process, where the external address may be the address of the virtual network created by the user, or may be directly the public network address of the external service. It is not further limited in this embodiment.

进一步地,在本实施例中,根据创建请求创建虚拟网络以及负载均衡模块的具体方式包括:Further, in this embodiment, a specific manner of creating a virtual network and a load balancing module according to the creation request includes:

创建虚拟子网,创建的该虚拟子网包括一级虚拟子网和/或多级虚拟子网;优选地,在本实施例中,创建的该虚拟子网还包括创建虚拟机,网关,或者路由中的至少一项。Creating a virtual subnet, the virtual subnet being created includes a first-level virtual subnet and/or a multi-level virtual subnet; preferably, in the embodiment, the created virtual subnet further includes creating a virtual machine, a gateway, or At least one of the routes.

创建负载均衡模块,并将创建的负载均衡模块直接接入虚拟网络系统。Create a load balancing module and directly connect the created load balancing module to the virtual network system.

在本实施例中,所述的一级虚拟子网包括至少一个通过虚拟交换机接入虚拟网络系统的虚拟机,可理解为,该一级虚拟子网中只有第一级虚拟交换机控制至少一个虚拟机;具体的当负载均衡模块转发接收到的数据包时,由第一级虚拟交换机将接收到的数据包转发给虚拟机;该多级虚拟子网包括至少一个通过虚拟交换机接入虚拟网络系统的虚拟机;该多级虚拟子网中的虚拟交换机通过其他至少一个一级虚拟子网中的虚拟交换机逐级接入虚拟网络系统,也即可理解为该多级虚拟子网是通过至少两个虚拟交换机对虚拟机进行的逐级控制,该逐级控制可以理解为第一级虚拟交换机控制至少一个虚拟机和至少一个第二级虚拟交换机,该第二级虚拟交换机同时又控制多个虚拟机;当然还可包括更多级的虚拟交换机以及虚拟机;具体的当负载均衡模块转发数据包时,先通过第一级虚拟交换机将数据转发,如果在该级转发中没有找到需要的虚 拟机,则再通过第二级虚拟交换机将数据转发到需要的虚拟交换机中进行处理,当然还可包括更多级的虚拟交换机以及虚拟机。In this embodiment, the first-level virtual subnet includes at least one virtual machine that accesses the virtual network system through the virtual switch. It can be understood that only the first-level virtual switch in the first-level virtual subnet controls at least one virtual Specifically, when the load balancing module forwards the received data packet, the first-level virtual switch forwards the received data packet to the virtual machine; the multi-level virtual subnet includes at least one virtual network access system through the virtual switch. The virtual switch in the multi-level virtual subnet accesses the virtual network system step by step through the virtual switch in the other at least one level one virtual subnet, that is, the multi-level virtual subnet passes through at least two Step-by-step control of a virtual switch by a virtual switch, which can be understood as a first-level virtual switch controlling at least one virtual machine and at least one second-level virtual switch, and the second-level virtual switch simultaneously controls multiple virtual Machine; of course, can also include more levels of virtual switches and virtual machines; specifically when the load balancing module forwards packets First grade through the first virtual switch forwards the data, if the virtual need is not found at this level forwarding In the case of a virtual machine, the data is forwarded to the required virtual switch for processing, and of course, more levels of virtual switches and virtual machines can be included.

在本实施例中,优选创建的虚拟子网为至少一个一级虚拟子网,将创建的该至少一个一级虚拟子网通过虚拟交换机直接接入虚拟网络系统;在本实施例中,优选所述的一级虚拟子网是指该网络中包括一个控制或者连接至少一个虚拟机的虚拟交换机,由该虚拟交换机和控制或连接的至少一个虚拟机构成了一个一级虚拟子网;将虚拟机接入虚拟网络系统也可以理解为构建虚拟机与虚拟网络之间的数据转发的网络互通关系。In this embodiment, the created virtual subnet is at least one level one virtual subnet, and the created at least one level one virtual subnet is directly accessed to the virtual network system through the virtual switch. In this embodiment, The first-level virtual subnet refers to a virtual switch in the network that controls or connects at least one virtual machine, and the virtual switch and at least one virtual mechanism controlled or connected become a first-level virtual subnet; Accessing a virtual network system can also be understood as a network interworking relationship between data forwarding between a virtual machine and a virtual network.

为了对本实施例进一步说明,图3是本实施例中当创建的虚拟子网为一级虚拟子网时,虚拟网络系统和负载均衡模块构成的云计算网络架构图;上述图3是对本实施例的具体说明,优选该虚拟子网中的虚拟机与负载均衡模块不在同一个网段,当然在一个虚拟网络系统中也可以同时包括一级虚拟子网和多级虚拟子网。For further explanation of the embodiment, FIG. 3 is a schematic diagram of a cloud computing network architecture formed by a virtual network system and a load balancing module when the virtual subnet created in the embodiment is a first-level virtual subnet; FIG. 3 is the same embodiment. Specifically, the virtual machine in the virtual subnet is not in the same network segment as the load balancing module. Of course, in a virtual network system, the primary virtual subnet and the multi-level virtual subnet may be included at the same time.

当有数据包进入时,图3的云计算网络架构处理数据包的具体方式为:When a data packet enters, the specific manner of processing the data packet by the cloud computing network architecture of FIG. 3 is:

在图3中,优选网关接收到需要负载均衡处理的数据包以后,将该数据包发送到负载均衡模块中,例如,该需要负载均衡服务的数据包需要在MAC和IP地址分别为A和B的虚拟机上进行处理,负载均衡模块根据数据包的内容可根据之前存储的网络信息或者当前实时获取的对应于各虚拟机的网络信息,查找MAC和IP地址分别为A和B的对应的虚拟机,将该数据包先直接转发给虚拟子网中的虚拟交换机,然后由虚拟交换机选择将该数据包转发给MAC和IP地址分别为A和B的虚拟机进行处理。由图3可以看到,在本实施例中,对数据实现负载均衡,不需要经过路由寻址,仅需根据获取的网络信息即可实现数据的跨网段传输。In FIG. 3, after receiving the data packet requiring load balancing processing, the gateway sends the data packet to the load balancing module. For example, the data packet requiring the load balancing service needs to be A and B respectively. Processing on the virtual machine, the load balancing module can search for the corresponding virtual MAC and IP addresses respectively according to the previously stored network information or the network information corresponding to each virtual machine obtained in real time according to the content of the data packet. The packet is forwarded directly to the virtual switch in the virtual subnet, and then the virtual switch chooses to forward the packet to the virtual machine whose MAC and IP addresses are A and B respectively. As can be seen from FIG. 3, in the embodiment, load balancing is implemented on the data, and no route addressing is required, and only data transmission across the network segment can be implemented according to the acquired network information.

在本实施例中,优选地,图3中负载均衡模块将数据包转发给虚拟机进行处理之前,不仅需要根据之前存储的或者当前获取的对应于各虚拟机的网络信息,同时优选还需结合负载均衡算法等将该数据包转发到虚拟机进行处理。In this embodiment, preferably, before the load balancing module of FIG. 3 forwards the data packet to the virtual machine for processing, it is not only required to be based on previously stored or currently acquired network information corresponding to each virtual machine, but preferably also needs to be combined. The load balancing algorithm or the like forwards the data packet to the virtual machine for processing.

进一步地,在本实施例中,将与所述负载均衡模块不在同一个网段的虚拟机的网络信息存储在负载均衡模块中具体为:Further, in this embodiment, the network information of the virtual machine that is not on the same network segment as the load balancing module is stored in the load balancing module, specifically:

获取至少一个与负载均衡模块不在同一个网段的虚拟机的网络信息;在本实施例中,优选地,获取网络信息可以是在接收到需要负载均衡服务数据之前获取,也可以是在接收到需要负载均衡服务数据之后,根据需求实时获取,在本实施例中,优选在接收到负载均衡服务数据之前获取。 Obtaining at least one network information of the virtual machine that is not in the same network segment as the load balancing module. In this embodiment, preferably, acquiring the network information may be obtained before receiving the load balancing service data, or may be received. After the load balancing service data is required, it is acquired in real time according to requirements. In this embodiment, it is preferably acquired before receiving the load balancing service data.

获取网络信息之后,根据获取到的网络信息生成但不限于对应于各虚拟机的虚拟网络设备或者流表信息并将其存储在负载均衡模块中,在本实施例中,优选地,生成的该虚拟网络设备或者流表信息为对应于各虚拟机的地址列表信息,在本实施例中,还可以是其他的信息列表,只要通过该信息列表,能够不需要通过寻址直接就可将数据包发送到对应的虚拟机实现负载均衡的实施方式,都属于本申请请求保护的范围。After the network information is obtained, the virtual network device or the flow table information corresponding to each virtual machine is generated and stored in the load balancing module according to the obtained network information. In this embodiment, preferably, the generated The virtual network device or the flow table information is the address list information corresponding to each virtual machine. In this embodiment, it may also be another information list. By using the information list, the data packet can be directly received without addressing. The implementation manner of the load balancing sent to the corresponding virtual machine is within the scope of the claimed application.

进一步地,在本实施例中,优选虚拟网络系统通过以下方式中的任意一种实现虚拟机的网络隔离:VLAN,GRE和VXLAN;当然,还可以是其他的可能的网络隔离方式;上述隔离方式中的GRE和VXLAN是对隔离方式VLAN的扩展,因为随着云计算的发展,VLAN隔离方式中的VLAN ID有限,不能满足更大范围的云计算,因此,在VLAN的基础上进行了扩展,而GRE或VXLAN两种隔离方式是扩展后的隔离方式中的一种;Further, in this embodiment, the virtual network system preferably implements network isolation of the virtual machine by any one of the following methods: VLAN, GRE, and VXLAN; of course, other possible network isolation modes; GRE and VXLAN are extensions of the isolated VLAN. Because of the development of cloud computing, the VLAN ID in the VLAN isolation mode is limited and cannot satisfy a larger range of cloud computing. Therefore, it is extended on the basis of VLAN. GRE or VXLAN isolation is one of the extended isolation methods;

在本实施例中,获取到的网络信息为对虚拟机进行隔离的地址隔离信息,在本实施例中,获取虚拟机的网络信息为以下信息中的任意一种:VLAN信息、GRE信息、VXLAN信息,其中,VLAN信息至少包括VLAN ID信息,具体的包括虚拟机的物理地址信息或者网络地址信息;GRE信息也至少包括虚拟机的物理地址信息和/或网络地址信息;VXLAN信息需要物理机的网络地址信息,虚拟机的物理地址信息以及网络地址信息中的至少一种。In this embodiment, the obtained network information is the address isolation information for isolating the virtual machine. In this embodiment, the network information of the virtual machine is obtained as any one of the following information: VLAN information, GRE information, and VXLAN. Information, wherein the VLAN information includes at least VLAN ID information, specifically including physical address information or network address information of the virtual machine; the GRE information also includes at least physical address information and/or network address information of the virtual machine; the VXLAN information needs a physical machine. At least one of network address information, physical address information of the virtual machine, and network address information.

本实施例中,通过在构建的云计算网络结构中获取与负载均衡模块不在同一个网段的虚拟机的网络信息,根据该网络信息生成对应的虚拟网络设备或者流表信息,并将其存储在负载均衡模块中,这样做的目的在于将与负载均衡模块不在同一个网段的虚拟机配置为该负载均衡模块后端的服务节点;当数据需要负载均衡处理时,只需要根据该获取的网络信息或者是存储的虚拟网络设备或者流表信息,负载均衡模块就可直接卡网段且无需路由寻址直接将数据包转发到对应的虚拟机服务节点,所以,在加快了数据包负载均衡服务效率的同时,也提高了负载均衡服务的性能。In this embodiment, the network information of the virtual machine that is not in the same network segment as the load balancing module is obtained in the cloud computing network structure, and the corresponding virtual network device or flow table information is generated according to the network information, and is stored. In the load balancing module, the purpose of doing this is to configure a virtual machine that is not on the same network segment as the load balancing module as a service node at the back end of the load balancing module; when the data needs load balancing processing, only the acquired network needs to be obtained. The information is either the stored virtual network device or the flow table information, and the load balancing module can directly forward the data packet to the corresponding virtual machine service node without directly routing the route, so the data load balancing service is accelerated. At the same time, the performance of the load balancing service is also improved.

实施例二:Embodiment 2:

图4为本实施例提供的一种实现负载均衡的装置结构示意图,该装置包括:创建模块401,处理模块402和转发模块403;4 is a schematic structural diagram of an apparatus for implementing load balancing according to an embodiment of the present disclosure, where the apparatus includes: a creating module 401, a processing module 402, and a forwarding module 403;

创建模块401根据用户请求分别创建虚拟网络系统和负载均衡模块,创建的该虚拟网络系统包括至少一个虚拟机;在本实施例中,当创建的所述虚拟机为两个以上时,所述虚拟机可以属于同一个二层网络,也可属于不同的二层网络。在本实施例中,在 创建完成虚拟网络系统和负载均衡模块以后,将创建的负载均衡模块接入创建的虚拟网络系统,保证负载均衡模块可以与虚拟网络系统网络互联。The creating module 401 separately creates a virtual network system and a load balancing module according to the user request, and the created virtual network system includes at least one virtual machine. In this embodiment, when the created virtual machine is more than two, the virtual The machines can belong to the same Layer 2 network or belong to different Layer 2 networks. In this embodiment, in After the virtual network system and the load balancing module are created, the created load balancing module is connected to the created virtual network system to ensure that the load balancing module can be interconnected with the virtual network system network.

在本实施例中所述虚拟网络系统是指在云计算服务中为用户提供的虚拟3层网络,在该虚拟网络中用户可以创建自己的子网、路由、网关等等网络设备,也可以对不同网络进行互通设置操作,网络的表现和物理网络完全一致。In this embodiment, the virtual network system refers to a virtual layer 3 network provided for users in a cloud computing service, in which a user can create a network device such as a subnet, a route, a gateway, or the like, or Different networks perform interworking settings, and the performance of the network is exactly the same as the physical network.

处理模块402设置为获取与负载均衡模块不在同一个网段的虚拟机的网络信息,并将该网络信息存储在负载均衡模块中,同时,将所述虚拟机配置为负载均衡模块后端的服务节点,在本实施例中,所述的虚拟机与负载均衡模块不在同一个网段优选为虚拟与负载均衡模块不在同一个二层网络。The processing module 402 is configured to obtain network information of a virtual machine that is not in the same network segment as the load balancing module, and store the network information in the load balancing module, and configure the virtual machine as a service node at the back end of the load balancing module. In this embodiment, the virtual machine and the load balancing module are not in the same network segment, and the virtual and load balancing modules are not in the same Layer 2 network.

在本实施例中,通过该负载均衡模块可实现直接和虚拟机进行通讯,不需要负载均衡模块一定要和虚拟机在一个网段中。In this embodiment, the load balancing module can directly communicate with the virtual machine, and the load balancing module does not need to be in a network segment with the virtual machine.

优选地,在本实施例中,根据创建请求创建负载均衡模块时还包括配置负载均衡模块提供负载均衡算法,健康检查和会话保持功能等功能:Preferably, in this embodiment, when the load balancing module is created according to the creation request, the method further includes: configuring the load balancing module to provide a load balancing algorithm, a health check function, and a session maintaining function:

转发模块403设置为当接收到需要进行负载均衡处理的数据包时,将该数据包根据负载均衡模块中的网络信息将接收到的数据包转发到虚拟机进行处理。The forwarding module 403 is configured to forward the received data packet to the virtual machine for processing according to the network information in the load balancing module when receiving the data packet that needs to be subjected to load balancing processing.

优选地,在本实施例中,创建的该负载均衡模块提供的负载均衡服务可以通过硬件实现,也可以通过软件实现,具体实现方式在本实施例中不做限制。Preferably, in this embodiment, the load balancing service provided by the load balancing module may be implemented by using hardware or by software. The specific implementation manner is not limited in this embodiment.

在本实施例中,优选该负载均衡模块为需要进行负载均衡处理的数据包提供对外地址,其中,该对外地址可以为用户自己创建的虚拟网络的地址,也可以直接为对外服务的公网地址,在本实施例中不做进一步限定。In this embodiment, the load balancing module preferably provides an external address for the data packet that needs to be subjected to load balancing processing, where the external address may be the address of the virtual network created by the user, or may be directly used as the public network address of the external service. It is not further limited in this embodiment.

进一步地,在本实施例中,创建模块401包括子网创建单元4011和负载均衡创建单元4012;Further, in this embodiment, the creating module 401 includes a subnet creating unit 4011 and a load balancing creating unit 4012;

子网创建单元4011设置为创建虚拟子网,在本实施例中,创建的该虚拟子网还包括创建虚拟机,网关,或者路由中的至少一项。The subnet creating unit 4011 is configured to create a virtual subnet. In this embodiment, the created virtual subnet further includes at least one of creating a virtual machine, a gateway, or a route.

所述创建的虚拟子网包括:一级虚拟子网和/或多级虚拟子网;所述的一级虚拟子网包括至少一个通过虚拟交换机接入虚拟网络的虚拟机,可理解为,该一级虚拟子网中只有第一级虚拟交换机控制至少一个虚拟机;该多级虚拟子网包括至少一个虚拟交换机通过其他至少一个一级虚拟子网中的虚拟交换机逐级接入虚拟网络,也即可理解 为该多级虚拟子网是通过至少两个虚拟交换机对虚拟机进行的逐级控制,该逐级控制可以理解为第一级虚拟交换机控制至少一个虚拟机和至少一个第二级虚拟交换机,该第二级虚拟交换机同时又控制多个虚拟机。The created virtual subnet includes: a first-level virtual sub-network and/or a multi-level virtual sub-network; the first-level virtual sub-network includes at least one virtual machine that accesses the virtual network through the virtual switch, which can be understood as Only the first level virtual switch controls at least one virtual machine in the first level virtual subnet; the multi-level virtual subnet includes at least one virtual switch accessing the virtual network step by step through the virtual switch in the other at least one level one virtual subnet, Understand For the multi-level virtual subnet, the step-by-step control of the virtual machine by at least two virtual switches can be understood as the first-level virtual switch controlling at least one virtual machine and at least one second-level virtual switch. The second level virtual switch controls multiple virtual machines at the same time.

负载均衡创建单元4012设置为创建负载均衡模块,并将创建的负载均衡模块直接接入虚拟网络系统。The load balancing creation unit 4012 is configured to create a load balancing module and directly connect the created load balancing module to the virtual network system.

进一步地,在本实施例中,处理模块402包括获取单元4021;该获取单元4021设置为获取至少一个与负载均衡模块不在同一个网段的虚拟机的网络信息,该网络信息为对虚拟机进行网络隔离的信息,在本实施例中,优选获取单元4021可以是在接收到需要负载均衡服务的数据之前获取网络信息,也可以是在接收到需要负载均衡处理的数据之后,根据数据内容实时获取网络信息。Further, in this embodiment, the processing module 402 includes an obtaining unit 4021; the obtaining unit 4021 is configured to acquire network information of at least one virtual machine that is not in the same network segment as the load balancing module, where the network information is performed on the virtual machine. The information of the network is isolated. In this embodiment, the obtaining unit 4021 may acquire the network information before receiving the data that needs the load balancing service, or may acquire the data according to the data content after receiving the data that needs the load balancing processing. Internet Information.

优选地,在本实施例中,子网创建单元4011创建的虚拟子网在虚拟网络系统中优选但不限于通过以下方式中的任意一种对虚拟子网中的虚拟机实现网络隔离:VLAN,GRE和VXLAN;对应虚拟子网中的虚拟机的网络信息包括以下信息中的任意一种:VLAN信息、GRE信息、VXLAN信息;上述隔离方式中的GRE和VXLAN是对隔离方式VLAN的扩展,因为VLAN隔离方式中的VLAN ID有限,不能满足更大范围的云计算,因此,在VLAN的基础上进行了扩展,而GRE或VXLAN两种隔离方式是扩展后的隔离方式中的一种;Preferably, in the embodiment, the virtual subnet created by the subnet creating unit 4011 is preferably, but not limited to, network isolation in the virtual network system by using any one of the following manners: VLAN, GRE and VXLAN; the network information of the virtual machine in the corresponding virtual subnet includes any one of the following information: VLAN information, GRE information, VXLAN information; GRE and VXLAN in the above isolation mode are extensions to the isolated mode VLAN because The VLAN ID in the VLAN isolation mode is limited, and cannot satisfy a larger range of cloud computing. Therefore, the VLAN is extended based on the VLAN, and the GRE or VXLAN isolation mode is one of the extended isolation modes.

在本实施例中,优选获取单元4021获取的网络信息中:VLAN信息至少包括VLAN ID信息,具体的包括虚拟机的物理地址信息和/或网络地址信息;GRE信息也至少包括虚拟机的物理地址信息和/或网络地址信息;VXLAN信息需要物理机的网络地址信息,虚拟机的物理地址信息和网络地址信息中的至少一种。In the embodiment, the network information acquired by the obtaining unit 4021 is: the VLAN information includes at least the VLAN ID information, and specifically includes the physical address information and/or the network address information of the virtual machine; the GRE information also includes at least the physical address of the virtual machine. Information and/or network address information; VXLAN information requires at least one of network address information of a physical machine, physical address information of a virtual machine, and network address information.

在本实施例中,处理模块402还包括信息创建单元4022;In this embodiment, the processing module 402 further includes an information creating unit 4022;

信息创建单元4022根据获取单元4021获取到的网络信息创建对应于各虚拟机的虚拟网络设备或者流表信息,并将其保存在所述负载均衡模块中。在本实施例中,信息创建单元4022创建的虚拟网络设备或者流表信息为与各虚拟机对应的地址信息,该地址信息使得负载均衡模块可以不需要通过理由寻址就可实现跨网段的数据传输。The information creating unit 4022 creates virtual network device or flow table information corresponding to each virtual machine according to the network information acquired by the obtaining unit 4021, and saves it in the load balancing module. In this embodiment, the virtual network device or the flow table information created by the information creating unit 4022 is address information corresponding to each virtual machine, and the address information enables the load balancing module to implement cross-network segment without reasoning addressing. data transmission.

在本实施例中,当子网创建单元4011创建了一级虚拟子网,获取单元4021和信息创建单元4022根据获取的网络信息已经在负载均衡模块中创建了虚拟网络设备或者流表信息,该虚拟网络设备或者流表信息中包含获取单元4021获取的VLAN信息,GRE信息或VXLAN信息;在接收到需要负载均衡处理的数据包以后,将该数据包发 送到负载均衡模块中,负载均衡模块根据数据包的内容确定该数据包需要在其后端哪个服务节点(虚拟机)上进行处理,然后在虚拟网络设备或者流表信息中查找该服务节点对应地址,最后将该数据包通过虚拟交换机传输到对应的虚拟机进行处理。In this embodiment, when the subnet creating unit 4011 creates a level one virtual subnet, the obtaining unit 4021 and the information creating unit 4022 have created virtual network devices or flow table information in the load balancing module according to the acquired network information. The virtual network device or the flow table information includes the VLAN information, the GRE information, or the VXLAN information acquired by the obtaining unit 4021; after receiving the data packet requiring the load balancing processing, the data packet is sent. And sent to the load balancing module, the load balancing module determines, according to the content of the data packet, which service node (virtual machine) needs to be processed on the back end of the data packet, and then searches for the service node corresponding to the virtual network device or the flow table information. Address, and finally the packet is transmitted to the corresponding virtual machine through the virtual switch for processing.

采用本实施例中的实现负载均衡的装置,能够使得负载均衡模块仅根据获取到的网络信息(虚拟网络设备或者流表信息中的地址信息)就可在无需寻址的条件下实现跨网段的数据传输,提高的负载均衡的服务性能。The device for implementing load balancing in the embodiment can enable the load balancing module to implement the cross-network segment without addressing based on the acquired network information (virtual network device or address information in the flow table information). Data transfer improves service performance for load balancing.

实施例三:Embodiment 3:

本实施例中,提供了一种负载均衡服务系统,参见图5,该系统包括虚拟网络系统501和负载均衡模块502;In this embodiment, a load balancing service system is provided. Referring to FIG. 5, the system includes a virtual network system 501 and a load balancing module 502.

负载均衡模块502接入虚拟网络系统,并为虚拟网络系统中的至少一个虚拟机提供负载均衡服务。The load balancing module 502 accesses the virtual network system and provides load balancing services for at least one virtual machine in the virtual network system.

在本实施例中,该负载均衡模块502中存储有与其不在同一个网段的虚拟机的网络信息,存储该网络信息的目的在于将所述的虚拟机配置为其后端的服务节点。该网络信息在本实施例中优选为对虚拟机进行网络隔离的隔离方式中的相关信息。例如,当中采用的是VLAN方式对虚拟机进行网络隔离时,获取的网络信息包括VLAN ID;当采用GRE的方式对虚拟机网络进行隔离时,获取的网络信息包括Tag ID。In this embodiment, the load balancing module 502 stores network information of a virtual machine that is not in the same network segment as the network segment. The purpose of storing the network information is to configure the virtual machine as a service node at the back end. In this embodiment, the network information is preferably related information in an isolation manner of performing network isolation on the virtual machine. For example, when the network is isolated by the VLAN in the VLAN mode, the obtained network information includes the VLAN ID. When the virtual machine network is isolated by using the GRE, the obtained network information includes the tag ID.

当然,采用的隔离方式不限于本实施例中说列举的两种,还可以是VXLAN隔离方式,对应获取的网络信息包括VXLAN信息,包括物理机的网络地址信息,虚拟机的物理地址信息和网络地址信息。同时,在本实施例中,获取的网络信息不限于本实施例中所列举的几种,还包括其他可能且相关的地址信息或者标识信息。Certainly, the isolation mode used is not limited to the two types mentioned in the embodiment, and may also be a VXLAN isolation mode, and the corresponding network information includes VXLAN information, including network address information of the physical machine, physical address information and network of the virtual machine. Address information. In the meantime, in this embodiment, the acquired network information is not limited to the ones listed in the embodiment, and includes other possible and related address information or identification information.

在本实施例中,在负载均衡模块502中有需要转发的数据包时,负载均衡模块502根据存储的网络信息将需要转发的数据包直接转发给其后端的服务节点(虚拟机)进行处理。本实施例中的负载均衡服务系统,将与其不在同一个网段的虚拟机的网络信息进行存储,将所述的虚拟机配置为其后端的服务节点,这样在接收到需要负载均衡服务的数据包后,仅需根据存储的网络信息将该数据包进行对应后端服务节点(虚拟机)的处理即可,无需寻址。因此,提高了负载均衡服务的性能。In this embodiment, when there is a data packet to be forwarded in the load balancing module 502, the load balancing module 502 forwards the data packet to be forwarded directly to the service node (virtual machine) of the back end for processing according to the stored network information. The load balancing service system in this embodiment stores the network information of the virtual machine that is not in the same network segment, and configures the virtual machine as the service node of the back end, so that the data that needs the load balancing service is received. After the packet, the packet needs to be processed by the corresponding backend service node (virtual machine) according to the stored network information, and no addressing is needed. Therefore, the performance of the load balancing service is improved.

实施例四:Embodiment 4:

为了对本申请有进一步说明,本实施例中提出了一种在云计算中实现负载均衡创建的方法,参见图6,包括: In order to further explain the application, in this embodiment, a method for implementing load balancing creation in cloud computing is proposed. Referring to FIG. 6, the method includes:

步骤601:用户通过控制台登录;Step 601: The user logs in through the console.

步骤602:通过控制台先创建虚拟机;Step 602: Create a virtual machine first through the console.

步骤603:通过控制台创建虚拟网络;Step 603: Create a virtual network through the console.

步骤604:将步骤602中创建的虚拟机加入步骤603创建的虚拟网络中;Step 604: Add the virtual machine created in step 602 to the virtual network created in step 603.

步骤605:创建负载均衡模块(创建的过程中加入虚拟网络系统);Step 605: Create a load balancing module (adding a virtual network system during the creation process);

步骤606:采用VLAN方式隔离虚拟机时,负载均衡模块获取VLAN信息。Step 606: When the virtual machine is isolated by using the VLAN, the load balancing module obtains the VLAN information.

步骤607:根据获取到的VLAN信息创建流表信息,并将其存储在负载均衡模块中。Step 607: Create flow table information according to the obtained VLAN information, and store it in the load balancing module.

在步骤607中,负载均衡根据获取到的VLAN信息创建流表信息,将所述的虚拟机配置为其后端的服务节点,该流表信息可以保证和虚拟机直接通讯,这样,在负载均衡模块接收到数据包进行转发时就可以直接将包转发给对应的虚拟机,而不需要因为虚拟机处于多个网络设备而导致的必须路由转发才能到达。In step 607, load balancing creates flow table information according to the obtained VLAN information, and configures the virtual machine as a service node of the back end, and the flow table information can ensure direct communication with the virtual machine, so that the load balancing module When a packet is received for forwarding, the packet can be directly forwarded to the corresponding virtual machine, and the routing must be forwarded because the virtual machine is in multiple network devices.

通过上述的负载均衡创建的方法,可在用户创建负载均衡后同时完成各种虚拟网络的配置,实现从负载均衡模块节点到用户虚机节点数据链路连接,从而提高了负载均衡服务及整个云计算网络的性能,增强了用户的体验。Through the above-mentioned load balancing creation method, after the user creates the load balancing, the configuration of various virtual networks can be completed at the same time, and the data link connection from the load balancing module node to the user virtual machine node is realized, thereby improving the load balancing service and the entire cloud. Calculate the performance of the network and enhance the user experience.

以上内容是结合具体的实施方式对本发明所作的进一步详细说明,不能认定本发明的具体实施只局限于这些说明。对于本发明所属技术领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干简单推演或替换,都应当视为属于本发明的保护范围。The above is a further detailed description of the present invention in connection with the specific embodiments, and the specific embodiments of the present invention are not limited to the description. It will be apparent to those skilled in the art that the present invention may be made without departing from the spirit and scope of the invention.

工业实用性Industrial applicability

基于本发明实施例提供的上述技术方案,根据创建请求创建虚拟网络系统和负载均衡模块,并将创建的负载均衡模块接入虚拟网络系统中,创建的虚拟网络系统中包括至少一个虚拟机;将与负载均衡模块不在同一个网段的虚拟机的网络信息存储在负载均衡模块中;当接收到的需要均衡处理的数据包存在于虚拟负载均衡处理网路中时,将该数据包通过所述负载均衡模块转发到所述虚拟机中进行处理。可见,本申请与现有技术相比较,通过将负载均衡模块和虚拟机配置到虚拟负载均衡处理网络中,使得负载均衡模块与任何一个虚拟机之间都处于同一个二层网络环境,当需要进行数据包的转 发时,不需要进行路由寻址,直接通过负载均衡模块即可实现数据的直接转发,增强了负载均衡处理数据包的性能,能够解决负载均衡服务性能低的问题。 The virtual network system and the load balancing module are created according to the creation request, and the created load balancing module is connected to the virtual network system, and the created virtual network system includes at least one virtual machine; The network information of the virtual machine that is not on the same network segment as the load balancing module is stored in the load balancing module; when the received data packet requiring equalization processing exists in the virtual load balancing processing network, the data packet is passed through the The load balancing module forwards to the virtual machine for processing. It can be seen that, compared with the prior art, the present application configures the load balancing module and the virtual machine into the virtual load balancing processing network, so that the load balancing module and any one of the virtual machines are in the same layer 2 network environment, when needed. Carry out packet transfer When sending, there is no need for routing addressing, and the data can be directly forwarded directly through the load balancing module, which enhances the performance of the load balancing processing packet and can solve the problem of low performance of the load balancing service.

Claims (11)

一种实现负载均衡的方法,包括:A method of implementing load balancing, including: 根据创建请求分别创建虚拟网络系统和负载均衡模块,并将所述负载均衡模块接入所述虚拟网络系统,所述虚拟网络系统包括至少一个虚拟机;Creating a virtual network system and a load balancing module according to the creation request, and connecting the load balancing module to the virtual network system, where the virtual network system includes at least one virtual machine; 将与所述负载均衡模块不在同一个网段的虚拟机的网络信息存储在负载均衡模块中,并将所述虚拟机配置为负载均衡模块后端的应用服务节点;Storing the network information of the virtual machine that is not on the same network segment as the load balancing module in the load balancing module, and configuring the virtual machine as an application service node at the back end of the load balancing module; 需要负载均衡处理的数据包通过所述负载均衡模块转发到所述虚拟机中进行处理。The data packet requiring load balancing processing is forwarded to the virtual machine for processing by the load balancing module. 如权利要求1所述的实现负载均衡的方法,其中,所述创建虚拟网络系统和负载均衡模块,并将所述负载均衡模块接入所述虚拟网络系统具体为:The method for implementing load balancing according to claim 1, wherein the creating a virtual network system and a load balancing module, and accessing the load balancing module to the virtual network system is specifically: 创建虚拟子网,所述虚拟子网包括:一级虚拟子网和/或多级虚拟子网;所述一级虚拟子网包括至少一个通过虚拟交换机接入虚拟网络系统的虚拟机;所述多级虚拟子网包括至少一个通过虚拟交换机接入虚拟网络系统的虚拟机;所述多级虚拟子网中的虚拟交换机通过其他至少一个一级虚拟子网中的虚拟交换机逐级接入虚拟网络系统;Creating a virtual subnet, the virtual subnet comprising: a first level virtual subnet and/or a multi-level virtual subnet; the first level virtual subnet comprising at least one virtual machine accessing the virtual network system through the virtual switch; The multi-level virtual subnet includes at least one virtual machine that accesses the virtual network system through the virtual switch; the virtual switch in the multi-level virtual subnet accesses the virtual network step by step through the virtual switch in the other at least one level one virtual subnet. system; 创建负载均衡模块,并将所述负载均衡模块直接接入虚拟网络系统。Create a load balancing module and directly connect the load balancing module to the virtual network system. 如权利要求2所述的实现负载均衡的方法,其中,所述创建虚拟子网具体为:创建至少一个一级虚拟子网,将一级虚拟子网中的虚拟交换机直接接入虚拟网络系统。The method for implementing load balancing according to claim 2, wherein the creating the virtual subnet is specifically: creating at least one level one virtual subnet, and directly connecting the virtual switch in the level one virtual subnet to the virtual network system. 如权利要求3所述的实现负载均衡的方法,其中,所述一级虚拟子网在所述虚拟网络系统中通过以下方式中的任意一种实现网络隔离:虚拟局域网VLAN、通用路由封装GRE、虚拟可扩展局域网VXLAN;对应在所述一级虚拟子网中的虚拟机的网络信息为以下信息中的任意一种:VLAN信息、GRE信息、VXLAN信息。The method for implementing load balancing according to claim 3, wherein the primary virtual subnet implements network isolation in the virtual network system by any one of the following methods: a virtual local area network VLAN, a general routing encapsulation GRE, The virtual scalable local area network (VXLAN); the network information corresponding to the virtual machine in the first-level virtual subnet is any one of the following information: VLAN information, GRE information, and VXLAN information. 如权利要求1-4任一项所述的实现负载均衡的方法,其中,所述将与所述负载均衡模块不在同一个网段的虚拟机的网络信息存储在负载均衡模块中具体为:The method for implementing load balancing according to any one of claims 1-4, wherein the network information of the virtual machine that is not in the same network segment as the load balancing module is stored in the load balancing module, specifically: 获取至少一个与所述负载均衡模块不在同一个网段的虚拟机的网络信息; Obtaining at least one network information of a virtual machine that is not in the same network segment as the load balancing module; 根据获取的所述虚拟机的网络信息创建对应于各虚拟机的虚拟网络设备或流表信息,并将其保存在负载均衡模块中。And creating virtual network device or flow table information corresponding to each virtual machine according to the acquired network information of the virtual machine, and saving the information in the load balancing module. 一种实现负载均衡的装置,包括:创建模块,处理模块和转发模块;An apparatus for implementing load balancing, comprising: creating a module, a processing module, and a forwarding module; 所述创建模块设置为根据创建请求分别创建虚拟网络系统和负载均衡模块,并将所述负载均衡模块接入所述虚拟网络系统,所述虚拟网络系统包括至少一个虚拟机;The creating module is configured to separately create a virtual network system and a load balancing module according to the creation request, and connect the load balancing module to the virtual network system, where the virtual network system includes at least one virtual machine; 所述处理模块设置为将与所述负载均衡模块不在同一个网段的虚拟机的网络信息存储在负载均衡模块中,并将所述虚拟机配置为负载均衡模块后端的应用服务节点;The processing module is configured to store network information of a virtual machine that is not in the same network segment as the load balancing module in a load balancing module, and configure the virtual machine as an application service node at a back end of the load balancing module; 所述转发模块设置为将需要负载均衡处理的数据包通过所述负载均衡模块转发到所述虚拟机中进行处理。The forwarding module is configured to forward the data packet requiring load balancing processing to the virtual machine through the load balancing module for processing. 如权利要求6所述的实现负载均衡的装置,其中,所述创建模块包括子网创建单元和负载均衡创建单元;The device for implementing load balancing according to claim 6, wherein the creation module comprises a subnet creation unit and a load balancing creation unit; 所述子网创建单元设置为创建虚拟子网,所述虚拟子网包括:一级虚拟子网和/或多级虚拟子网;所述一级虚拟子网包括至少一个通过虚拟交换机接入虚拟网络系统的虚拟机;所述多级虚拟子网中的虚拟交换机通过其他至少一个一级虚拟子网中的虚拟交换机逐级接入虚拟网络系统;The subnet creating unit is configured to create a virtual subnet, where the virtual subnet includes: a first level virtual subnet and/or a multi-level virtual subnet; and the first level virtual subnet includes at least one virtual access through a virtual switch. a virtual machine in the network system; the virtual switch in the multi-level virtual subnet accesses the virtual network system step by step through virtual switches in the other at least one level one virtual subnet; 所述负载均衡创建单元设置为创建负载均衡模块,并将所述负载均衡模块直接接入虚拟网络系统。The load balancing creation unit is configured to create a load balancing module and directly connect the load balancing module to the virtual network system. 如权利要求7所述的实现负载均衡的装置,其中,所述子网创建单元创建虚拟子网具体为:创建至少一个一级虚拟子网,将一级虚拟子网中的虚拟交换机直接接入虚拟网络系统。The apparatus for implementing load balancing according to claim 7, wherein the subnet creating unit creates a virtual subnet specifically: creating at least one level one virtual subnet, directly accessing the virtual switch in the level one virtual subnet Virtual network system. 如权利要求8所述的实现负载均衡的装置,其中,所述子网创建单元创建的虚拟子网在所述虚拟网络系统中通过以下方式中的任意一种实现网络隔离:VLAN、GRE、虚拟可扩展局域网VXLAN;对应在所述一级虚拟子网中的虚拟机的网络信息为以下信息中的任意一种:VLAN信息、GRE信息、VXLAN信息。The apparatus for implementing load balancing according to claim 8, wherein the virtual subnet created by the subnet creating unit implements network isolation in the virtual network system by any one of the following modes: VLAN, GRE, virtual The scalable local area network VXLAN; the network information corresponding to the virtual machine in the first-level virtual subnet is any one of the following information: VLAN information, GRE information, and VXLAN information. 如权利要求6-9任一项所述的实现负载均衡的装置,其中,处理模块还包括获取单元和创建单元; The device for implementing load balancing according to any one of claims 6-9, wherein the processing module further comprises an obtaining unit and a creating unit; 所述获取单元设置为获取至少一个与所述负载均衡模块不在同一个网段的虚拟机的网络信息;The obtaining unit is configured to acquire network information of at least one virtual machine that is not in the same network segment as the load balancing module; 所述创建单元设置为根据获取的所述虚拟机的网络信息创建对应于各虚拟机的虚拟网络设备或者流表信息,并将其保存在负载均衡模块中。The creating unit is configured to create virtual network device or flow table information corresponding to each virtual machine according to the acquired network information of the virtual machine, and save the information in the load balancing module. 一种负载均衡服务系统,包括:虚拟网络系统和负载均衡模块;A load balancing service system includes: a virtual network system and a load balancing module; 所述负载均衡模块接入所述虚拟网络系统,并为所述虚拟网络系统中的至少一个虚拟机提供负载均衡服务;The load balancing module accesses the virtual network system and provides a load balancing service for at least one virtual machine in the virtual network system; 所述负载均衡模块设置为存储与其不在同一个网段的虚拟机的网络信息,同时将所述的虚拟机配置为其后端服务节点,以及用于将需要负载均衡处理的数据包通过所述负载均衡模块转发到所述虚拟机中进行处理。 The load balancing module is configured to store network information of a virtual machine that is not in the same network segment as the virtual machine, and configure the virtual machine as its backend service node, and to pass the data packet requiring load balancing processing The load balancing module forwards to the virtual machine for processing.
PCT/CN2014/088970 2014-06-16 2014-10-20 Method and device for implementing load balancing and load balancing service system Ceased WO2015192563A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410267566.0 2014-06-16
CN201410267566.0A CN105208053A (en) 2014-06-16 2014-06-16 Method for realizing load balance, device and load balance service system

Publications (1)

Publication Number Publication Date
WO2015192563A1 true WO2015192563A1 (en) 2015-12-23

Family

ID=54934791

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/088970 Ceased WO2015192563A1 (en) 2014-06-16 2014-10-20 Method and device for implementing load balancing and load balancing service system

Country Status (2)

Country Link
CN (1) CN105208053A (en)
WO (1) WO2015192563A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108989479A (en) * 2018-07-11 2018-12-11 湖北省楚天云有限公司 The method and apparatus that a kind of pair of cloud computing platform second level domain is configured
CN110213114A (en) * 2019-06-21 2019-09-06 深圳前海微众银行股份有限公司 Network service method, device, equipment and the readable storage medium storing program for executing of decentralization

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107181287A (en) * 2016-03-11 2017-09-19 阿里巴巴集团控股有限公司 Realize the load factor method and system of each power supply in the electric supply installation for automatically adjusting information technoloy equipment
CN107800814B (en) * 2016-09-05 2021-08-13 国网江苏省电力公司信息通信分公司 Virtual machine deployment method and device
CN108063783A (en) * 2016-11-08 2018-05-22 上海有云信息技术有限公司 The dispositions method and device of a kind of load equalizer
CN108989174A (en) * 2018-07-09 2018-12-11 郑州云海信息技术有限公司 A kind of detection method based on Open Stack network system VPN
CN110928637A (en) * 2018-09-19 2020-03-27 阿里巴巴集团控股有限公司 Load balancing method and system
CN110061888B (en) * 2019-03-18 2021-09-28 北京奇艺世纪科技有限公司 Network protocol type judgment method and device, computer equipment and storage medium
US10841226B2 (en) * 2019-03-29 2020-11-17 Juniper Networks, Inc. Configuring service load balancers with specified backend virtual networks
CN113098728B (en) * 2019-12-23 2023-12-19 华为云计算技术有限公司 Health check methods and related equipment of load balancing systems
CN112261095B (en) * 2020-10-12 2023-11-24 国电南瑞科技股份有限公司 Load offload implementation system and method based on two-level agents
CN112311448B (en) * 2020-11-12 2022-02-18 中国电子科技集团公司第五十四研究所 Satellite network acceleration system based on virtual machine

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090300210A1 (en) * 2008-05-28 2009-12-03 James Michael Ferris Methods and systems for load balancing in cloud-based networks
CN102427475A (en) * 2011-12-08 2012-04-25 曙光信息产业(北京)有限公司 System for load balancing scheduling in cloud computing environment
CN102710503A (en) * 2012-05-15 2012-10-03 浪潮电子信息产业股份有限公司 Network load balancing method based on cloud sea OS (operation system)
CN102833355A (en) * 2012-09-22 2012-12-19 广东电子工业研究院有限公司 Load balance system and cloud computing oriented mechanism
CN103533063A (en) * 2013-10-18 2014-01-22 北京华胜天成科技股份有限公司 Method and device capable of realizing dynamic expansion of WEB (World Wide Web) application resource

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101969391B (en) * 2010-10-27 2012-08-01 北京邮电大学 Cloud platform supporting fusion network service and operating method thereof
CN103607430B (en) * 2013-10-30 2018-04-27 中兴通讯股份有限公司 A kind of method and system of network processes and the network control center
CN103595772A (en) * 2013-11-01 2014-02-19 浪潮电子信息产业股份有限公司 Cloud data center network deployment scheme based on virtual router

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090300210A1 (en) * 2008-05-28 2009-12-03 James Michael Ferris Methods and systems for load balancing in cloud-based networks
CN102427475A (en) * 2011-12-08 2012-04-25 曙光信息产业(北京)有限公司 System for load balancing scheduling in cloud computing environment
CN102710503A (en) * 2012-05-15 2012-10-03 浪潮电子信息产业股份有限公司 Network load balancing method based on cloud sea OS (operation system)
CN102833355A (en) * 2012-09-22 2012-12-19 广东电子工业研究院有限公司 Load balance system and cloud computing oriented mechanism
CN103533063A (en) * 2013-10-18 2014-01-22 北京华胜天成科技股份有限公司 Method and device capable of realizing dynamic expansion of WEB (World Wide Web) application resource

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108989479A (en) * 2018-07-11 2018-12-11 湖北省楚天云有限公司 The method and apparatus that a kind of pair of cloud computing platform second level domain is configured
CN108989479B (en) * 2018-07-11 2023-05-16 湖北省楚天云有限公司 Method and device for configuring secondary domain name of cloud computing platform
CN110213114A (en) * 2019-06-21 2019-09-06 深圳前海微众银行股份有限公司 Network service method, device, equipment and the readable storage medium storing program for executing of decentralization
CN110213114B (en) * 2019-06-21 2024-04-09 深圳前海微众银行股份有限公司 Decentralised network service method, device, equipment and readable storage medium

Also Published As

Publication number Publication date
CN105208053A (en) 2015-12-30

Similar Documents

Publication Publication Date Title
WO2015192563A1 (en) Method and device for implementing load balancing and load balancing service system
CN112470436B (en) Systems, methods, and computer-readable media for providing multi-cloud connectivity
US12212635B2 (en) Traffic forwarding and disambiguation by using local proxies and addresses
CN107852604B (en) System for providing Global Virtual Network (GVN)
US10560431B1 (en) Virtual private gateway for encrypted communication over dedicated physical link
US9596211B2 (en) Cloud based customer premises equipment
US9286444B2 (en) Next generation secure gateway
CN110896371B (en) Virtual network equipment and related method
CN109450905B (en) Method, device and system for transmitting data
US20140230044A1 (en) Method and Related Apparatus for Authenticating Access of Virtual Private Cloud
US20150124823A1 (en) Tenant dhcp in an overlay network
CN106663034A (en) Migration of applications between an enterprise-based network and a multi-tenant network
WO2018120800A1 (en) Load balancing method, device and system
US20250184268A1 (en) Executing Workloads Across Multiple Cloud Service Providers
US9246906B1 (en) Methods for providing secure access to network resources and devices thereof
US10771309B1 (en) Border gateway protocol routing configuration
WO2011059770A2 (en) Smart client routing
CN108063761B (en) Network processing method, cloud platform and software-defined network SDN controller
US20240259290A1 (en) Deploying symmetric routing
US11996983B1 (en) Network appliance for providing configurable virtual private network connections
CN113545130A (en) Fast Roaming and Unified Policy for Wireless Clients Using Distributed Hashing
EP4535758A1 (en) Dynamic site selection in global server load balancing (gslb) environment
US11616830B1 (en) Systems and methods for implementing an on-demand computing network environment utilizing a bridge device
TW201526588A (en) Methods and systems to split equipment control between local and remote processing units
JP2017173995A (en) Server apparatus, cloud system, and web application switching method

Legal Events

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

Ref document number: 14895196

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14895196

Country of ref document: EP

Kind code of ref document: A1