五折优惠 所有套餐限时优惠,起价 $2.48/mo
HAProxy

HAProxy

HAProxy 是高性能的 TCP 与 HTTP 负载均衡器。经百万 RPS 工作负载验证,被 GitHub、Reddit、Stack Overflow 和 Twitter 广泛使用。当 NGINX 或 AWS ALB 的速度或功能不足时,它是首选的负载均衡方案。提供免费社区版和付费企业版。

版本

最新

操作系统

Ubuntu Server 24.04 LTS

最小 RAM

1 GB

IP 类型

IPV4,IPV6

版本检查

haproxy -v

重要文件与目录

  • 配置文件: /etc/haproxy/haproxy.cfg
  • 二进制: /usr/sbin/haproxy

服务管理

启动 HAProxy:

systemctl start haproxy

配置变更后重启:

systemctl restart haproxy

检查状态:

systemctl status haproxy

查看实时日志:

journalctl -u haproxy -f

配置

编辑配置

vim /etc/haproxy/haproxy.cfg

验证配置:

haproxy -c -f /etc/haproxy/haproxy.cfg

变更后重启:

systemctl restart haproxy

笔记

  • HAProxy 已安装,但未自动完成配置
  • 确保 /etc/haproxy/haproxy.cfg 请在使用前确认已正确设置
  • 每次变更后都需要重启服务
  • 默认配置为空,服务将无法正常运行

立即部署 HAProxy。 从 $2.48/月 起