Re: newbie question

From: Willy Tarreau <w#1wt.eu>
Date: Tue, 20 Apr 2010 23:45:49 +0200


On Tue, Apr 20, 2010 at 11:31:02PM +0200, Michiel van Es wrote:
> >>listen load_balanced :80
> >>mode http
> >> option httpclose
> >> balance roundrobin# Load Balancing algorithm
> >> option forwardfor # This sets X-Forwarded-For
> >> server server1 194.145.200.17
> >> server server2 194.145.200.171
> >
> >none of your servers are checked (neither here nor in any other section).
> >You should add "check" on each "server" line for that.
>
> Shall I enable check on every server entry for every 'service' entry?

If you think that any of your service may individually fail, yes you should. For instance, the SMTP service might die without the HTTP service being affected. However, if some services are provided by a same daemon which cannot "half-fail" (eg: pop/imap), then you can enable server tracking. The principle is that only one of the service does the checks, and the other one says "track xxx/yyy" instead of "check", where "xxx" is the other instance name (the "listen" section in your case) and "yyy" the server name. That way, the tracking server will always be in the same state as the tracked server, and both will be up or down simultaneously.

Willy Received on 2010/04/20 23:45

This archive was generated by hypermail 2.2.0 : 2010/04/21 00:00 CEST