lvs UDP端口负载均衡配置


! Configuration File for keepalived

global_defs {
notification_email {
test@163.com
}
notification_email_from test@163.com
smtp_server 127.0.0.1
smtp_connect_timeout 30
# LVS+Keepalived-B上更改为MHA-B
router_id MHA-A
}
vrrp_instance VI_1 {
# LVS+Keepalived-B上更改为BACKUP
state MASTER
interface eth0
virtual_router_id 51
# LVS+Keepalived-B上更改为100
priority 150
advert_int 5
authentication {
auth_type PASS
auth_pass 123456
}
virtual_ipaddress {
10.0.0.163/24
}
}

virtual_server 10.0.0.163 9997 {
delay_loop 6
lb_algo rr
lb_kind DR
nat_mask 255.255.255.0
persistence_timeout 500
protocol UDP
real_server 10.0.0.221 9997 {
weight 1
# TCP_CHECK {
# connect_port 9997
# connect_timeout 5
# nb_get_retry 3
# delay_before_retry 3
# }
}
real_server 10.0.0.223 9997 {
weight 1
#TCP_CHECK {
# connect_port 9997
# connect_timeout 5
# nb_get_retry 3
# delay_before_retry 3
#}
}
}


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM