| Modern society is a ubiquitous network society, both in various network environment, the development of not only the volume of business far beyond the traditional estimate of the past. Customer demand for service quality and efficiency standards more stringent than ever. But simply rely on the resources of a single server, no matter how good the machine configuration, almost unable to meet the ever-growing customer needs.Accordingly, the distributed system provides tremendous processing power, a group of loosely connected, independent of the server network with each other in the application of the external services with a single performance, and management with a single system also has the same mode. The external manifestations of this single system can provide highly reliable and secure service. However, to realize and take full advantage of this capability, the need for good load distribution program to achieve a more rational distribution of traffic, so without incurring a device overloaded, while other devices have not been the situation of full capacity . It must be explained: the network load balancing device is not based equipment, but a performance optimization equipment. For network applications, not needing to load balancing, application traffic when the network is growing, a single processing unit can not meet the load demand, the network application traffic will be a bottleneck, the load balancing will play a role.Understanding of load balancing when the decade, not many people, in ten years later, the network load balancing network applications has become an important device, especially in large network applications, the load balancer is often the core equipment. Beware of the load balancing device based on the market even with the routing and switching equipment market, these go hand in hand. Can be seen, in recent years become the golden age of the load balancing market.Linux Virtual Server (Linux Virtual Server, called LVS) is initiated and Dr. Wensong Zhang to achieve load balancing based on IP technology, and support network address translation (NAT), IP tunneling(TUN) and direct routing(DR) three methods, greatly improves system scalability. Use it, can be achieved under the general conditions in the Linux load balancing. LVS load balancing clusters provide a choice of open source and free, and because of its own merits, rather the wide range of applications, but there are some bad points, such as relatively simple strategies inherent in the balance, the heavy load cluster environment often can not play the original cluster performance.Weighted least connection scheduling is LVS in default, and it is the most important scheduling algorithm introduces server weights to the weights to represent the real server's processing power, the power value can be set dynamically by the system administrator, the default value 1, in this algorithm, the service request will be allocated as much as possible the current number of connections with the server and into a corresponding proportion of its weight. The degree of adjustment algorithm takes into account the server load problem, but only to serve the current number of connections a node parameter considered as a real server, obviously biased, often can not reflect the actual server load, so that in heavy load the cluster, there will be load significantly increased the probability of tilt.This paper mainly studied the original merits of LVS load scheduling algorithm on how to be more rational and transparent distribution system in the processing load between the nodes in order to achieve the system performance better study the issues further, especially of his most important weighted least connections algorithm to the more in-depth, and the real server for its reference to the amount of expression of the load is too simple, just use the number of connections the load parameter value of not more accurate description of the server load this A new comprehensive weight distribution method as the original scheduling algorithm with the weighted nature of the supplement to achieve a number of real servers more rational allocation of scheduling, and thus improve the processing capacity of the entire cluster, thus do not upgrade the hardware structure of the original premise of improving the performance of the original cluster.In this paper, the processing power of the weight distribution method first workflow, the real server in every time period T of a default one's own load status of collection, including the CPU occupancy rate of C (Si) and memory free rate of M (Si) , on the CPU occupancy rate C (Si) the acquisition by reading the / proc / stat for, the collection rate on the memory free by reading / proc / meminfo for. The value of T is generally from 5 to 20 seconds, This is to avoid too frequent hand information collection may increase the burden on real server and the load balancer to unnecessary consumption of resources, on the other hand taking into account the actual load ah may the request of the peak appears, on the sudden need to cluster a large number of requests for a better deal. Real server load information collected by the right value function F (Si) = 0.6 * (1 - C (Si)) + 0.4 * M (Si) for processing, and as a new reference weight incoming server cache , the load scheduler reads the server cache F (Si) of the value, the value of the original W (Si) were compared, such as the absolute difference is less than book value to set the boundary B, the retention the original W (Si), such as the value exceeds a predetermined boundary B, the weights will write the new kernel IPVS scheduling. B, the same boundary conditions at the entry into force of frequency values and does not affect the IPVS stable enough under the premise of scheduling value.Processing priority weight distribution method is not an independent load scheduling algorithm, which is based on the original LVS load scheduling algorithm above is the original load scheduling algorithm for a supplement inadequate, and LVS in the nature of the algorithm with a weighted line with each other to play out of the system for better performance, especially as the weighted least connections algorithm to add, the bestFinally, using Microsoft provided Microsoft Web Application Stress Tool was constructed in the real environment, the corresponding test experiment, simulation significant customers through concurrent connections to the original weighted least connection scheduling algorithm and the increased processing power under the weight distribution of the priority Law of the LVS cluster system pressure test on the two cases than the response time and throughput TTLB Requests per second, experimental results show that the processing priority weight distribution method in the concurrent connections is small and does not reflect should some advantages, it is because the additional weight of the load distribution process scheduler, and an increase of an additional communication real server, when the concurrent connections Shu increasing O'clock in the response time and throughput are gradually reflected on the edge, making the cluster processing performance than under the original scheduling algorithm considerably improved. With the increased customer traffic, priority processing more balanced weight distribution method of scheduling the completion of the task load, the algorithm is more suitable for heavy load cluster. |