Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Introduction to the basic meaning and related extension of LVS load balancing Cluster

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

The following brings you the basic meaning and related extension of LVS load balancing cluster, hoping to give you some help in practical application. Load balancing involves more things, there are not many theories, and there are many books on the Internet. Today, we will use the accumulated experience in the industry to do an answer.

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 cloud 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 Cluster, cluster, cluster consists of multiple hosts, but only as a whole in Internet applications, as the site's requirements for hardware performance, response speed, service stability, data reliability and so on become higher and higher, a single server is unable to solve the problem by using expensive minicomputers and mainframes to build a service cluster according to the target differences 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) to improve the responsiveness of the application system. Processing as many access requests as possible, reducing latency as the goal, achieving high concurrency and high load (LB) overall performance LB load distribution depends on the primary node diversion algorithm (scheduling algorithm) High availability Cluster (High Availability Cluster) aims to improve the reliability of the application system, reduce the outage time as much as possible, and ensure the continuity of services To achieve high availability (HA) fault tolerance, the working mode of HA includes duplex and master-slave high-performance computing clusters (High Performance Computer Cluster) with the goal of improving the CPU computing speed of application systems, expanding hardware resources and analytical capabilities, and achieving high-performance computing (HPC) capabilities equivalent to large and supercomputers. The high performance of high-performance computing clusters depends on "distributed computing" and "parallel computing". The CPU, memory and other resources of multiple servers are integrated through special hardware and software 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 currently the most widely used cluster type in enterprises. The load scheduling technology of cluster has three working modes: 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

Tier 1: load scheduler (Load Balancer or Director) Tier 2: server Pool (server pool) Tier 3: shared Storage (Share Storage)

Load balancing cluster structure

Load balancing structure

About LVS Virtual Server

Linux Virtual Server

Load balancing solution for Linux kernel in May 1998, the official website: http://www.linuxvirtualserver.org/ was created by Dr. Zhang Wensong of China.

Load scheduling algorithm of LVS

Polling (Round Robin) distributes the received access requests to each node of the cluster (real server) in turn, and treats each server equally, regardless of the actual number of connections of the server and the system load 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 dynamically adjust its weight to 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 connections (Least Connections) is allocated according to the number of connections established by the real server, and the access requests received are allocated first to the nodes with the least number of connections. Weighted least connections (Weighted Least Connections) in the case of large differences in the performance of server nodes, nodes with higher weights can be automatically adjusted for real servers will bear a larger proportion of active connection load

After reading the basic meaning and related extension of LVS load balancing cluster, if there is anything else you need to know, you can find out what you are interested in in the industry information or find our professional and technical engineers for answers. Technical engineers have more than ten years of experience in the industry.

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report