keepalived.conf样板(vrrp)

1953阅读 0评论2008-11-24 comcn2
分类:

! Configuration File for keepalived
global_defs {
   notification_email {
    
    
    
   }
   notification_email_from
   smtp_server 192.168.200.1
   smtp_connect_timeout 30
   router_id LVS_DEVEL
}
vrrp_instance VI_1 {
    state BACKCUP
    interface eth0
    virtual_router_id 51
    priority 199
    advert_int 1
    authentication {
        auth_type PASS
        auth_pass 1111
    }
    virtual_ipaddress {
       1.1.1.1
    }
}
 
   
virtual_server 1.1.1.1 8090 {
    delay_loop 6                  #(每隔10秒查询realserver状态)
    lb_algo wrr                  #(lvs 算法)
    lb_kind DR                   #(Direct Route)
    real_server 1.1.1.2 8090 {
        weight 3               #(权重)
        TCP_CHECK {
        connect_timeout 10       #(10秒无响应超时)
        nb_get_retry 3
        delay_before_retry 3
        connect_port 80
        }
    }
    real_server 1.1.1.3 8090 {
        weight 3
        TCP_CHECK {
        connect_timeout 10
        nb_get_retry 3
        delay_before_retry 3
        connect_port 80
        }
     }
}
上一篇:LVS DR配置实例
下一篇:Linux的网络配置文件