Wener Notes

HAProxy FAQ

约 1 分钟阅读
标签:FAQ

Memory Usage

  • e.g.
    • 16 kB buffers
    • 34 kB/session
    • 30000 sessions/GB
    • 20000 sessions/GB - 考虑系统也会需要内存

perf debug

bash
sysctl net.ipv4.ip_local_port_range
text
net.core.wmem_max
net.core.rmem_max
net.ipv4.tcp_rmem
net.ipv4.tcp_wmem
  • nbproc $(nproc)

req_ssl_sni vs ssl_fc_sni

text
use_backend s1 if { ssl_fc_sni my.domain.org }
use_backend s2 if { hdr(host) -i my2.domain.org }

TLS handshake, Client hello 后无响应

在 AlpineLinux 3.14 上,Host 内运行 HAProxy,使用 SNI Passthrough 出现该问题,修改为在容器内运行后问题解决。 在容器内使用完全相同的 HAProxy 版本也没有问题,一次断定是 Host 环境的问题。

可能的原因

  • 系统依赖升级后未重启

HAProxy exit code 143

  • SIGTERM

cannot parse Content-Length: too long int

Cannot raise FD limit to 20637, limit is 4096.

ERR_HTTP2_SERVER_REFUSED_STREAM

h3

Whitelist

text
acl white_list src 192.168.1.0/24 192.168.10.0/24
tcp-request content accept if white_list
tcp-request content reject

关联信息

反向链接、本文链接的其他页面和外部资料。

References

GitHub3 条
其他外链3 条
最近更新commit 1866667Edit

On this page