keepalive 配置文件说明

! Configuration File for keepalived global_defs {    notification_email {   定义接受邮件的邮箱      acassen@firewall.loc      failover@firewall.loc                           sysadmin@firewall.loc    }    notification_email_from Alexandre.Cassen@firewall.loc  定义发送邮件的邮箱    smtp_server 192.168.200.1    smtp_connect_timeout 30    router_id LVS_MASTER   lvs服务器标识符 } vrrp_instance LVSMASTER { lvs实例标识     state MASTER          服务器状态     interface eth0        监控的端口     virtual_router_id 51  虚拟路由标识,一组lvs的虚拟路由标识必须相同,这样才能切换     priority 100          lvs服务启动优先级,值越大,优先级越高,BACKUP 不能大于MASTER     advert_int 2          lvs服务器之间的存活检查时间2s     authentication {         auth_type PASS    认证类型         auth_pass hylanda 认证密码,一组lvs 服务器的认证密码必须一致     }     virtual_ipaddress {         192.168.0.138     虚拟ip或服务ip     } } virtual_server 192.168.0.138 80 { 虚拟服务运行方式定义     delay_loop 5          检查realserver存活的间隔时间     lb_algo rr            负载均衡算法     lb_kind DR            请求转发方式     persistence_timeout 50  链接保持时间     protocol TCP     real_server 192.168.0.132 80 { 真实服务器定义         weight 1          负载参数         TCP_CKECK {             connect_timeout 10  链接超时时间             nb_get_retry 3      重试链接的次数             delay_before_reitry 3  每次链接间隔             connect_port 80     端口         }     }     real_server 192.168.0.133 80 {         weight 1         TCP_CHECK {             connect_timeout 3             nb_get_retry 3             delay_before_retry 3             connect_port 80         }     } }
相关文章
相关标签/搜索