Use one backend server at a time

2014-01-30 Thread Ryan O'Hara
I'd like to define a proxy (tcp mode) that has multiple backend servers yet only uses one at a time. In other words, traffic comes into the frontend and is redirected to one backend server. Should that server fail, another is chosen. I realize this might be an odd thing to do with haproxy, and if

Re: Use one backend server at a time

2014-01-30 Thread PiBa-NL
Im not 100% sure but if i remember something i read correctly it was like using a "stick on dst" stick-table. That way the sticktable will make sure all traffic go's to a single server, and only when it fails another server will be put in the sticktable that will only have 1 entry. You might

Re: Use one backend server at a time

2014-01-30 Thread PiBa-NL
ok found it again in the part about "Automatic failover without failback" http://blog.exceliance.fr/2014/01/17/emulating-activepassing-application-clustering-with-haproxy/ PiBa-NL schreef op 30-1-2014 19:14: Im not 100% sure but if i remember something i read correctly it was like using a "stick

Re: Use one backend server at a time

2014-01-30 Thread Ryan O'Hara
On Thu, Jan 30, 2014 at 07:14:30PM +0100, PiBa-NL wrote: > Im not 100% sure but if i remember something i read correctly it was > like using a "stick on dst" stick-table. > > That way the sticktable will make sure all traffic go's to a single > server, and only when it fails another server will be

Re: Use one backend server at a time

2014-01-30 Thread PiBa-NL
This should (i expect) work with any number of backup servers, as long as you only need 1 active. Ryan O'Hara schreef op 30-1-2014 19:34: On Thu, Jan 30, 2014 at 07:14:30PM +0100, PiBa-NL wrote: Im not 100% sure but if i remember something i read correctly it was like using a "stick on dst" st

Re: Use one backend server at a time

2014-01-30 Thread Ryan O'Hara
On Thu, Jan 30, 2014 at 07:39:29PM +0100, PiBa-NL wrote: > This should (i expect) work with any number of backup servers, as > long as you only need 1 active. Yes, it appears this is exactly what I want. A quick test shows that once failback is still occurring. Not sure why. Once my primary fails,

Re: Use one backend server at a time

2014-01-30 Thread Ryan O'Hara
On Thu, Jan 30, 2014 at 08:03:37PM +0100, PiBa-NL wrote: > can you doublecheck the sticktable fills properly with the socket > commands, and you are running with "nbproc 1" ? It appears that 1.4 does support 'show table' via the stats socket. Yes, nbproc is 1. > can you post the (anonimized) conf

Re: Use one backend server at a time

2014-01-30 Thread Willy Tarreau
On Thu, Jan 30, 2014 at 03:57:56PM -0600, Ryan O'Hara wrote: > On Thu, Jan 30, 2014 at 08:03:37PM +0100, PiBa-NL wrote: > > can you doublecheck the sticktable fills properly with the socket > > commands, and you are running with "nbproc 1" ? > > It appears that 1.4 does support 'show table' via th

Re: Use one backend server at a time

2014-01-31 Thread Ryan O'Hara
On Fri, Jan 31, 2014 at 08:39:46AM +0100, Willy Tarreau wrote: > On Thu, Jan 30, 2014 at 03:57:56PM -0600, Ryan O'Hara wrote: > > On Thu, Jan 30, 2014 at 08:03:37PM +0100, PiBa-NL wrote: > > > can you doublecheck the sticktable fills properly with the socket > > > commands, and you are running with

Re: Use one backend server at a time

2014-01-31 Thread Willy Tarreau
On Fri, Jan 31, 2014 at 09:22:23AM -0600, Ryan O'Hara wrote: > On Fri, Jan 31, 2014 at 08:39:46AM +0100, Willy Tarreau wrote: > > On Thu, Jan 30, 2014 at 03:57:56PM -0600, Ryan O'Hara wrote: > > > On Thu, Jan 30, 2014 at 08:03:37PM +0100, PiBa-NL wrote: > > > > can you doublecheck the sticktable fi

Re: Use one backend server at a time

2014-01-31 Thread Ryan O'Hara
On Fri, Jan 31, 2014 at 04:32:45PM +0100, Willy Tarreau wrote: > On Fri, Jan 31, 2014 at 09:22:23AM -0600, Ryan O'Hara wrote: > > On Fri, Jan 31, 2014 at 08:39:46AM +0100, Willy Tarreau wrote: > > > On Thu, Jan 30, 2014 at 03:57:56PM -0600, Ryan O'Hara wrote: > > > > On Thu, Jan 30, 2014 at 08:03:3