1 实验环境
2 首先node1,node2配置成双主,实现二个虚拟地址172.16.28.6;172.16.28.4飘移,配置过程同上一个实验
3 配置node1,node2的ipvs
virtual_server 172.16.28.6 80 {
delay_loop 6
lb_algo rr
lb_kind DR
protocol TCP
real_server 172.16.28.30 80 {
weight 1
HTTP_GET {
url {
path /
status_code 200
}
connect_timeout 3
nb_get_retry 3
delay_before_retry 3
}
}
real_server 172.16.28.31 80 {
weight 1
HTTP_GET {
url {
path /
status_code 200
}
connect_timeout 3
nb_get_retry 3
delay_before_retry 3
}
}
}
virtual_server 172.16.28.4 80 {
delay_loop 6
lb_algo rr
lb_kind DR
protocol TCP
real_server 172.16.28.30 80 {
weight 1
HTTP_GET {
url {
path /
status_code 200
}
connect_timeout 3
nb_get_retry 3
delay_before_retry 3
}
}
real_server 172.16.28.31 80 {
weight 1
HTTP_GET {
url {
path /
status_code 200
}
connect_timeout 3
nb_get_retry 3
delay_before_retry 3
}
}
}
4 分别对虚拟地址172.16.28.6; 172.16.28.4访问测试
网友评论