HAProxy 前端后端不断启动和停止

HAProxy 前端后端不断启动和停止

我正在使用 HAProxy1.6.4将我的流量负载平衡到不同的服务器。现在我的 haproxy 在 docker 容器内运行。在我的配置中,我有不同的前端和后端。在我的测试中,我的前端后端工作并将流量转发到我想要的请求。

但问题是我的某些流量出现了 CONN_RESET 错误。通过查看 haproxy 日志,我发现我的前端和后端正在不断重启。日志如下所示。

local0.warn: Apr 15 12:30:36 haproxy[32715]: Stopping backend default-backend in 0 ms.
local0.warn: Apr 15 12:30:36 haproxy[32715]: Stopping backend default-backend in 0 ms.
local0.warn: Apr 15 12:30:36 haproxy[32715]: Stopping frontend http-frontend in 0 ms.
local0.warn: Apr 15 12:30:36 haproxy[32715]: Stopping frontend http-frontend in 0 ms.
local0.warn: Apr 15 12:30:36 haproxy[32715]: Stopping backend http-service-vbv7kk in 0 ms.
local0.warn: Apr 15 12:30:36 haproxy[32715]: Stopping backend http-service-vbv7kk in 0 ms.
local0.warn: Apr 15 12:30:36 haproxy[32715]: Stopping backend http-service-tsah7b in 0 ms.
local0.notice: Apr 15 12:30:37 haproxy[32720]: Proxy default-backend started.
local0.notice: Apr 15 12:30:37 haproxy[32720]: Proxy default-backend started.
local0.notice: Apr 15 12:30:37 haproxy[32720]: Proxy http-frontend started.
local0.notice: Apr 15 12:30:37 haproxy[32720]: Proxy http-frontend started.
local0.notice: Apr 15 12:30:37 haproxy[32720]: Proxy http-service-vbv7kk started.
local0.notice: Apr 15 12:30:37 haproxy[32720]: Proxy http-service-vbv7kk started.
local0.notice: Apr 15 12:30:37 haproxy[32720]: Proxy http-service-orry6w started.
local0.notice: Apr 15 12:30:37 haproxy[32720]: Proxy tcp-frontend-key-3443 started.
local0.notice: Apr 15 12:30:37 haproxy[32720]: Proxy tcp-service-bzczrg started.
local0.notice: Apr 15 12:30:37 haproxy[32720]: Proxy tcp-service-hacbno started.
local0.notice: Apr 15 12:30:37 haproxy[32720]: Proxy tcp-service-hacbno started.
local0.warn: Apr 15 12:30:37 haproxy[32719]: Stopping backend default-backend in 0 ms.
local0.warn: Apr 15 12:30:37 haproxy[32719]: Stopping backend default-backend in 0 ms.
local0.warn: Apr 15 12:30:37 haproxy[32719]: Stopping frontend http-frontend in 0 ms.
local0.warn: Apr 15 12:30:37 haproxy[32719]: Stopping frontend http-frontend in 0 ms.
local0.warn: Apr 15 12:30:37 haproxy[32719]: Stopping backend http-service-tsah7b in 0 ms.
local0.warn: Apr 15 12:30:37 haproxy[32719]: Stopping backend http-service-tsah7b in 0 ms

我所用的最简单的配置是

现在我的问题是,我遗漏了什么?为什么我的连接被重置以及为什么要重新启动?

相关内容