小编Le *_*ude的帖子

HAproxy 503 Service Unavailable 没有可用的服务器来处理这个请求

我是这种负载平衡方案的新手,我的任务是弄清楚如何使这种负载平衡起作用。

我的环境:

Centos 6.4 64 Bit
Webserver: Lighttpd
All running in ESXI
virtual IP: 192.168.1.6
LB1: 192.168.1.4
LB2: 192.168.1.5
Webserver 1: 192.168.1.12
Webserver 2: 192.168.1.13
Gateway: 192.168.1.1
Run Code Online (Sandbox Code Playgroud)

尝试在使用 HAproxy 和 keepalived 生产之前在实验室中运行测试。这是我的 keepalived 设置:

!keepalived的配置文件

global_defs {
   notification_email {
     myemail@gmail.com
   }
   notification_email_from keepalived@domain.local
   smtp_server 192.168.1.4
   smtp_connect_timeout 30
   router_id 192.168.1.1
}

vrrp_script chk_haproxy {
script "killall -0 haproxy"
interval 1                     # check every second
weight 2                       # add 2 points of prio if OK
}

vrrp_instance VI_1 {
    state MASTER
    interface …
Run Code Online (Sandbox Code Playgroud)

load-balancing lighttpd haproxy keepalived centos6.4

9
推荐指数
2
解决办法
10万
查看次数