磅+清漆+阿帕奇 - 磅挂

时间:2017-05-26 01:57:23

标签: apache proxy reverse-proxy varnish pound

我的当前配置存在问题。

我试图在上线之前对我的平台进行压力测试,我发现了一些非常令人担忧的事情。

Pound conf:

User "pound"
Group "pound"
Control "/var/lib/pound/pound.cfg"
#TimeOut     150
LogLevel 3
LogFacility local1
ListenHTTP
    Address 0.0.0.0
    Port    80
    xHTTP    0
    Service
        BackEnd
            Address 127.0.0.1
            Port    9080
        End
    End
End
ListenHTTPS
    HeadRemove "X-Forwarded-Proto"
    AddHeader "X-Forwarded-Proto: https"
    Address 0.0.0.0
    Port    443
    Cert    "/etc/httpd/ssl/pound.pem"
    xHTTP       0
    Service
        BackEnd
            Address 127.0.0.1
            Port    9443
        End
    End
End

清漆conf:

backend default {
  .host = "127.0.0.1";
  .port = "8080";
}

backend default_ssl {
  .host = "127.0.0.1";
  .port = "8443";
}

然后Apache监听8080和8443。

问题是在20 RPS之后,我的磅挂了(顶部显示没有任何问题),如果我直接访问ip:8080以及ip:9080我可以获得页面意味着Varnish和Apache都很好

一旦我杀了我的压力测试机器,页面加载。

我发现的唯一相关日志是xx SessionClose c timeout在Varnishlog中随处可见。

我试图使用Google Cloud HTTP / HTTPS负载均衡器来摆脱这一点,但还没有成功地使用HTTPS。

1 个答案:

答案 0 :(得分:0)

如果找到了罪魁祸首!

Threads xxx(默认128)

我把它设置为4096,没有问题了。