In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Load balancing (Cloud Load Balancer) is a service that distributes traffic to multiple CVMs. Load balancing can expand the external service capacity of the application system through traffic distribution and improve the availability of the application system by eliminating a single point of failure. The cloud load balancer service virtualizes multiple CVM resources located in the same region into a high-performance and highly available application service pool by setting virtual service addresses (VIP). Distribute the network requests from the client to the cloud server pool according to the way specified by the application. The load balancer service checks the health status of the CVM instances in the CVM pool and automatically isolates the abnormal instances, thus solving the single point problem of the CVM and improving the overall service capability of the application. Today, I will introduce the methods and steps of loading the ip_vs module manually.
Schedule CVM:
A network card:
Vmnet1:192.168.80.100
-load LVS kernel module--
LVS, which is now part of the Linux kernel, is compiled as an ip_vs module by default and can be invoked automatically if necessary. You can manually load the ip_vs module and view the version information of the ip_vs module on the current system by doing the following
[root@lss ~] # cat / proc/net/ip_vs
Cat: / proc/net/ip_vs: there is no such file or directory
[root@lss ~] # modprobe ip_vs / / load ip_vs module
[root@lss ~] # cat / proc/net/ip_vs / / View ip_vs version information
[root@lss ~] # rpm-ivh / mnt/Packages/ipvsadm-1.27-7.el7.x86_64.rpm / / install management software, no need to start
-DR mode scheduler configuration-(the scheduler is in the same network segment as each server)-
-Note: 80.188 is an address to be virtualized by the scheduler and the real servers-
[root@lss ~] # vi dr.sh
#! / bin/bash
#
Ifconfig ens33:0 192.168.80.188 broadcast 192.168.80.188 netmask 255.255.255.255 up
Route add-host 192.168.80.188 dev ens33:0
Ipvsadm-C
Ipvsadm-A-t 192.168.80.188 80-s rr
Ipvsadm-a-t 192.168.80.188purl 80-r 192.168.80.101purl 80-g
Ipvsadm-a-t 192.168.80.188purl 80-r 192.168.80.102purl 80-g
Ipvsadm-Ln
[root@lss ~] # sh dr.sh
[root@lss ~] # ifconfig
192.168.80.101 server:
Vmnet1 private network: 192.168.80.101
[root@lss01 ~] # yum install-y httpd
[root@lss01 ~] # vi / etc/httpd/conf/httpd.conf
ServerName www.aa.com
[root@lss01 ~] # vi / var/www/html/index.html
Server aa
[root@lss01 ~] # service httpd restart
-DR mode, each real server configuration-the virtual address is the same--
[root@lss01 ~] # vi web.sh
#! / bin/bash
#
Ifconfig lo:0 192.168.80.188 broadcast 192.168.80.188 netmask 255.255.255.255 up
Route add-host 192.168.80.188 dev lo:0
Echo "1" > / proc/sys/net/ipv4/conf/lo/arp_ignore
Echo "2" > / proc/sys/net/ipv4/conf/lo/arp_announce
Echo "1" > / proc/sys/net/ipv4/conf/all/arp_ignore
Echo "2" > / proc/sys/net/ipv4/conf/all/arp_announce
Sysctl-p & > / dev/null
[root@lss01 ~] # sh web.sh
[root@lss01 ~] # ifconfig
192.168.80.102 server:
Vmnet1 private network: 192.168.80.102
[root@lss02 ~] # yum install-y httpd
[root@lss02 ~] # vi / etc/httpd/conf/httpd.conf
ServerName www.bb.com
[root@lss02 ~] # vi / var/www/html/index.html
Server bb
[root@lss02 ~] # service httpd restart
-DR mode, each real server configuration-the virtual address is the same--
[root@lss02 ~] # vi web.sh
#! / bin/bash
#
Ifconfig lo:0 192.168.80.188 broadcast 192.168.80.188 netmask 255.255.255.255 up
Route add-host 192.168.80.188 dev lo:0
Echo "1" > / proc/sys/net/ipv4/conf/lo/arp_ignore
Echo "2" > / proc/sys/net/ipv4/conf/lo/arp_announce
Echo "1" > / proc/sys/net/ipv4/conf/all/arp_ignore
Echo "2" > / proc/sys/net/ipv4/conf/all/arp_announce
Sysctl-p & > / dev/null
[root@lss02 ~] # sh web.sh
Real browser test:
Vmnet1:192.168.80.88
Browser input: http://192.168.80.188/ will take turns to appear the pages of 192.168.80.101 and 192.168.80.102
If there is anything else you need to know, you can find our professional technical engineer on the official website. The technical engineer has more than ten years of experience in the industry, so it will be more detailed and professional than the editor's answer. Official website link www.yisu.com
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.