more than one haproxy instance on one host/IP
Hi, one of our haproxy environments needs to deal with frequent config changes that force us to add or remove proxies quite often, however at the same time we can't disturb already running proxies. We are addressing this problem by running more than one haproxy process on one and the same host/IP, adding new proxies to a new haproxy instance and then moving them on to the main haproxy instance during a following maintenance window. We are doing this by using separate configuration files, a separate set of init.d start/stop scripts, separate monit configuration, different admin ports, etc. and it seems to run fine so far. Before moving this solution to our production environment I thought I'll double check if there is any known issue that should keep us away from doing it in this way. I already searched around and didn't find anything that tells me to not do it, but on the other hand I didn't find any hints about doing it this way either, hence my question on this list. Thanks and with kind regards A. -- Si forte in alienas manus oberraverit hec peregrina epistola incertis ventis dimissa, sed Deo commendata, precamur ut ei reddatur cui soli destinata, nec preripiat quisquam non sibi parata.
Re: more than one haproxy instance on one host/IP
Depending on your setup, you could do a hot-reconfig: http://sysbible.org/2008/07/26/haproxy-hot-reconfiguration/ http://www.mgoff.in/2010/04/18/haproxy-reloading-your-config-with-minimal-service-impact/ On Mon, Jul 11, 2011 at 7:38 AM, Alexander Hollerith alex.holler...@gmail.com wrote: Hi, one of our haproxy environments needs to deal with frequent config changes that force us to add or remove proxies quite often, however at the same time we can't disturb already running proxies. We are addressing this problem by running more than one haproxy process on one and the same host/IP, adding new proxies to a new haproxy instance and then moving them on to the main haproxy instance during a following maintenance window. We are doing this by using separate configuration files, a separate set of init.d start/stop scripts, separate monit configuration, different admin ports, etc. and it seems to run fine so far. Before moving this solution to our production environment I thought I'll double check if there is any known issue that should keep us away from doing it in this way. I already searched around and didn't find anything that tells me to not do it, but on the other hand I didn't find any hints about doing it this way either, hence my question on this list. Thanks and with kind regards A. -- Si forte in alienas manus oberraverit hec peregrina epistola incertis ventis dimissa, sed Deo commendata, precamur ut ei reddatur cui soli destinata, nec preripiat quisquam non sibi parata. -- Fahd Sultan | Director, IT Infrastructure Brilig - Powering Free Market Advertising™ fsul...@brilig.com | +1.347.878.5826
Re: more than one haproxy instance on one host/IP
On Mon, Jul 11, 2011 at 2:18 PM, Alexander Hollerith alex.holler...@gmail.com wrote: Thank you very much for pointing me into that direction. I think that definitely answers my question. Since haproxy itself might keep more than one process alive after dealing with an -sf (at least for as long as it takes to finish the work) I assume that keeping alive more than one process, in principle, can't be a problem :) Another FYI, the included init script does this on automatically reload, and prefaces it with a config check to prevent killing the process altogether. -jim
Re: more than one haproxy instance on one host/IP
On 7/11/11 11:22 AM, James Bardin wrote: On Mon, Jul 11, 2011 at 2:18 PM, Alexander Hollerith alex.holler...@gmail.com wrote: Thank you very much for pointing me into that direction. I think that definitely answers my question. Since haproxy itself might keep more than one process alive after dealing with an -sf (at least for as long as it takes to finish the work) I assume that keeping alive more than one process, in principle, can't be a problem :) Another FYI, the included init script does this on automatically reload, and prefaces it with a config check to prevent killing the process altogether. -jim AFAIK, if there are config problems haproxy won't start a new process but it also won't kill the old one when using -sf.