In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "what is LVS load balancing". In daily operation, I believe many people have doubts about what is LVS load balancing. The editor consulted all kinds of information and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts about "what is LVS load balancing"! Next, please follow the editor to study!
What is LVS load balancing?
Scalable network services involve several different structures, all of which require a front-end load scheduler (or multiple master-slave backups).
Firstly, the main technologies of implementing virtual network services are analyzed, and it is pointed out that IP load balancing technology is the most efficient in the implementation of load scheduler. In the existing IP load balancing technology, mainly through the network address translation NAT (Network Address Translation) to form a group of servers into a high-performance, high-availability virtual server, called VS/NAT technology (Virtual Server via Network Address Translation). Based on the analysis of the shortcomings of VS/NAT and the asymmetry of network services, this paper proposes a method to realize virtual server through IP tunnel, VS/TUN (Virtual Server via IP Tunneling), and a method to realize virtual server through direct routing, VS/DR (Virtual Server via Direct Routing), which can greatly improve the scalability of the system. VS/NAT, VS/TUN and VS/DR are three kinds of IP load balancing technologies implemented in LVS cluster.
Overview of Enterprise Cluster and its Application
The meaning of clustering
Cluster, cluster, cluster
It is composed of multiple hosts, but only as a whole.
In Internet applications, as the site has higher and higher requirements for hardware performance, response speed, service stability, data reliability and so on, a single server is unable to achieve its goals.
Solution method
Use expensive minicomputers and mainframes
Build a service cluster using a normal server
According to the target difference of the cluster, it can be divided into three types.
Load balancing cluster
High availability cluster
High performance computing cluster
Load balancing Cluster (Load Balance Cluster)
In order to improve the response ability of the application system. Handle as many access requests as possible, reduce latency as the goal, and achieve high concurrency and high load (LB) overall performance
The load distribution of LB depends on the shunting algorithm of the master node (scheduling algorithm)
High availability Cluster (High Availability Cluster)
The goal is to improve the reliability of the application system and reduce the downtime as much as possible, so as to ensure the continuity of services and achieve the fault tolerance effect of high availability (HA).
HA works in duplex mode and master-slave mode.
High performance Computing Cluster (High Performance Computer Cluster)
With the goal of improving the CPU computing speed, expanding hardware resources and analysis capability of the application system, the high performance computing (HPC) capability equivalent to that of large and supercomputers is obtained.
The high performance of high performance computing cluster depends on "distributed computing" and "parallel computing". Through special hardware and software, resources such as CPU and memory of multiple servers are integrated together to realize the computing power that only large and supercomputers have.
Note:
HA: high availability
Duplex is two flat-level servers, called decentralized clusters
Master and slave is a master server with multiple slave servers, which is called a centralized cluster
Analysis of working Mode of load balancing Cluster
Load balancing cluster is the most widely used cluster type in enterprises at present.
There are three working modes of cluster load scheduling technology.
Address Translation (NAT)
IP Tunnel (TUN)
Direct routing (DR)
NAT mode
Address Translation (Network Address Translation)
1. Referred to as NAT mode, similar to the private network structure of the firewall, the load scheduler acts as the gateway of all server nodes, that is, as the access entrance of the client and the access exit of each node to respond to the client.
two。 The server node uses a private IP address, which is located on the same physical network as the load scheduler, and its security is better than the other two methods (the security is the best)
TUN mode
IP Tunnel (IP Tunnel)
1. Referred to as the TUN mode, it adopts an open network structure. The load scheduler only serves as the access entrance for the client. Each node responds directly to the client through its own Internet connection instead of going through the load scheduler.
two。 The server nodes are scattered in different locations in the Internet, have independent public network IP addresses, and communicate with the load scheduler through a dedicated IP tunnel.
DR mode
Direct routing (Direct Routing)
1. Referred to as DR mode, it adopts a semi-open network structure, which is similar to that of TUN mode, but each node is not scattered in different places, but on the same physical network as the scheduler.
two。 The load scheduler connects with each node server through the local network, so there is no need to establish a dedicated IP tunnel.
The structure of load balancing
Layer 1: load scheduler (Load Balancer or Director)
Tier 2: server pool (server pool)
Layer 3: shared storage (Share Storage)
Load balancing cluster structure
Load balancing structure
About LVS Virtual Server
Linux Virtual Server
Load scheduling algorithm of LVS
Load balancing solution for Linux Kernel
In May 1998, it was founded by Dr. Zhang Wensong of China.
Official website: http://www.linuxvirtualserver.org/
Polling (Round Robin)
The received access requests are distributed sequentially to the nodes of the cluster (real servers), and each server is treated equally, regardless of the actual number of connections and system load of the server.
Weighted polling (Weighted Round Robin)
According to the processing capacity of the real server, the scheduler can automatically query the load of each node and adjust its weight dynamically.
Ensure that servers with strong processing power bear more access traffic
Weight: assign the number of visits, and the server with strong performance assigns more weight.
Load scheduling algorithm of LVS
Minimum connection (Least Connections)
According to the number of connections established by the real server, the received access requests are given priority to the node with the least number of connections.
Weighted least connection (Weighted Least Connections)
When the performance of the server node varies greatly, the weight can be adjusted automatically for the real server.
Nodes with higher weights will bear a greater proportion of the active connection load
At this point, the study on "what is LVS load balancing" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.