In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
I. the working principle of lvs
Use cluster technology and liunx operating system to achieve a high-performance, high-availability server. Scalability, reliability, good management.
Features: several structures of scalable network services, all of which require a front-end load scheduler (or multiple master-slave backups). We first analyze the main technologies to implement virtual network services, and point out that IP load balancing technology is the most efficient in the implementation of load scheduler. Among the existing IP load balancing technologies, a group of servers are mainly composed of a group of servers into a high-performance and highly available virtual server through network address translation (Network Address Translation), which we call 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, we propose two methods: VS/TUN (Virtual Server via IP Tunneling) to realize virtual server through IP tunnel and VS/DR (Virtual Server via Direct Routing) to realize virtual server through 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.
Technology: LVS cluster uses ip load balancing technology to reduce the pressure on the server, transfers the request balance to different servers for execution, and the scheduler automatically shields the failure of the server, thus forming a group of servers into a high-performance, high-availability virtual server. The structure of the whole server cluster is transparent to the client, and there is no need to modify the client and server programs. For this reason, the transparency, scalability, high availability and manageability of the system are taken into account in the design.
LVS: three main structures are adopted. The main parts are
A server pool is a group of servers that are performing client requests, such as WEB,MAL,FTP and DNS.
Load scheduler: it is the external front-end machine of the entire cluster, which is responsible for sending customer requests to a set of servers for execution, and the customer confirms that the server is from an ip (virtual machine ip address).
Shared storage, which provides a shared storage area for the server, so it is easy to make the server pool have the same content and provide the same services.
Advantages
Open source, free
It has some advantages of software load balancing.
Some related technical resources can be found on the Internet.
Shortcoming
There is no reliable support service, and no one is responsible for the results.
The function is relatively simple, the load balancing ability to support complex applications is poor, and there are few algorithms.
To turn on the tunnel, you need to compile the kernel
Complex configuration
It is mainly used in LINUX systems, and currently there is no one dedicated to the windows system version, but you can configure windows to be called the real server in the lvs cluster (win2003, win2008).
1. DS:Director Server . Refers to the front-end load balancer node.
2. RS:Real Server . The real working server at the back end.
3. VIP: the IP address that directly faces the user's request from the outside and is the target of the user's request.
4. DIP:Director Server IP, the IP address that is mainly used to communicate with internal hosts.
5. RIP:Real Server IP, the IP address of the backend server.
6. CIP:Client IP, access the IP address of the client.
Keeplived principle
Keeplvied is also a modular design with different functions of different modules.
Core: is the core of keeplived, startup and maintenance of complex main processes, loading and parsing of global configuration, etc.
Check: responsible for healthchecker (health check), including various health check methods and corresponding configuration parsing, including LVS configuration parsing
Vrrp: the VRRPD child process, which is used to implement the VRRP protocol
Libipfwc:iptables (ipchains) library, which is used to configure LVS
Libipvs*: configuration LVS will be used
There are three processes when keepalived starts.
Parent process: memory management, child process management
Child process: VRRP child process
Child process: healthchecker child process
As shown in the figure, both sub-processes are supervised by watchDog, each of which is complicated with its own business, and the healthcheck sub-process complicately checks the health of its own server. For example, if the healthcheck sub-process checks that the MASTER service is unavailable, it will notify the vrrp sub-process on the local machine and ask him to delete the advertisement and remove the virtual machine ip and change to the BACKUP state.
Keeplived configuration details
Keeplived has three types of configuration areas, which are three different areas in a configuration file.
Global configuration
VRRPD configuration
LVS configuration
Global configuration is divided into two child processes: global definition (global definition)
Static Route configuration (static ipaddres/routes)
Summary: lvs and keeplived are a heartbeat test. For example, I am keeplived who has been touching the heart of lvs to monitor the system status of lvs. If lvs crashes, keeplived takes the place of lvs at any time as a hot backup, but lvs and keeplived are two completely different things.
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.