Re: Avoid 503 during failover to backup?

From: Willy Tarreau <w#1wt.eu>
Date: Wed, 3 Dec 2008 19:52:02 +0100


Hi Alexander,

On Wed, Dec 03, 2008 at 07:20:36PM +0100, Alexander Staubo wrote:
> On Wed, Dec 3, 2008 at 4:32 PM, Willy Tarreau <w#1wt.eu> wrote:
> >> Indeed, "emergency redispatch to backups" is one of my
> >> yet-unfinished-patches I'm going to clean and publish, eventually.
> >
> > I honnestly find this behaviour *very* dangerous and undesirable. Quite
> > honnestly, haproxy is most often used with stickyness, and prematurely
> > switching to another server is one of the worst things to do. If you
> > need to load-balance stateless static servers, why not use LVS instead ?
> > Maybe I'm missing some use cases, but it's a general feeling of doing
> > the wrong thing.
>
> Willy, I would not be too sure about that. We don't use stickiness,
> since our backends are interchangable and stateless; and neither do
> any of the other companies we have talked to that have deployed
> HAProxy.
>
> Web applications (Rails or Merb or otherwise) tend to be stateless,
> and HAProxy can be used as a generic L7 load-balancer and a cheap,
> capable alternative to expensive hardware L7 load-balancers such as
> BigIP. As others have pointed out, while LVS works, it is at a
> different level of feature-completeness and complexity that makes it
> undesirable for many applications.
>
> I sincerely hope that this strange preoccupation with stickiness is
> not something that will negatively impact HAProxy's future development
> for us "non-stickies".

No, don't worry about that, I understand your concerns ;-)

I just want not to break fundamental needs of stickiness by implementing quick features for "non-stickies". It's easy to overlook a problem when thinking non-sticky, and it's hard to find a solution for everyone. I prefer to spend time exchanging on the real issues and their possible solutions than to quickly merge code and have to maintain the feature indefinitely when it causes trouble.

For instance, almost nobody uses the "dispatch" keyword. At least, that's what I thought before seeing it about 300 times in a config a few months ago. And believe me, it crappifies the code a lot. If you wonder where all of these "if (s->srv)" come from, they're all for the "dispatch" mode.

As for the features for non-sticky users, they're still progressing very well.

My work currently consists in separating lower from higher layers so that we can more easily implement L7 features such as ACL on the response, SSL, keep-alive, etc... All of which are not sticky-dependant. Another part consists in making the product scale even higher. I already have users who need it to reach 10 Gbps, and this currently requires several awful and expensive architectural tricks which could be avoided with a few clever L4 features.

So you can sleep peacefully, you "non-stickies" are not at all taken as the low-end ;-)

Regards,
Willy Received on 2008/12/03 19:52

This archive was generated by hypermail 2.2.0 : 2008/12/03 20:01 CET