Chinaunix首页 | 论坛 | 博客
  • 博客访问: 77858
  • 博文数量: 20
  • 博客积分: 257
  • 博客等级: 二等列兵
  • 技术积分: 150
  • 用 户 组: 普通用户
  • 注册时间: 2010-11-22 17:29
个人简介

文章分类

全部博文(20)

分类: LINUX

2013-01-25 14:59:23

When you make adjustments to the haproxy configuration file (haproxy.cfg), you need to restart the load balancer before the new configurations take effect. For a high traffic site, this is a painful process – any downtime is noticable by the users. There is a way to reload the config file gracefully, without causing interruption to users – but this is hidden in the great txt based documentation for haproxy. For your delight, here it is:

# haproxy -f /etc/haproxy.cfg -p /var/run/haproxy.pid -sf $(cat /var/run/haproxy.pid)

All you need to do, is make sure you pass in the correct location for the haproxy configuration file, and the pid.


   -sf specifies a list of pids to send a FINISH signal to after startup.

阅读(2627) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~