Keepalived+lvs for scheduling, high availability, high performance clustering

Source: Internet
Author: User

6, Keepalived+lvs implementation of scheduling, high availability, high-performance cluster


650) this.width=650; "src=" Http://note.youdao.com/yws/res/21139/5A90D062140744BA99DD87E647440CF4 "alt=" Qq20150728172032.png "/>



The role of keepalived is:

detects the status of the Web server, and if a Web server freezes or fails, keepalived detects and rejects the failed Web server from the system. When the Web server is working properly, Keepalived automatically joins the Web server to the server farm, all of which are automatically completed without human intervention and need to be done manually to repair the failed Web server



(1) Installation keepalived

#./configure--prefix=/usr/local/keepalived--enable-snmp--enable-profile--with-kernel-version=2.6--sysconfdir=/ etc

# make && make install



(2) configuration keepalived
# cd/etc/keepalived
# Vim Keepalived.conf
Global_defs {
Notification_email {
[Email protected]
}
Notification_email_from [email protected]
Smtp_server 127.0.0.1
Smtp_connect_timeout 30
router_id LVS-S1
}

Vrrp_instance Vi_1 {
State MASTER
Interface eth0
VIRTUAL_ROUTER_ID 30
Priority 100
Advert_int 1
Authentication {
Auth_type PASS
Auth_pass AIXOCM
}
virtual_ipaddress {
172.16.10.10/24 Dev eth0
}
}

Virtual_server 172.16.10.10 80 {
Delay_loop 3
Lb_algo WRR
Lb_kind DR
Nat_mask 255.255.255.0
Persistence_timeout 60
Protocol TCP

Real_server 172.16.20.20 80 {
Weight 2
Tcp_check {
Connect_timeout 3
Nb_get_retry 3
Delay_before_retry 3
Connect_port 80
}
}

Real_server 172.16.20.30 80 {
Weight 3
Tcp_check {
Connect_timeout 3
Nb_get_retry 3
Delay_before_retry 3
Connect_port 80
}
}
}

# vim/etc/sysconfig/keepalived
keepalived_options= "-d-f/etc/keepalived/keepalived.conf"



This article is from the "Zhanglulu" blog, make sure to keep this source http://zhanglulu913.blog.51cto.com/10592685/1688962

Keepalived+lvs for scheduling, high availability, high performance clustering

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.