In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Main points of content:
I. Overview of enterprise cluster applications:
2. Classification of enterprise clusters:
3. Analysis of the working mode of load balancing cluster:
Fourth, load balancing cluster architecture:
5. LVS virtual server:
I. Overview of enterprise cluster applications:
In Internet applications, as the site has higher and higher requirements for hardware performance, response speed, service stability and data reliability, a single server is far from meeting the demand, so multiple servers are needed to form a cluster. but the external performance is still a whole, similar to a "representative".
Cluster:
Cluster, Cluster, Cluster
It is composed of multiple hosts, but only as a whole.
2. Classification of enterprise clusters:
Depending on the target differences targeted by the cluster, it can be divided into three types:
Load balancing cluster
High availability cluster
High performance computing cluster
(1) load balancer cluster (Load Balance Cluster)
With the goal of improving the responsiveness of the application system, handling as many access requests as possible, and reducing latency, the overall performance of high concurrency and high load (LB) can be achieved.
The load distribution of LB depends on the shunting algorithm of the master node.
(2) 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.
(3) High performance Computing Cluster (High Performmance Computer Cluster)
The goal is to improve the CPU computing speed of the application system, expand hardware resources and analysis capabilities, and obtain the high performance computing (HPC) capabilities equivalent to large, supercomputers.
The high performance of high-performance computing clusters depends on "distributed computing" and "parallel computing", which integrates CPU, memory and other resources of multiple servers through dedicated hardware and software.
3. Analysis of the working mode of load balancing cluster:
At present, load balancing cluster is the most widely used cluster type in enterprises. There are three working modes of load balancing scheduling technology for clusters.
1. Address translation (NAT)
2. IP Tunnel
3. Direct routing
(1), NAT mode (VS-NAT)
Principle: the destination address of the IP header of the data packet sent by the client is changed to the IP address of one of the RS on the load balancer and processed by this RS. After RS processing, the data is given to the load balancer, and the load balancer changes the original IP address of the packet to its own IP. During the period when the destination address is changed to the client IP address, both incoming and outgoing traffic must go through the load balancer.
Advantages: physical servers in the cluster can use any TCP/IP operating system, only the load balancer needs a legitimate IP address
Disadvantages: limited scalability. When the server node (ordinary PC server) grows too much, the load balancer will become the bottleneck of the whole system.
Because the flow of all request and reply packets goes through the load balancer. When there are too many server nodes
If a large number of packets converge on the load balancer, the speed will slow down!
(2) IP tunnel mode (VS-TUN)
Principle: first of all, we should know that the request packets of most Internet services on the Internet are very short, while the reply packets are usually very large, so the tunnel mode is to unlock the header of the data packet first, restore the packet, and return it directly to the client without going through the load balancer after encapsulating a new IP header tag (destination IP only) and sending it to the RS,RS. Note that because RS needs to restore packets sent from the load balancer, it must be supported.
IPTUNNEL protocol, so in the kernel of RS, you must compile to support the option of IPTUNNEL
Advantages: the load balancer is only responsible for distributing the request packet to the back-end node server, while RS sends the reply packet directly to the user. Therefore, it reduces a large amount of data flow of the load balancer, and the load balancer is no longer the bottleneck of the system, so it can handle a large number of requests. In this way, a load balancer can be distributed for many RS. And if you run on the public network, you can distribute it in different regions.
Cons: tunnel mode RS nodes require legitimate IP, which requires all servers to support the "IP Tunneling" (IP Encapsulation) protocol, and the server may be limited to some Linux systems.
(3) Direct routing mode (VS-DR)
Principle: both the load balancer and RS use the same IP for external services, but only DR responds to ARP requests. All RS keep silent on the ARP requests of their own IP, that is, the gateway will direct all requests for this service IP to DR. After receiving the packet, DR finds the corresponding RS according to the scheduling algorithm, and changes the destination MAC address to the MAC of RS (because IP is the same). The request is distributed to the RS and the RS receives the packet. After the processing is completed, because the IP is consistent, the data can be returned directly to the customer. It is tantamount to receiving the packet directly from the client and returning it to the client directly after processing. Because the load balancer needs to change the layer 2 packet header, the relationship between the load balancer and RS must be in a broadcast domain or can be simply understood as on the same switch.
Advantages: like TUN (tunnel mode), the load balancer only distributes requests, and the reply packet is returned to the client through a separate routing method. Compared with VS-TUN, VS-DR does not require a tunnel structure, so most operating systems can be used as physical servers.
Disadvantages: (not enough, only insufficient) requires that the network card of the load balancer must be on the same physical segment as the physical network card.
Fourth, load balancing cluster architecture:
Layer 1: load balancer
Tier 2: server pool
Layer 3: shared storage
Load balancing structure diagram:
5. LVS virtual server:
Linux Virtual Server
● load balancing solution for Linux Kernel
● was founded by Dr. Zhang Wensong of China in May 1998.
● official website: http://www.linuxvirtualserver.org/
(1) load scheduling algorithm of LVS:
1. Polling: distribute the received access requests to each node in the cluster (real server) in turn, and treat each server equally, regardless of the actual number of connections and system load of the server.
2. Weighted polling: the received access requests are allocated in turn according to the processing capacity of the real server, and the scheduler can automatically query the load of each node and dynamically adjust its weight; ensure that servers with strong processing capacity bear more access traffic.
(2) LVS load scheduling algorithm:
1. Minimum connection:
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.
2. Weighted least connection:
In the case of great differences in the performance of the server nodes, the weight can be adjusted automatically for the real server, and the nodes with higher weights will bear a larger proportion of the active connection load.
(3) LVS clusters are created in management (using ipvsadm tools)
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.