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--
The principle of LVS-NAT model is as follows:
When a user request arrives at the Director, the requested Datagram first goes to the PREROUTING chain in the kernel space. In this case, the source IP of the message is CIP, and the destination IP is VIP;PREROUTING. Check and find that the destination IP of the packet is local, and send the packet to the INPUT chain. IPVS compares whether the service requested by the packet is a cluster service. If so, modify the destination IP address of the packet to the back-end server IP, and then send the packet to the POSTROUTING chain. In this case, the source IP of the message is CIP, and the destination IP is RIP; through routing, the POSTROUTING chain sends the packet to the IP of Real Server;Real Server comparison and finds that the target is its own, and starts to build the response message and send it back to Director Server. In this case, the source IP of the message is RIP, and the destination IP is CIP. Before responding to the client, Director Server will modify the source IP address to its own VIP address, and then respond to the client. In this case, the source IP of the message is VIP, and the destination IP is the implementation IP assignment of the CIP;NAT model.
DIP:192.168.177.210
VIP:192.168.157.100
On SIP1:192.168.177.211 SIP2:192.168.177.211 and real server, you only need to install httpd and start the service.
Yum install-y httpd
Echo "RS2" > / var/www/html/index.html
/ etc/init.d/httpd restart2, configuration on Director
Install ipvsadm
Yum install-y ipvsadm
Enable routing forwarding function
Echo 1 > / proc/sys/net/ipv4/ip_forward
Turn off the firewall
/ etc/init.d/iptables stop
Clear and create an ipvs server
Ipvsadm-C
Ipvsadm-A-t 192.168.177.220 80-s wrr
Add backend real server
Ipvsadm-a-t 192.168.157.100 80-r 192.168.177.211-m-w 1
Ipvsadm-a-t 192.168.157.100 80-r 192.168.177.212-m-w 2
Configuration complete
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.