Load balancing Haproxy:在点击maxconn时发送自定义http响应

Load balancing Haproxy:在点击maxconn时发送自定义http响应,load-balancing,haproxy,Load Balancing,Haproxy,如果负载平衡器点击maxconn,是否可以从Haproxy发送自定义http响应 我的目的是在服务器忙时发送一个等效的忙音(但不是503) 该关键字可用于以下配置: errorfile 503 /etc/haproxy/errors/503.http 其中503.http类似于: HTTP/1.0 503 Service Unavailable^

如果负载平衡器点击maxconn,是否可以从Haproxy发送自定义http响应

我的目的是在服务器忙时发送一个等效的忙音(但不是503)

该关键字可用于以下配置:

errorfile 503 /etc/haproxy/errors/503.http
其中503.http类似于:

HTTP/1.0 503 Service Unavailable^                                                                                      Cache-Control: no-cache
Connection: close
Content-Type: text/html

<html><body><h1>503 Service Unavailable</h1>
Sorry, no server is available to handle this request.
</body></html>
HTTP/1.0 503服务不可用^Cache控制:无缓存
连接:关闭
内容类型:text/html
503服务不可用
抱歉,没有服务器可用于处理此请求。