大网数据广告活动
服务器运维问答

explanation of haproxy stats backend limit

· 52CE 我爱测

The relevant part of my /etc/haproxy/haproxy.cfg is: global maxconn 30000 ... defaults ... frontend frontend_for_all_sites maxconn 22000 mode http bind *:80 acl acl_hostname_www hdr_dom(host) www.example.com acl acl_hostname_stat…

问题原文

原帖链接 · cherouvim · CC BY-SA 3.0

The relevant part of my /etc/haproxy/haproxy.cfg is:

global
    maxconn 30000
    ...

defaults
    ...

frontend frontend_for_all_sites
    maxconn 22000
    mode http
    bind *:80

    acl acl_hostname_www hdr_dom(host)    www.example.com
    acl acl_hostname_static hdr_dom(host) static.example.com
    use_backend www_backend      if acl_hostname_www
    use_backend static_backend   if acl_hostname_static

backend www_backend
    server www 127.0.0.1:9090 maxconn 500

backend static_backend
    server s 127.0.0.1:8080 maxconn 5000

So, I have 2 backends with only 1 backend each, without load balancing, but just proxying requests to different backends based on the request's hostname.

On the www backend I've set maxconn 500 and on the static backend I've set it to 5000.

The stats page now looks like this:

My question is what does the "Backend Limit" of 2200 for both backends represent? I understand that this value is 10% of the 22000 maxxconn on frontend_for_all_sites. Does this 2200 mean that the maximum amount of connections that the backends will process is 2200 and above that haproxy will return a 503?

已采纳解答

原帖链接 · nuster cache server · CC BY-SA 3.0

My question is what does the "Backend Limit" of 2200 for both backends represent? I understand that this value is 10% of the 22000 maxxconn on frontend_for_all_sites.

2200 in Backend Limit is the value of fullconn which is by default 10% of maxconn of frontend.

Does this 2200 mean that the maximum amount of connections that the backends will process is 2200 and above that haproxy will return a 503?

No, the maximum amount of connections is sum of maxconn

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2018-04-12)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。