CN107493333B - SDN-based web system resource management method and system in cloud computing environment - Google Patents
SDN-based web system resource management method and system in cloud computing environment Download PDFInfo
- Publication number
- CN107493333B CN107493333B CN201710703713.8A CN201710703713A CN107493333B CN 107493333 B CN107493333 B CN 107493333B CN 201710703713 A CN201710703713 A CN 201710703713A CN 107493333 B CN107493333 B CN 107493333B
- Authority
- CN
- China
- Prior art keywords
- average
- server
- link
- traffic
- session
- 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.)
- Active
Links
- 238000007726 management method Methods 0.000 title claims abstract description 16
- 238000000034 method Methods 0.000 claims abstract description 24
- 230000002776 aggregation Effects 0.000 claims description 77
- 238000004220 aggregation Methods 0.000 claims description 77
- 230000009286 beneficial effect Effects 0.000 abstract description 2
- 238000005259 measurement Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000002474 experimental method Methods 0.000 description 2
- 238000005070 sampling Methods 0.000 description 2
- 230000001960 triggered effect Effects 0.000 description 2
- 238000010276 construction Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000009977 dual effect Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0876—Network utilisation, e.g. volume of load or congestion level
- H04L43/0894—Packet rate
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/16—Threshold monitoring
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/12—Avoiding congestion; Recovering from congestion
- H04L47/125—Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/70—Admission control; Resource allocation
- H04L47/82—Miscellaneous aspects
- H04L47/827—Aggregation of resource allocation or reservation requests
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1031—Controlling of the operation of servers by a load balancer, e.g. adding or removing servers that serve requests
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/104—Peer-to-peer [P2P] networks
- H04L67/1044—Group management mechanisms
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Environmental & Geological Engineering (AREA)
- Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Theoretical Computer Science (AREA)
- Computer And Data Communications (AREA)
Abstract
本发明公开了一种基于SDN的云计算环境下web系统资源管理方法及系统,方法包括:S1、构建基于SDN的云计算环境下的web应用系统;S2、每间隔预设时间,获取每个服务器的瞬时会话连接数和瞬时链路流量;S3、如果任一服务器连续两次获取的瞬时会话连接数均大于瞬时会话连接数最大阈值,则进行资源均衡操作,否则执行步骤S4;S4、获取平均会话连接数和链路平均流量;S5、将每个服务器的平均会话连接数分别与平均会话连接数最大阈值和平均会话连接数聚合阈值进行比较;S6、根据比较结果进行资源均衡操作或资源聚合操作。本发明的有益效果是:节省了服务器资源,有效提高了现有资源的利用效率。
The invention discloses a web system resource management method and system in an SDN-based cloud computing environment. The method includes: S1, constructing a web application system in the SDN-based cloud computing environment; S2, obtaining each The number of instantaneous session connections and instantaneous link traffic of the server; S3. If the number of instantaneous session connections obtained by any server for two consecutive times is greater than the maximum threshold of the number of instantaneous session connections, perform a resource balancing operation, otherwise go to step S4; S4, obtain Average number of session connections and average link traffic; S5. Compare the average number of session connections of each server with the maximum threshold of the average number of session connections and the aggregate threshold of the average number of session connections; S6. Perform resource balancing operations or resources according to the comparison results Aggregate operation. The beneficial effects of the invention are that the server resources are saved, and the utilization efficiency of the existing resources is effectively improved.
Description
技术领域technical field
本发明涉及SDN技术领域,特别涉及一种基于SDN的云计算环境下web系统资源管理方法及系统。The invention relates to the technical field of SDN, in particular to a method and system for managing web system resources in an SDN-based cloud computing environment.
背景技术Background technique
云计算是分布式计算、并行计算、效用计算、网络存储、虚拟化、负载均衡、热备份冗余等传统计算机和网络技术发展融合的产物,是一种按使用量付费的新型计算模式。这种模式提供可用的、便捷的网络访问,使用按需分配的计算资源,包括网络、服务器、存储、应用软件、服务等。由于具有高可靠性、易扩展性、低维护和使用成本、虚拟化等优势,云计算技术近年来得到了非常快速的发展,被广泛认为是信息领域的又一次技术革命。Cloud computing is a product of the development and integration of traditional computer and network technologies such as distributed computing, parallel computing, utility computing, network storage, virtualization, load balancing, and hot backup redundancy. This model provides usable and convenient network access, using on-demand computing resources, including networks, servers, storage, application software, services, etc. Due to the advantages of high reliability, easy scalability, low maintenance and use costs, and virtualization, cloud computing technology has developed very rapidly in recent years, and is widely regarded as another technological revolution in the information field.
在云计算环境下,企业构建业务系统主要通过虚拟web应用集群的方式实现。虚拟Web应用集群,是采用虚拟化技术在云平台上创建一组同时运行同一个Web应用的服务器群组,但外界看来就像是一个服务器一样。但是,目前通过云计算平台构建的虚拟Web应用服务器集群仅是完成集群的构建,并未实现对集群资源的自动化动态管理。通常情况下,用户需要自主监控服务器集群的运行,获得服务器集群运行参数,自行判断是否需要对服务器、网络资源进行扩展或聚合。由于web应用系统存在多用户同时并发访问问题,在这种情况下需要对服务器集群规模、网络链路流量进行动态调整,当前云计算传统网络条件下,数据转发平面与控制平面紧密结合,无法实现自动化的会话及流量负载均衡操作,如监测到多用户并发产生的会话过多、链路流量拥堵、链路利用率较低等问题,也无法按策略自动对资源进行调整。目前云平台采用的web服务器集群调整方法主要存在两种方式,对于虚拟服务器资源,负载过重时,向云平台发送资源请求,平台启动虚拟机添加到服务器集群中;对于网络链路资源,需要平台对路由器、交换机等资源进行重新设置,以上对于资源的调整方式无法实时自动的对资源进行管理,严重影响了云计算平台的使用效率,同时也造成了极差的用户体验。In the cloud computing environment, enterprises build business systems mainly through virtual web application clusters. A virtual web application cluster uses virtualization technology to create a group of servers running the same web application on the cloud platform at the same time, but it looks like a server to the outside world. However, the virtual web application server cluster currently constructed by the cloud computing platform only completes the cluster construction, and does not realize the automatic dynamic management of cluster resources. Under normal circumstances, users need to independently monitor the operation of the server cluster, obtain the operation parameters of the server cluster, and judge by themselves whether to expand or aggregate the server and network resources. Due to the problem of concurrent access by multiple users in the web application system, it is necessary to dynamically adjust the scale of server clusters and network link traffic in this case. Under the current traditional cloud computing network conditions, the data forwarding plane and the control plane are closely integrated, which cannot Automatic session and traffic load balancing operations, such as monitoring of too many sessions caused by multiple users concurrently, link traffic congestion, and low link utilization, cannot automatically adjust resources according to policies. At present, there are two main ways to adjust the web server cluster used by the cloud platform. For virtual server resources, when the load is too heavy, a resource request is sent to the cloud platform, and the platform starts the virtual machine and adds it to the server cluster; for network link resources, it needs to The platform resets resources such as routers and switches. The above adjustment methods for resources cannot automatically manage resources in real time, which seriously affects the utilization efficiency of the cloud computing platform and also causes a very poor user experience.
发明内容SUMMARY OF THE INVENTION
本发明提供了一种基于SDN的云计算环境下web系统资源管理方法及系统,解决了现有技术的技术问题。The present invention provides a web system resource management method and system in an SDN-based cloud computing environment, and solves the technical problems of the prior art.
本发明解决上述技术问题的技术方案如下:The technical scheme that the present invention solves the above-mentioned technical problems is as follows:
一种基于SDN的云计算环境下web系统资源管理方法,包括:A web system resource management method in an SDN-based cloud computing environment, comprising:
S1、构建基于SDN的云计算环境下的web应用系统,所述web应用系统包括:部署在云计算平台上的多个服务器和SDN控制器;S1. Construct a web application system under an SDN-based cloud computing environment, where the web application system includes: multiple servers and SDN controllers deployed on a cloud computing platform;
S2、每间隔预设时间,获取每个所述服务器的瞬时会话连接数和瞬时链路流量;S2, obtaining the instantaneous session connection number and instantaneous link traffic of each of the servers at preset time intervals;
S3、将每个所述服务器连续两次获取的瞬时会话连接数分别与瞬时会话连接数最大阈值进行比较,并将每个所述服务器连续两次获取的瞬时链路流量分别与瞬时链路流量最大阈值进行比较,如果任一服务器连续两次获取的瞬时会话连接数均大于所述瞬时会话连接数最大阈值或任一服务器连续两次获取的瞬时链路流量均大于所述瞬时链路流量最大阈值,则启动资源均衡模块通过所述SDN控制器进行资源均衡操作,否则执行步骤S4;S3. Compare the number of instantaneous session connections obtained by each of the servers for two consecutive times with the maximum threshold of the number of instantaneous session connections, respectively, and compare the instantaneous link traffic obtained by each of the servers for two consecutive times with the instantaneous link traffic respectively. The maximum threshold is compared, and if the number of instantaneous session connections obtained by any server for two consecutive times is greater than the maximum threshold for the number of instantaneous session connections or the instantaneous link traffic obtained by any server for two consecutive times is greater than the maximum instantaneous link traffic threshold, start the resource balancing module to perform the resource balancing operation through the SDN controller, otherwise go to step S4;
S4、根据每个所述服务器连续预设次数获取的瞬时会话连接数和瞬时链路流量,得到每个所述服务器的平均会话连接数和链路平均流量;S4, obtain the average session connection number and the average link flow of each of the servers according to the instantaneous session connection number and the instantaneous link flow obtained by each of the servers for a continuous preset number of times;
S5、将每个所述服务器的平均会话连接数分别与平均会话连接数最大阈值和平均会话连接数聚合阈值进行比较,并将每个所述服务器的链路平均流量分别与链路平均流量最大阈值和链路平均流量聚合阈值进行比较,得到比较结果;S5. Compare the average session connection number of each server with the maximum average session connection number threshold and the average session connection number aggregation threshold, respectively, and compare the link average traffic of each server with the link average traffic maximum Compare the threshold with the link average traffic aggregation threshold to obtain the comparison result;
S6、根据所述比较结果,启动所述资源均衡模块通过所述SDN控制器进行资源均衡操作或启动资源聚合模块通过所述SDN控制器进行资源聚合操作。S6. According to the comparison result, start the resource balancing module to perform a resource balancing operation through the SDN controller or start the resource aggregation module to perform a resource aggregation operation through the SDN controller.
本发明的有益效果是:本技术方案自动化的依据会话连接数及链路流量两种策略综合考虑调整Web应用集群规模,一方面相对于手工添加服务器到Web应用集群节省了大量部署时间,避免了由于人工原因造成的无法在负载增大时调整服务器集群的问题,另一方面相对于传统云计算平台只能通过添加服务器实现负载均衡的方式,节省了服务器资源,有效提高了现有资源的利用效率。The beneficial effects of the present invention are: the technical solution automatically adjusts the scale of the Web application cluster according to the two strategies of the number of session connections and the link traffic. Due to artificial reasons, the server cluster cannot be adjusted when the load increases. On the other hand, compared with the traditional cloud computing platform, the load balance can only be achieved by adding servers, which saves server resources and effectively improves the utilization of existing resources. efficiency.
在上述技术方案的基础上,本发明还可以做如下改进。On the basis of the above technical solutions, the present invention can also be improved as follows.
优选地,步骤S6包括:Preferably, step S6 includes:
当所述比较结果为任一服务器的平均会话连接数大于所述平均会话连接数最大阈值或任一服务器的链路平均流量大于所述链路平均流量最大阈值时,启动所述资源均衡模块通过所述SDN控制器进行资源均衡操作;When the comparison result is that the average session connection number of any server is greater than the maximum threshold of the average session connection number or the average link traffic of any server is greater than the maximum link average traffic threshold, the resource balancing module is started to pass the SDN controller performs a resource balancing operation;
当所述比较结果为至少一个服务器的平均会话连接数小于所述平均会话连接数聚合阈值且所述至少一个服务器的链路平均流量小于所述链路平均流量聚合阈值时,启动所述资源聚合模块通过所述SDN控制器进行资源聚合操作。When the comparison result is that the average session connection number of at least one server is less than the average session connection number aggregation threshold and the link average traffic of the at least one server is less than the link average traffic aggregation threshold, start the resource aggregation The module performs resource aggregation operations through the SDN controller.
优选地,通过所述SDN控制器进行资源均衡操作的方法包括:Preferably, the method for performing resource balancing operation by the SDN controller includes:
通过所述SDN控制器从全局资源信息库中查找得到会话及链路资源综合使用最小的第一服务器;The SDN controller searches the global resource information base to obtain the first server with the smallest comprehensive usage of session and link resources;
当会话连接数需均衡的资源数小于所述第一服务器的会话连接数最大均衡数与平均会话连接数的差值且链路流量需均衡的资源数小于所述第一服务器的链路流量最大均衡数量与链路平均流量的差值时,通过流表方式将多余负载均衡至所述第一服务器,When the number of resources to be balanced for the number of session connections is less than the difference between the maximum number of balanced session connections and the average number of session connections of the first server and the number of resources to be balanced for link traffic is less than the maximum link traffic of the first server When the difference between the number of balances and the average traffic of the link is determined, the excess load is balanced to the first server through the flow table method.
其中,所述会话连接数需均衡的资源数为所述平均会话连接数最大阈值与所述两个以上服务器的平均会话连接数之差,所述链路流量需均衡的资源数为所述链路平均流量最大阈值与所述两个以上服务器的链路平均流量之差。The number of resources to be balanced for the number of session connections is the difference between the maximum threshold of the average number of session connections and the average number of session connections of the two or more servers, and the number of resources to be balanced for the link traffic is the The difference between the maximum threshold of the average traffic on the road and the average traffic on the links of the two or more servers.
优选地,通过所述SDN控制器进行资源聚合操作的方法包括:Preferably, the method for performing resource aggregation operation by the SDN controller includes:
通过所述SDN控制器从全局资源信息库中查找得到会话及链路资源综合使用最小的两个服务器;The two servers with the smallest comprehensive usage of session and link resources are obtained by searching from the global resource information base through the SDN controller;
当聚合后服务器会话连接数位于所述平均会话连接数聚合阈值与所述平均会话连接数最大阈值之间且聚合后服务器链路流量位于所述链路平均流量聚合阈值与所述链路平均流量最大阈值之间时,将所述两个服务器对应的两条链路聚合,并释放所述两条链路中的任一条链路及该链路对应的服务器所占用的资源,When the aggregated server session connection number is between the average session connection number aggregation threshold and the average session connection maximum threshold and the aggregated server link traffic is between the link average traffic aggregation threshold and the link average traffic When between the maximum thresholds, the two links corresponding to the two servers are aggregated, and the resources occupied by any one of the two links and the server corresponding to the link are released,
其中,所述聚合后服务器会话连接数为所述两个服务器的平均会话连接数之和,所述聚合后服务器链路流量为所述两个服务器的链路平均流量之和。The aggregated server session connection number is the sum of the average session connection numbers of the two servers, and the aggregated server link traffic is the sum of the average link traffic of the two servers.
优选地,所述多个服务器包括:应用服务器、数据库服务器和负载均衡服务器。Preferably, the multiple servers include: an application server, a database server and a load balancing server.
一种基于SDN的云计算环境下web系统资源管理系统,包括:An SDN-based web system resource management system in a cloud computing environment, comprising:
构建模块,用于构建基于SDN的云计算环境下的web应用系统,所述web应用系统包括:部署在云计算平台上的每个服务器和SDN控制器;a building module for building a web application system in an SDN-based cloud computing environment, where the web application system includes: each server and an SDN controller deployed on the cloud computing platform;
第一获取模块,用于每间隔预设时间,获取所述web应用系统的每个所述服务器的瞬时会话连接数和瞬时链路流量;a first obtaining module, configured to obtain the instantaneous session connection number and instantaneous link traffic of each of the servers of the web application system at preset time intervals;
第一比较模块,用于将每个所述服务器连续两次获取的瞬时会话连接数与瞬时会话连接数最大阈值进行比较,并将每个所述服务器续两次获取的瞬时链路流量与瞬时链路流量最大阈值进行比较,如果任一服务器连续两次获取的瞬时会话连接数均大于所述瞬时会话连接数最大阈值或任一服务器连续两次获取的瞬时链路流量均大于所述瞬时链路流量最大阈值,则启动资源均衡模块通过所述SDN控制器进行资源均衡操作,否则调用第二比较模块;The first comparison module is configured to compare the number of instantaneous session connections obtained by each of the servers for two consecutive times with the maximum threshold of the number of instantaneous session connections, and compare the instantaneous link traffic obtained by each of the servers for two consecutive times with the instantaneous number of connections. Compare with the maximum threshold of link traffic, if the number of instantaneous session connections obtained by any server for two consecutive times is greater than the maximum threshold of the number of instantaneous session connections or the instantaneous link traffic obtained by any server for two consecutive times is greater than the instantaneous link traffic. If the maximum threshold of road traffic is reached, the resource balancing module is started to perform resource balancing operation through the SDN controller, otherwise the second comparison module is called;
第二获取模块,用于根据每个所述服务器连续预设次数获取的瞬时会话连接数和瞬时链路流量,得到的每个所述服务器的平均会话连接数和链路平均流量;The second obtaining module is configured to obtain the average session connection number and link average flow of each of the servers according to the instantaneous session connection number and instantaneous link flow obtained by each of the servers for a continuous preset number of times;
第二比较模块,用于将每个所述服务器的平均会话连接数与平均会话连接数最大阈值进行比较,并将每个所述服务器的链路平均流量与平均会话连接数聚合阈值进行比较,得到比较结果;The second comparison module is configured to compare the average number of session connections of each of the servers with the maximum threshold of the average number of session connections, and compare the average traffic of the links of each of the servers with the aggregate threshold of the average number of session connections, get the comparison result;
操作模块,用于根据所述比较结果,启动所述资源均衡模块通过所述SDN控制器进行资源均衡操作或启动资源聚合模块通过所述SDN控制器进行资源聚合操作。An operation module, configured to start the resource balancing module to perform a resource balancing operation through the SDN controller or start the resource aggregation module to perform a resource aggregation operation through the SDN controller according to the comparison result.
优选地,所述操作模块具体用于:Preferably, the operation module is specifically used for:
当所述比较结果为任一服务器的平均会话连接数大于所述平均会话连接数最大阈值或任一服务器的链路平均流量大于所述链路平均流量最大阈值时,启动所述资源均衡模块通过所述SDN控制器进行资源均衡操作;When the comparison result is that the average session connection number of any server is greater than the maximum threshold of the average session connection number or the average link traffic of any server is greater than the maximum link average traffic threshold, the resource balancing module is started to pass the SDN controller performs a resource balancing operation;
当所述比较结果为至少一个服务器的平均会话连接数均小于所述平均会话连接数聚合阈值且所述至少一个服务器的链路平均流量均小于所述链路平均流量聚合阈值时,启动所述资源聚合模块通过所述SDN控制器进行资源聚合操作。When the comparison result is that the average session connections of at least one server are all less than the average session connection number aggregation threshold and the link average traffic of the at least one server is all less than the link average traffic aggregation threshold, start the The resource aggregation module performs resource aggregation operations through the SDN controller.
优选地,所述资源均衡模块具体用于:Preferably, the resource balancing module is specifically used for:
通过所述SDN控制器从全局资源信息库中查找得到会话及链路资源综合使用最小的第一服务器;The SDN controller searches the global resource information base to obtain the first server with the smallest comprehensive usage of session and link resources;
当会话连接数需均衡的资源数小于所述第一服务器的会话连接数最大均衡数与平均会话连接数的差值且链路流量需均衡的资源数小于所述第一服务器的链路流量最大均衡数量与链路平均流量的差值时,通过流表方式将多余负载均衡至所述第一服务器,When the number of resources to be balanced for the number of session connections is less than the difference between the maximum number of balanced session connections and the average number of session connections of the first server and the number of resources to be balanced for link traffic is less than the maximum link traffic of the first server When the difference between the number of balances and the average traffic of the link is determined, the excess load is balanced to the first server through the flow table method.
其中,所述会话连接数需均衡的资源数为所述平均会话连接数最大阈值与所述两个以上服务器的平均会话连接数之差,所述链路流量需均衡的资源数为所述链路平均流量最大阈值与所述两个以上服务器的链路平均流量之差。The number of resources to be balanced for the number of session connections is the difference between the maximum threshold of the average number of session connections and the average number of session connections of the two or more servers, and the number of resources to be balanced for the link traffic is the The difference between the maximum threshold of the average traffic on the road and the average traffic on the links of the two or more servers.
优选地,所述资源聚合模块具体用于:Preferably, the resource aggregation module is specifically used for:
通过所述SDN控制器从全局资源信息库中查找得到会话及链路资源综合使用最小的两个服务器;The two servers with the smallest comprehensive usage of session and link resources are obtained by searching from the global resource information base through the SDN controller;
当聚合后服务器会话连接数位于所述平均会话连接数聚合阈值与所述平均会话连接数最大阈值之间且聚合后服务器链路流量位于所述链路平均流量聚合阈值与所述链路平均流量最大阈值之间时,将所述两个服务器对应的两条链路聚合,并释放所述两条链路中的任一条链路及该链路对应的服务器所占用的资源,When the aggregated server session connection number is between the average session connection number aggregation threshold and the average session connection maximum threshold and the aggregated server link traffic is between the link average traffic aggregation threshold and the link average traffic When between the maximum thresholds, the two links corresponding to the two servers are aggregated, and the resources occupied by any one of the two links and the server corresponding to the link are released,
其中,所述聚合后服务器会话连接数为所述两个服务器的平均会话连接数之和,所述聚合后服务器链路流量为所述两个服务器的链路平均流量之和。The aggregated server session connection number is the sum of the average session connection numbers of the two servers, and the aggregated server link traffic is the sum of the average link traffic of the two servers.
优选地,所述多个所述服务器包括:应用服务器、数据库服务器和负载均衡服务器。Preferably, the plurality of the servers include: an application server, a database server and a load balancing server.
附图说明Description of drawings
图1为本发明实施例提供的一种基于SDN的云计算环境下web系统资源管理方法的流程示意图;1 is a schematic flowchart of a method for managing web system resources in an SDN-based cloud computing environment provided by an embodiment of the present invention;
图2为本发明另一实施例提供的一种基于SDN的云计算环境下web系统资源管理方法的流程示意图;2 is a schematic flowchart of a method for managing web system resources in an SDN-based cloud computing environment provided by another embodiment of the present invention;
图3为本发明另一实施例提供的一种web应用系统的结构示意图;3 is a schematic structural diagram of a web application system provided by another embodiment of the present invention;
图4为本发明另一实施例提供的一种基于SDN的云计算环境下web系统资源管理系统的结构示意图。FIG. 4 is a schematic structural diagram of a web system resource management system in an SDN-based cloud computing environment provided by another embodiment of the present invention.
具体实施方式Detailed ways
以下结合附图对本发明的原理和特征进行描述,所举实例只用于解释本发明,并非用于限定本发明的范围。The principles and features of the present invention will be described below with reference to the accompanying drawings. The examples are only used to explain the present invention, but not to limit the scope of the present invention.
如图1所示,一种基于SDN的云计算环境下web系统资源管理方法,包括:As shown in Figure 1, a web system resource management method in an SDN-based cloud computing environment includes:
S101、构建基于SDN的云计算环境下的web应用系统,web应用系统包括:部署在云计算平台上的多个服务器和SDN控制器;S101. Build a web application system in an SDN-based cloud computing environment, where the web application system includes: multiple servers and SDN controllers deployed on the cloud computing platform;
S102、每间隔预设时间,获取每个服务器的瞬时会话连接数和瞬时链路流量;S102, obtaining the instantaneous session connection number and instantaneous link traffic of each server at each preset time interval;
S103、将每个服务器连续两次获取的瞬时会话连接数分别与瞬时会话连接数最大阈值进行比较,并将每个服务器连续两次获取的瞬时链路流量分别与瞬时链路流量最大阈值进行比较,如果任一服务器连续两次获取的瞬时会话连接数均大于瞬时会话连接数最大阈值或任一服务器连续两次获取的瞬时链路流量均大于瞬时链路流量最大阈值,则启动资源均衡模块通过SDN控制器进行资源均衡操作,否则执行步骤S104;S103: Compare the number of instantaneous session connections obtained by each server for two consecutive times with the maximum threshold of the number of instantaneous session connections, respectively, and compare the instantaneous link traffic obtained by each server for two consecutive times with the maximum threshold of instantaneous link traffic respectively , if the number of instantaneous session connections obtained by any server for two consecutive times is greater than the maximum threshold for the number of instantaneous session connections or the instantaneous link traffic obtained by any server for two consecutive times is greater than the maximum instantaneous link traffic threshold, the resource balancing module is activated to pass The SDN controller performs a resource balancing operation, otherwise, step S104 is performed;
S104、根据每个服务器连续预设次数获取的瞬时会话连接数和瞬时链路流量,得到每个服务器的平均会话连接数和链路平均流量;S104, obtaining the average number of session connections and the average link traffic of each server according to the instantaneous session connection number and instantaneous link flow obtained by each server continuously preset times;
S105、将每个服务器的平均会话连接数分别与平均会话连接数最大阈值和平均会话连接数聚合阈值进行比较,并将每个服务器的链路平均流量分别与链路平均流量最大阈值和链路平均流量聚合阈值进行比较,得到比较结果;S105: Compare the average number of session connections of each server with the maximum threshold of the average number of session connections and the aggregated threshold of the average number of session connections, respectively, and compare the average traffic of each server with the maximum threshold of average traffic of the link and the maximum threshold of average traffic of the link respectively. The average traffic aggregation threshold is compared to obtain the comparison result;
S106、根据比较结果,启动资源均衡模块通过SDN控制器进行资源均衡操作或启动资源聚合模块通过SDN控制器进行资源聚合操作。S106. According to the comparison result, start the resource balancing module to perform a resource balancing operation through the SDN controller or start the resource aggregation module to perform a resource aggregation operation through the SDN controller.
在云计算平台上部署应用服务器、数据库服务器、负载均衡服务器、SDN控制器(或SDN控制器集群),SDN控制器(或SDN控制器集群)部署于每个所述服务器中,每个所述服务器均为云平台提供的虚拟机,每个所述服务器通过虚拟交换机或物理交换机相连接,虚拟交换机及物理交换机为专用SDN交换机或SDN混合类型交换机。Deploy application servers, database servers, load balancing servers, SDN controllers (or SDN controller clusters) on the cloud computing platform, and SDN controllers (or SDN controller clusters) are deployed in each of the servers, and each of the The servers are all virtual machines provided by the cloud platform, and each of the servers is connected through a virtual switch or a physical switch, and the virtual switch and the physical switch are dedicated SDN switches or SDN hybrid switches.
系统构建完成后,以时间t为采样间隔连续获取web应用系统各个服务器及其对应链路瞬时会话连接数Scurrent及瞬时链路流量Bcurrent。After the system is constructed, the instantaneous session connection number S current and instantaneous link traffic B current of each server and its corresponding link of the web application system are continuously obtained with time t as the sampling interval.
设置瞬时链路流量最大阈值Bmax,瞬时会话连接数最大阈值Smax,将连续两次瞬时链路流量、瞬时会话连接数与对应的最大阈值进行比较,如果连续两次瞬时链路流量Bcurrent>Bmax或连续两次瞬时会话连接数Scurrent>Smax,则进行资源均衡操作,否则执行以下步骤。Set the maximum threshold value B max of instantaneous link traffic and the maximum threshold value S max of the number of instantaneous session connections. Compare the two consecutive instantaneous link traffic and the number of instantaneous session connections with the corresponding maximum thresholds. If two consecutive instantaneous link traffic B current >B max or the number of instantaneous session connections S current > S max for two consecutive times, the resource balancing operation is performed, otherwise, the following steps are performed.
设在时间间隔T内获取N次测量结果分别为Scurrent1,Scurrent2…Scurrentn,通过公式(1)计算出T时间内平均会话连接数为Savg:Assuming that the N measurement results obtained within the time interval T are S current1 , S current2 ···
设在时间间隔T内获取N次流量测量结果为Bcurrent1,Bcurrent2…Bcurrentn,通过公式(2)计算出T时间内链路平均流量为:Assuming that N times of traffic measurement results are obtained within the time interval T as B current1 , B current2 . . . B currentn , the average link traffic in the time T is calculated by formula (2) as:
通过SDN控制器集中式采集并计算系统中应用服务器瞬时会话连接与链路流量负载、一定时间间隔内服务器平均会话与链路流量负载,对多用户并发访问的web应用系统服务器及链路资源进行均衡与聚合,实现了基于会话与链路流量双重策略的web应用系统资源动态管理方法,有效提高了云平台资源利用效率,改善了用户应用体验。The SDN controller centrally collects and calculates the instantaneous session connection and link traffic load of the application server in the system, and the average session and link traffic load of the server within a certain time interval. Balance and aggregation realize the dynamic management method of web application system resources based on the dual strategy of session and link traffic, which effectively improves the utilization efficiency of cloud platform resources and improves the user application experience.
如图2所示,一种基于SDN的云计算环境下web系统资源管理方法,包括:As shown in Figure 2, a method for managing web system resources in an SDN-based cloud computing environment includes:
S201、构建基于SDN的云计算环境下的web应用系统,web应用系统包括:部署在云计算平台上的多个服务器和SDN控制器;S201, constructing a web application system in an SDN-based cloud computing environment, where the web application system includes: multiple servers and SDN controllers deployed on the cloud computing platform;
S202、每间隔预设时间,获取每个服务器的瞬时会话连接数和瞬时链路流量;S202, obtaining the instantaneous session connection number and instantaneous link traffic of each server at each preset time interval;
S203、将每个服务器连续两次获取的瞬时会话连接数分别与瞬时会话连接数最大阈值进行比较,并将每个服务器连续两次获取的瞬时链路流量分别与瞬时链路流量最大阈值进行比较,如果任一服务器连续两次获取的瞬时会话连接数均大于瞬时会话连接数最大阈值或任一服务器连续两次获取的瞬时链路流量均大于瞬时链路流量最大阈值,则启动资源均衡模块通过SDN控制器进行资源均衡操作,否则执行步骤S204;S203. Compare the number of instantaneous session connections obtained twice in a row by each server with the maximum threshold of the number of instantaneous session connections, respectively, and compare the instantaneous link traffic obtained twice in a row by each server with the maximum threshold of instantaneous link traffic respectively , if the number of instantaneous session connections obtained by any server for two consecutive times is greater than the maximum threshold for the number of instantaneous session connections or the instantaneous link traffic obtained by any server for two consecutive times is greater than the maximum instantaneous link traffic threshold, the resource balancing module is activated to pass The SDN controller performs a resource balancing operation, otherwise, step S204 is performed;
S204、根据每个服务器连续预设次数获取的瞬时会话连接数和瞬时链路流量,得到每个服务器的平均会话连接数和链路平均流量;S204, obtaining the average number of session connections and the average link flow of each server according to the instantaneous session connection number and instantaneous link flow obtained by each server for a continuous preset number of times;
S205、将每个服务器的平均会话连接数分别与平均会话连接数最大阈值和平均会话连接数聚合阈值进行比较,并将每个服务器的链路平均流量分别与链路平均流量最大阈值和链路平均流量聚合阈值进行比较,得到比较结果;S205. Compare the average number of session connections of each server with the maximum threshold of the average number of session connections and the aggregated threshold of the average number of session connections, respectively, and compare the average traffic of each server with the maximum threshold of average traffic of the link and the maximum threshold of average traffic of the link, respectively. The average traffic aggregation threshold is compared to obtain the comparison result;
S206、当比较结果为任一服务器的平均会话连接数大于平均会话连接数最大阈值或任一服务器的链路平均流量大于链路平均流量最大阈值时,启动资源均衡模块通过SDN控制器进行资源均衡操作;S206. When the comparison result is that the average session connection number of any server is greater than the maximum threshold of the average session connection number or the average link traffic of any server is greater than the maximum link average traffic threshold, start the resource balancing module to perform resource balancing through the SDN controller operate;
S207、当比较结果为至少一个服务器的平均会话连接数小于平均会话连接数聚合阈值且至少一个服务器的链路平均流量小于链路平均流量聚合阈值时,启动资源聚合模块通过SDN控制器进行资源聚合操作。S207. When the comparison result is that the average session connection number of at least one server is less than the average session connection number aggregation threshold and the link average traffic of at least one server is less than the link average traffic aggregation threshold, start the resource aggregation module to perform resource aggregation through the SDN controller operate.
在云计算平台上部署应用服务器、数据库服务器、负载均衡服务器、SDN控制器(或SDN控制器集群),SDN控制器(或SDN控制器集群)部署于每个所述服务器中,每个所述服务器均为云平台提供的虚拟机,每个所述服务器通过虚拟交换机或物理交换机相连接,虚拟交换机及物理交换机为专用SDN交换机或SDN混合类型交换机。Deploy application servers, database servers, load balancing servers, SDN controllers (or SDN controller clusters) on the cloud computing platform, and SDN controllers (or SDN controller clusters) are deployed in each of the servers, and each of the The servers are all virtual machines provided by the cloud platform, and each of the servers is connected through a virtual switch or a physical switch, and the virtual switch and the physical switch are dedicated SDN switches or SDN hybrid switches.
系统构建完成后,以时间t为采样间隔连续获取web应用系统各个服务器及其对应链路瞬时会话连接数Scurrent及瞬时链路流量Bcurrent。After the system is constructed, the instantaneous session connection number S current and instantaneous link traffic B current of each server and its corresponding link of the web application system are continuously obtained with time t as the sampling interval.
设置瞬时链路流量最大阈值Bmax,瞬时会话连接数最大阈值Smax,将连续两次瞬时链路流量、瞬时会话连接数与对应的最大阈值进行比较,如果连续两次瞬时链路流量Bcurrent>Bmax或连续两次瞬时会话连接数Scurrent>Smax,则进行资源均衡操作,否则执行以下步骤。Set the maximum threshold value B max of instantaneous link traffic and the maximum threshold value S max of the number of instantaneous session connections. Compare the two consecutive instantaneous link traffic and the number of instantaneous session connections with the corresponding maximum thresholds. If two consecutive instantaneous link traffic B current >B max or the number of instantaneous session connections S current > S max for two consecutive times, the resource balancing operation is performed, otherwise, the following steps are performed.
设在时间间隔T内获取N次测量结果分别为Scurrent1,Scurrent2…Scurrentn,通过公式(1)计算出T时间内平均会话连接数为Savg:Assuming that the N measurement results obtained within the time interval T are S current1 , S current2 ···
设在时间间隔T内获取N次流量测量结果为Bcurrent1,Bcurrent2…Bcurrentn,通过公式(2)计算出T时间内链路平均流量为:Assuming that N times of traffic measurement results are obtained within the time interval T as B current1 , B current2 . . . B currentn , the average link traffic in the time T is calculated by formula (2) as:
设平均会话连接数最大阈值为Savg_max,平均会话连接数聚合阈值为Savg_min,链路平均流量最大阈值为Bavg_max,链路平均流量聚合阈值为Bavg_min,如果Savg>Savg_max或Bavg>Bavg_max,则进行资源均衡操作,如果Savg<Savg_min且Bavg<Bavg_min,则通过SDN控制器查询系统会话负载与链路流量状态信息,如果存在两组以上满足上述聚合条件,则进行资源聚合操作。Let the maximum threshold of the average number of session connections be S avg_max , the aggregate threshold of the average number of session connections to be S avg_min , the maximum threshold of average link traffic to be B avg_max , and the aggregate threshold of average link traffic to be B avg_min , if S avg >S avg_max or B avg >B avg_max , perform resource balancing operation. If S avg < S avg_min and B avg < B avg_min , query the system session load and link traffic status information through the SDN controller. If there are more than two groups that meet the above aggregation conditions, then Perform resource aggregation operations.
资源均衡操作过程包括:SDN控制器通过全局资源信息库,查找会话及链路资源综合使用最小的服务器,设该服务器会话连接数最大均衡数量为Sbalance_max,链路流量最大均衡数量为Bbalance_max,平均会话连接数为Savg1,链路平均流量为Bavg1,计算需要均衡的资源数Sbalance=Savg_max-Savg,Bbalance=Bavg_max-Bavg,如果Sbalance<Sbalance_max-Savg1且Bbalance<Bbalance_max-Bavg1,则SDN控制器通过流表方式将多余负载均衡至该服务器,否则计算剩余均衡负载数量Srest_balance=Sbalance-(Sbalance_max-Savg1),Brest_balance=Bbalance-(Bbalance_max-Bavg1),继续进行资源均衡操作,直到所有流量和会话数都被均衡到其他服务器,如果没有可用的均衡服务器,则通过云平台启动新的应用服务器,并通过控制器建立相关链路,实现资源的均衡操作。The resource balancing operation process includes: the SDN controller searches for the server with the smallest comprehensive usage of session and link resources through the global resource information base, and sets the maximum balanced number of session connections of the server as S balance_max , and the maximum balanced number of link traffic as B balance_max , The average number of session connections is S avg1 , and the average link traffic is B avg1 . Calculate the number of resources to be balanced: S balance =S avg_max -S avg , B balance =B avg_max -B avg , if S balance < S balance_max -S avg1 and B balance <B balance_max -B avg1 , the SDN controller balances the excess load to the server through the flow table method, otherwise calculates the number of remaining balanced loads S rest_balance =S balance -(S balance_max -S avg1 ), B rest_balance =B balance -(B balance_max -B avg1 ), continue the resource balancing operation until all traffic and sessions are balanced to other servers, if there is no available balance server, start a new application server through the cloud platform and establish it through the controller Related links to achieve resource balancing operation.
资源聚合操作过程包括:SDN控制器通过全局资源信息库,查找会话及链路资源综合使用最小的两个服务器,设两个服务器平均会话连接数为Savg1和Savg2,链路平均流量为Bavg1和Bavg2,计算聚合后服务器会话数Stotal=Savg1+Savg2,聚合后链路流量Btotal=Bavg1+Bavg2,如果Stotal>Savg_max或Btotal>Bavg_max,不执行操作;如果Savg_min<Stotal<Savg_max且Bavg_min<Btotal<Bavg_max,则SDN控制器将两条链路聚合,并释放其中一条链路及服务器所占用的资源,如果Stotal<Savg_min且Btotal<Savg_min,则继续进行资源聚合操作,直到无法找到该类型资源。The resource aggregation operation process includes: the SDN controller searches for the two servers with the smallest comprehensive usage of session and link resources through the global resource information base. Let the average session connection numbers of the two servers be S avg1 and S avg2 , and the average link traffic is B avg1 and B avg2 , calculate the number of server sessions after aggregation S total =S avg1 +S avg2 , link traffic after aggregation B total =B avg1 +B avg2 , if S total >S avg_max or B total >B avg_max , no operation is performed ; If S avg_min <S total <S avg_max and B avg_min <B total <B avg_max , the SDN controller aggregates the two links and releases the resources occupied by one of the links and the server, if S total < S avg_min And B total <S avg_min , continue to perform resource aggregation operation until the resource of this type cannot be found.
实施例,配置由5台物理服务器组成的Openstack云计算平台,单台物理服务器配置Intel Xeon E5620 2.4G 4核8线程处理器,64GB RAM,SAS 2.0T RAID5硬盘,虚拟机创建采用统一规格,分配Intel Xeon E5620*1的CPU,5GB内存,30GB硬盘,运行Ubuntu 14.04LTS操作系统。初始Web应用系统由6台虚拟服务器组成,包括1台负载均衡服务器,安装Haproxy软件;4台Web应用服务器,安装tomcat中间件及Sun PetStore应用程序,1台SDN控制器服务器,安装Opendaylight开源控制器。整个Web应用系统初始部署状态,如图3所示。In the example, an Openstack cloud computing platform consisting of 5 physical servers is configured, and a single physical server is configured with an Intel Xeon E5620 2.4G 4-core 8-thread processor, 64GB RAM, SAS 2.0T RAID5 hard disks, and the virtual machine is created with uniform specifications and allocated. Intel Xeon E5620*1 CPU, 5GB memory, 30GB hard disk, running Ubuntu 14.04LTS operating system. The initial web application system consists of 6 virtual servers, including 1 load balancing server, installed with Haproxy software; 4 web application servers, installed with tomcat middleware and Sun PetStore application, 1 SDN controller server, installed with Opendaylight open source controller . The initial deployment state of the entire Web application system is shown in Figure 3.
在实际测试中,设定平均会话信息统计时间段=15min,间隔时间内每1min(即t=1min)获取一次瞬时会话连接数及链路瞬时流量,15min后计算时间间隔内15次会话连接数的平均值作为平均会话连接数Savg,15次链路流量的平均值作为链路平均流量Bavg。此外,设定最大瞬时会话连接数为50,最大瞬时链路流量为70M,平均会话连接数最低聚合阈值8,链路平均流量最低聚合阈值为25M,平均会话连接数最大阈值为20,链路平均流量最大阈值为80M。In the actual test, set the average session information statistics time period=15min, obtain the instantaneous session connection number and link instantaneous traffic every 1min (ie t=1min) within the interval, and calculate the number of 15 session connections within the time interval after 15min The average value is taken as the average session connection number S avg , and the average value of 15 link traffic is taken as the average link traffic B avg . In addition, set the maximum number of instantaneous session connections to 50, the maximum instantaneous link traffic to 70M, the minimum aggregation threshold for average session connections to 8, the minimum aggregation threshold for average link traffic to 25M, the maximum average session connection threshold to 20, and the link The maximum threshold of average traffic is 80M.
首先,使用openstack平台部署6台虚拟服务器组成的Web应用系统。监控web应用系统中每台服务器会话连接数及其链路流量,在此需要对瞬时会话连接数、链路瞬时流量、平均会话连接数及链路平均流量进行采集与计算,同时需要对瞬时会话连接数、链路瞬时流量进行判断,看是否连续两次超出最大阈值,如果超出,则进行资源均衡操作,如果未超出则对指定时间段内的服务器及链路平均负载进行判断。计算指定时间间隔内的平均会话连接数Savg与链路平均流量Bavg,将Savg、Bavg与平均会话连接数最大阀值Smax、链路平均流量最大阀值Bmax、平均会话连接数最低聚合阈值Smin、链路平均流量最低聚合阈值Bmin进行比对,如果Savg>Smax或Bavg>Bmax,则执行资源均衡操作,若存在多余服务器及链路满足要求,则将超出的会话数及链路流量均衡到其他服务器中,若不存在,则通过云平台启动新的虚拟服务器,并添加到负载均衡中,实现负载的均衡操作;如果所有服务器均满足Smin<Savg<Smax且Smin<Bavg<Smax,保持现有web应用系统规模不变,不需要进行资源管理操作;如果有多于两台服务器满足Savg<Smin且Bavg<Bmin,执行资源聚合操作,通过SDN控制器改变访问路径,将两台服务器访问会话及流量聚合到对一台服务器访问中,另一台服务器移除应用系统。First, use the openstack platform to deploy a web application system composed of 6 virtual servers. Monitor the number of session connections and link traffic of each server in the web application system. Here, it is necessary to collect and calculate the number of instantaneous session connections, instantaneous link traffic, average session connections, and average link traffic. The number of connections and the instantaneous traffic of the link are judged to see if the maximum threshold is exceeded twice in a row. If it exceeds, the resource balancing operation will be performed. If it does not exceed, the average load of the server and link within the specified time period will be judged. Calculate the average number of session connections S avg and the average link traffic B avg within the specified time interval, and compare S avg , B avg with the maximum threshold S max of the average number of session connections, the maximum threshold of average link traffic B max , and the average session connection Compare the minimum aggregation threshold S min and the minimum aggregation threshold B min of average link traffic. If S avg > S max or B avg > B max , the resource balancing operation is performed. If there are redundant servers and links that meet the requirements, then Balance the excess sessions and link traffic to other servers. If they do not exist, start a new virtual server through the cloud platform and add it to the load balancing to achieve load balancing; if all servers satisfy S min < S avg < S max and S min < B avg < S max , keep the scale of the existing web application system unchanged, and do not need to perform resource management operations; if there are more than two servers that satisfy S avg < S min and B avg < B min , perform the resource aggregation operation, change the access path through the SDN controller, aggregate the access sessions and traffic of the two servers to access one server, and remove the application system from the other server.
在上述具体实施过程中,采用自动化方式产生访问会话连接数及链路流量,初始状态整个系统包括1台负载均衡服务器,4台Web应用服务器,1台SDN控制服务器(用于部署SDN控制器或集群),1台支持SDN的OpenvSwitch虚拟交换机,其中,负载均衡服务器及web应用服务器都连接于OpenvSwitch交换机,OpenvSwitch交换机通过专用通道与SDN控制器相连接。实验中采用逐步加大负载的方式产生会话连接及链路流量,设最低聚合连接会话数阈值8,最低聚合链路流量阈值为25M,最大平均会话连接阈值为20,最大链路平均流量阈值为80M,最初保证每分钟每个服务器会话连接数在5左右,每条链路流量20M左右,此时会话负载及链路流量均小于最低聚合阈值,触发聚合操作,通过SDN控制器下发流表改变外部访问路径,实现资源聚合,将两台服务器及其链路聚合为一条,整个系统减少2台web应用服务器;此后逐渐加压,让每个服务器平均会话连接数达到10,每条链路流量达到45M左右,此时会话连接数及链路流量处于最小聚合阈值与最大阈值之间,满足资源管理需求,因此不需要进行相关操作;此后,加大个别服务器会话连接及链路流量负载,使其中两个服务器平均会话数达到25,链路流量达到90M左右,两个服务器会话连接数保持10,链路流量保持45M左右,此时触发均衡操作,将负载超过最大阈值的两台服务器会话及流量均衡到其余两台负载较轻的服务器中,使其负载满足系统需求;然后,继续加大服务器会话连接数量及链路流量负载,使每个服务器平均会话数达到25,链路流量达到90M左右,此时所有服务器均超过最大阈值,无法进行均衡,此时通过云平台自动添加一台新的服务器,并连接到OpenvSwitch交换机,将多余流量均衡到此新添加服务器中。In the above specific implementation process, the number of access session connections and link traffic is automatically generated. In the initial state, the entire system includes 1 load balancing server, 4 Web application servers, and 1 SDN control server (for deploying SDN controllers or Cluster), an OpenvSwitch virtual switch that supports SDN, in which, the load balancing server and the web application server are connected to the OpenvSwitch switch, and the OpenvSwitch switch is connected to the SDN controller through a dedicated channel. In the experiment, the method of gradually increasing the load is used to generate session connections and link traffic. The minimum aggregated connection session threshold is 8, the minimum aggregated link traffic threshold is 25M, the maximum average session connection threshold is 20, and the maximum link average traffic threshold is 80M. Initially, the number of session connections per server per minute is about 5, and the traffic per link is about 20M. At this time, the session load and link traffic are both less than the minimum aggregation threshold. The aggregation operation is triggered, and the flow table is issued through the SDN controller. Change the external access path, realize resource aggregation, aggregate two servers and their links into one, and reduce the entire system by 2 web application servers; then gradually increase the pressure, so that the average number of session connections per server reaches 10, and each link When the traffic reaches about 45M, the number of session connections and link traffic are between the minimum aggregation threshold and the maximum threshold to meet resource management requirements, so no related operations are required; after that, increase the session connection and link traffic load of individual servers. The average number of sessions on two of the servers reaches 25, the link traffic reaches about 90M, the number of session connections between the two servers remains 10, and the link traffic remains about 45M. At this time, a balancing operation is triggered to balance the two server sessions whose load exceeds the maximum threshold. Then, continue to increase the number of server session connections and link traffic load, so that the average number of sessions per server reaches 25, and the link traffic reaches At about 90M, all servers exceed the maximum threshold and cannot be balanced. At this time, a new server is automatically added through the cloud platform and connected to the OpenvSwitch switch to balance the excess traffic to the newly added server.
通过以上实验证明该方法可以自动化的依据会话连接数及链路流量两种策略综合考虑调整Web应用集群规模,一方面相对于手工添加服务器到Web应用集群节省了大量部署时间,避免了由于人工原因造成的无法在负载增大时调整服务器集群的问题,另一方面相对于传统云计算平台只能通过添加服务器实现负载均衡的方式,节省了服务器资源,有效提高了现有资源的利用效率。Through the above experiments, it is proved that this method can automatically adjust the scale of the Web application cluster according to the two strategies of the number of session connections and the link traffic. The resulting problem is that the server cluster cannot be adjusted when the load increases. On the other hand, compared with the traditional cloud computing platform, the load balance can only be achieved by adding servers, which saves server resources and effectively improves the utilization efficiency of existing resources.
如图4所示,一种基于SDN的云计算环境下web系统资源管理系统,包括:As shown in Figure 4, an SDN-based web system resource management system in a cloud computing environment includes:
构建模块401,用于构建基于SDN的云计算环境下的web应用系统,web应用系统包括:部署在云计算平台上的每个服务器和SDN控制器;The building module 401 is used to build a web application system in an SDN-based cloud computing environment, where the web application system includes: each server and an SDN controller deployed on the cloud computing platform;
第一获取模块402,用于每间隔预设时间,获取web应用系统的每个服务器的瞬时会话连接数和瞬时链路流量;The first obtaining module 402 is configured to obtain the instantaneous session connection number and instantaneous link traffic of each server of the web application system at preset time intervals;
第一比较模块403,用于将每个服务器连续两次获取的瞬时会话连接数与瞬时会话连接数最大阈值进行比较,并将每个服务器续两次获取的瞬时链路流量与瞬时链路流量最大阈值进行比较,如果任一服务器连续两次获取的瞬时会话连接数均大于瞬时会话连接数最大阈值或任一服务器连续两次获取的瞬时链路流量均大于瞬时链路流量最大阈值,则启动资源均衡模块407通过SDN控制器进行资源均衡操作,否则调用第二比较模块;The first comparison module 403 is configured to compare the number of instantaneous session connections obtained twice in a row by each server with the maximum threshold of the number of instantaneous session connections, and compare the instantaneous link traffic obtained twice by each server with the instantaneous link traffic The maximum threshold is compared. If the number of instantaneous session connections obtained by any server for two consecutive times is greater than the maximum number of instantaneous session connections or the instantaneous link traffic obtained by any server for two consecutive times is greater than the maximum instantaneous link traffic threshold, the system will be activated. The resource balancing module 407 performs the resource balancing operation through the SDN controller, otherwise the second comparison module is called;
第二获取模块404,用于根据每个服务器连续预设次数获取的瞬时会话连接数和瞬时链路流量,得到的每个服务器的平均会话连接数和链路平均流量;The second obtaining module 404 is configured to obtain the average session connection number and link average flow of each server according to the instantaneous session connection number and instantaneous link flow obtained by each server continuously preset times;
第二比较模块405,用于将每个服务器的平均会话连接数与平均会话连接数最大阈值进行比较,并将每个服务器的链路平均流量与平均会话连接数聚合阈值进行比较,得到比较结果;The second comparison module 405 is configured to compare the average number of session connections of each server with the maximum threshold of the average number of session connections, and compare the average traffic of each server with the aggregate threshold of the average number of session connections to obtain a comparison result ;
操作模块406,用于根据比较结果,启动资源均衡模块407通过SDN控制器进行资源均衡操作或启动资源聚合模块408通过SDN控制器进行资源聚合操作。The operation module 406 is configured to, according to the comparison result, start the resource balancing module 407 to perform a resource balancing operation through the SDN controller or start the resource aggregation module 408 to perform a resource aggregation operation through the SDN controller.
具体地,操作模块406具体用于:Specifically, the operation module 406 is specifically used for:
当比较结果为任一服务器的平均会话连接数大于平均会话连接数最大阈值或任一服务器的链路平均流量大于链路平均流量最大阈值时,启动资源均衡模块407通过SDN控制器进行资源均衡操作;When the comparison result is that the average number of session connections of any server is greater than the maximum threshold of the average number of session connections or the average link traffic of any server is greater than the maximum threshold of average link traffic, the resource balancing module 407 is started to perform a resource balancing operation through the SDN controller ;
当比较结果为至少一个服务器的平均会话连接数均小于平均会话连接数聚合阈值且至少一个服务器的链路平均流量均小于链路平均流量聚合阈值时,启动资源聚合模块408通过SDN控制器进行资源聚合操作。When the comparison result is that the average session connection number of at least one server is less than the average session connection number aggregation threshold and the average link traffic of at least one server is less than the link average traffic aggregation threshold, the resource aggregation module 408 is started to perform resource aggregation through the SDN controller. Aggregate operation.
具体地,资源均衡模块407具体用于:Specifically, the resource balancing module 407 is specifically used for:
通过SDN控制器从全局资源信息库中查找得到会话及链路资源综合使用最小的第一服务器;Obtain the first server with the smallest comprehensive usage of session and link resources from the global resource information base through the SDN controller;
当会话连接数需均衡的资源数小于第一服务器的会话连接数最大均衡数与平均会话连接数的差值且链路流量需均衡的资源数小于第一服务器的链路流量最大均衡数量与链路平均流量的差值时,通过流表方式将多余负载均衡至第一服务器,When the number of resources to be balanced for the number of session connections is less than the difference between the maximum number of balanced session connections of the first server and the average number of session connections, and the number of resources to be balanced for link traffic is less than the maximum number of balanced link traffic of the first server and the number of links When the difference between the average traffic of the road, the excess load is balanced to the first server through the flow table method.
其中,会话连接数需均衡的资源数为平均会话连接数最大阈值与两个以上服务器的平均会话连接数之差,链路流量需均衡的资源数为链路平均流量最大阈值与两个以上服务器的链路平均流量之差。Among them, the number of resources to be balanced for the number of session connections is the difference between the maximum threshold of the average number of session connections and the average number of session connections of two or more servers, and the number of resources to be balanced for link traffic is the maximum threshold of the average link traffic and the number of more than two servers. The difference between the average traffic of the link.
具体地,资源聚合模块408具体用于:Specifically, the resource aggregation module 408 is specifically used for:
通过SDN控制器从全局资源信息库中查找得到会话及链路资源综合使用最小的两个服务器;The two servers with the smallest comprehensive usage of session and link resources are obtained from the global resource information base through the SDN controller;
当聚合后服务器会话连接数位于平均会话连接数聚合阈值与平均会话连接数最大阈值之间且聚合后服务器链路流量位于链路平均流量聚合阈值与链路平均流量最大阈值之间时,将两个服务器对应的两条链路聚合,并释放两条链路中的任一条链路及该链路对应的服务器所占用的资源,When the number of server session connections after aggregation is between the aggregation threshold of average session connections and the maximum threshold of average session connections and the server link traffic after aggregation is between the aggregation threshold of average link traffic and the maximum threshold of average link traffic, the two The two links corresponding to each server are aggregated, and the resources occupied by any one of the two links and the server corresponding to the link are released.
其中,聚合后服务器会话连接数为两个服务器的平均会话连接数之和,聚合后服务器链路流量为两个服务器的链路平均流量之和。The number of session connections of the server after aggregation is the sum of the average number of session connections of the two servers, and the link traffic of the server after aggregation is the sum of the average link traffic of the two servers.
具体地,多个服务器包括:应用服务器、数据库服务器和负载均衡服务器。Specifically, the multiple servers include: an application server, a database server, and a load balancing server.
以上所述仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included in the protection of the present invention. within the range.
Claims (6)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710703713.8A CN107493333B (en) | 2017-08-16 | 2017-08-16 | SDN-based web system resource management method and system in cloud computing environment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710703713.8A CN107493333B (en) | 2017-08-16 | 2017-08-16 | SDN-based web system resource management method and system in cloud computing environment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107493333A CN107493333A (en) | 2017-12-19 |
CN107493333B true CN107493333B (en) | 2020-06-12 |
Family
ID=60646163
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710703713.8A Active CN107493333B (en) | 2017-08-16 | 2017-08-16 | SDN-based web system resource management method and system in cloud computing environment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107493333B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108449197B (en) * | 2018-01-03 | 2020-11-20 | 北京大学 | A method for building multi-cloud environment network based on software-defined network |
CN110166579B (en) * | 2019-07-16 | 2020-01-03 | 华为技术有限公司 | Server communication method, broadband access server and system |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102110014A (en) * | 2011-03-15 | 2011-06-29 | 合肥华云通信技术有限公司 | Method for balancing loads of virtual machine (VM) |
CN103561055A (en) * | 2013-10-11 | 2014-02-05 | 山东省计算中心 | Web application automatic elastic extension method under cloud computing environment based on sessions |
CN103795805A (en) * | 2014-02-27 | 2014-05-14 | 中国科学技术大学苏州研究院 | Distributed server load balancing method based on SDN |
CN104917678A (en) * | 2015-06-02 | 2015-09-16 | 上海斐讯数据通信技术有限公司 | SDN(software defined networking)-based link aggregation method |
CN105282043A (en) * | 2014-06-20 | 2016-01-27 | 中国电信股份有限公司 | Global network load balancing system, device and method |
CN105391797A (en) * | 2015-12-03 | 2016-03-09 | 北京航空航天大学 | SDN-based cloud server load balancing method and device |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9756121B2 (en) * | 2015-06-24 | 2017-09-05 | International Business Machines Corporation | Optimizing routing and load balancing in an SDN-enabled cloud during enterprise data center migration |
-
2017
- 2017-08-16 CN CN201710703713.8A patent/CN107493333B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102110014A (en) * | 2011-03-15 | 2011-06-29 | 合肥华云通信技术有限公司 | Method for balancing loads of virtual machine (VM) |
CN103561055A (en) * | 2013-10-11 | 2014-02-05 | 山东省计算中心 | Web application automatic elastic extension method under cloud computing environment based on sessions |
CN103795805A (en) * | 2014-02-27 | 2014-05-14 | 中国科学技术大学苏州研究院 | Distributed server load balancing method based on SDN |
CN105282043A (en) * | 2014-06-20 | 2016-01-27 | 中国电信股份有限公司 | Global network load balancing system, device and method |
CN104917678A (en) * | 2015-06-02 | 2015-09-16 | 上海斐讯数据通信技术有限公司 | SDN(software defined networking)-based link aggregation method |
CN105391797A (en) * | 2015-12-03 | 2016-03-09 | 北京航空航天大学 | SDN-based cloud server load balancing method and device |
Also Published As
Publication number | Publication date |
---|---|
CN107493333A (en) | 2017-12-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109617992B (en) | Block chain-based dynamic election method for edge computing nodes | |
CN102446115B (en) | Dynamic deployment method for virtual machines | |
CN103561055B (en) | Web application automatic elastic extended method under conversation-based cloud computing environment | |
CN102724277B (en) | The method of live migration of virtual machine and deployment, server and group system | |
CN103997512B (en) | A kind of data trnascription quantity towards cloud storage system determines method | |
CN106133693B (en) | Virtual machine migration method, device and equipment | |
CN102694868A (en) | Cluster system implementation and task dynamic distribution method | |
JP2019533913A (en) | Load balancing optimization method and apparatus based on cloud monitoring | |
CN106681839B (en) | Elastic computing dynamic allocation method | |
CN104133727A (en) | Load distribution method based on real-time resources | |
CN103559072A (en) | Method and system for implementing bidirectional auto scaling service of virtual machines | |
CN108429815A (en) | Dynamic Resource Scheduling Method Based on OpenStack | |
CN103645795A (en) | Cloud computing data center energy saving method based on ANN (artificial neural network) | |
US20200042608A1 (en) | Distributed file system load balancing based on available node capacity | |
CN103763363B (en) | Cloud storage system and file copy deployment method based on cloud storage system | |
WO2017020742A1 (en) | Load balancing method and device | |
CN104601664A (en) | Cloud computing platform resource management and virtual machine dispatching control system | |
CN107197039B (en) | A CDN-based PAAS platform service package distribution method and system | |
WO2024027192A1 (en) | Control system and method for multi-branch battery system | |
CN105407057A (en) | Load balancing method and device | |
Tsai et al. | Two-tier multi-tenancy scaling and load balancing | |
Yapicioglu et al. | A traffic-aware virtual machine placement method for cloud data centers | |
CN107493333B (en) | SDN-based web system resource management method and system in cloud computing environment | |
CN114090220A (en) | Hierarchical CPU and memory resource scheduling method | |
CN114385366A (en) | Elastic capacity expansion method, system, medium and equipment for container group of container cloud platform |
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 |