三、LVS高可用搭建

LVS备机搭建

global_defs {                      

#  notification_email {            

#       [email protected]

#   }

#  notification_email_from [email protected]

#   smtp_serversmtp.exmail.qq.com

#  smtp_connect_timeout 30

router_idLVS_DEVEL            

}

vrrp_instance VI_1 {           

state BACKUP            

interface eth0            

virtual_router_id51       

priority 99                 

advert_int 1          

authentication{       

    auth_type PASS

    auth_pass 1111

}

virtual_ipaddress{        

    192.168.200.201

}

}

virtual_server 192.168.200.201 80 {

delay_loop 6          

lb_algo wrr           

lb_kind DR                         

nat_mask255.255.255.0  

persistence_timeout0   

protocol TCP                         

real_server192.168.200.139 80 {    

    weight 3                            

    TCP_CHECK {                    

        connect_timeout10  

        nb_get_retry3

        delay_before_retry3

        connect_port80

    }

}

real_server192.168.200.140 80 {

    weight 3

    TCP_CHECK {

        connect_timeout10

        nb_get_retry3

        delay_before_retry3

        connect_port80

    }

}

}

你可能感兴趣的:(高并发系统解决套路杂谈)