健康检查该用TCP_CHECK

pull/10/head
Jimmy Song 2017-05-09 13:38:45 +08:00
parent 4df57c7e3a
commit d15d18f65b
1 changed files with 7 additions and 25 deletions

View File

@ -103,38 +103,20 @@ virtual_server 172.20.0.119 80{
real_server 172.20.0.113 80{ real_server 172.20.0.113 80{
weight 1 weight 1
HTTP_GET { TCP_CHECK {
url { connect_timeout 3
path /
status 200
}
connect_timeout 3
nb_get_retry 3
delay_before_retry 3
} }
} }
real_server 172.20.0.114 80{ real_server 172.20.0.114 80{
weight 1 weight 1
HTTP_GET { TCP_CHECK {
url { connect_timeout 3
path /
status 200
}
connect_timeout 3
nb_get_retry 3
delay_before_retry 3
} }
} }
real_server 172.20.0.115 80{ real_server 172.20.0.115 80{
weight 1 weight 1
HTTP_GET { TCP_CHECK {
url { connect_timeout 3
path /
status 200
}
connect_timeout 3
nb_get_retry 3
delay_before_retry 3
} }
} }
} }
@ -144,7 +126,7 @@ virtual_server 172.20.0.119 80{
将以上配置分别拷贝到另外两台node的`/etc/keepalived`目录下。 将以上配置分别拷贝到另外两台node的`/etc/keepalived`目录下。
我们使用转发效率最高的`lb_kind DR`直接路由方式转发。 我们使用转发效率最高的`lb_kind DR`直接路由方式转发使用TCP_CHECK来检测real_server的health
**启动keepalived** **启动keepalived**