On Mon 16.06.2008 23:53, Aleksandar Lazic wrote:
> On Mon 16.06.2008 23:47, Alexander Staubo wrote:
>> On Mon, Jun 16, 2008 at 11:22 PM, Aleksandar Lazic <al-haproxy#none.at>
>> wrote:
>>> Maybe this can help you ;-)
>>>
>>> http://haproxy.1wt.eu/download/1.3/doc/architecture.txt
>>>
>>> 4. Soft-stop for application maintenance
>>> 4.1 Soft-stop using a file on the servers
>>
>> Thanks -- that's an interesting approach, although it only gets me
>> halfway there.
>>
>> If all backends are down, HAProxy will attempt to connect for a while
>> and then give up and response with a 503. But there's no way, as far as
>> I can tell, to have HAProxy distinguish between a "bad" 503 and a
>> "good" 503; in the latter case I want to display a descriptive page
>> rather than an error.
>>
>> Of course, we could modify the application to check for maintenance
>> mode and return the appropriate page, but I would have to find a
>> low-overhead way of doing that. I can't have every single request
>> checking a file.
>
> I think for this you will like backup option:
>
> http://haproxy.1wt.eu/download/1.3/doc/haproxy-en.txt
>
> ###
> 3.1) Server monitoring
> .
> .
> .
> Since version 1.1.17, it is possible to specify backup servers. These
> servers are only sollicited when no other server is available. This may
> only be useful to serve a maintenance page, or define one active and one
> backup server (seldom used in TCP mode). To make a server a backup one,
> simply add the 'backup' option on its line. These servers also support
> cookies, so if a cookie is specified for a backup server, clients
> assigned to this server will stick to it even when the other ones come
> back. Conversely, if no cookie is assigned to such a server, the clients
> will get their cookies removed (empty cookie = removal), and will be
> balanced against other servers once they come back. Please note that
> there is no load-balancing among backup servers by default. If there are
> several backup servers, the second one will only be used when the first
> one dies, and so on. To force load-balancing between backup servers,
> specify the 'allbackups' option.
> .
> .
> .
> ###
>
> and maybe
>
> ###
> 4.6) Customizing errors
> 4.6.1) Relocation
> .
> .
> errorloc 503 http://192.168.114.58/error50x.html
> .
> .
.
errorfile 503 /etc/haproxy/errorfiles/503sorry.http
.
.
> ###
>
> just as an idea.
>
> Hth
>
> Aleks
Received on 2008/06/16 23:55
This archive was generated by hypermail 2.2.0 : 2008/06/17 00:00 CEST