If I understand correctly, that sends a redirect request back to the client?
We need this for RPCs, so that won't really work.

On Mon, Aug 23, 2010 at 3:50 PM, Jerry Champlin <
[email protected]> wrote:

> Dustin:
>
> It's a little more elaborate and potentially dangerous than I was thinking,
> but this link illustrates a way to do what I think you are after.
> http://www.formilux.org/archives/haproxy/0906/2144.html
>
> The solution from Maciej Bogucki is pasted below for ease:
>
> frontend fr1
>
>       default_backend back_1
>       rspirep         ^HTTP/...\ [23]0..* \0\nSet-Cookie:\
> cookiexxx=0;path=/;domain=.yourdomain.com
>       rspirep         ^(HTTP/...)\ 5[0-9][0-9].* \1\ 202\ Again\
>
> Please\nSet-Cookie:\
> cookiexxx=1;path=/;domain=.yourdomain.com\nRefresh:\ 6\nContent-Length:\
> Lenght_xxx\nContent-Type:\ text/html\n\n<FRAMESET\ cols="100%"><FRAME\ src="
> http://www.yourdomain.com/redispatch.pl";>
>
> backend back_1
>
>        cookie          cookiexxx
>        server chk1 127.0.0.1:81 weight 1 check
>        server chk2 127.0.0.1:82 weight 1 check
>        server chk3 127.0.0.1:83 weight 1 check cookie 1 backup
>
> -Jerry
>
> Jerry Champlin
> Absolute Performance Inc.
> --
> Enabling businesses to deliver critical applications at lower cost and
> higher value to their customers.
>
>
> On Mon, Aug 23, 2010 at 2:13 PM, Dustin Moskovitz <[email protected]>wrote:
>
>> Hey Jerry, can you elaborate?
>>
>> To be clear what happens is:
>> 1/ proxy receives requests
>> 2/ proxy sends request to webserver
>> 3/ webserver sends 502 response to proxy
>> 4/ proxy forwards 502 response to the end user
>>
>> I do have other webservers that I want to re-dispatch the request to - is
>> that what you mean by backup servers? In any case, it seems like the proxy
>> must be the one responsible for handling the failure.
>>
>>
>> On Fri, Aug 20, 2010 at 12:08 PM, Jerry Champlin <
>> [email protected]> wrote:
>>
>>> It seems like you could configure backup servers within the pool to
>>> accomplish this although it's not quite as clean as what I suspect you are
>>> looking for.
>>>
>>> -Jerry
>>>
>>> Jerry Champlin
>>> Absolute Performance Inc.
>>> --
>>> Enabling businesses to deliver critical applications at lower cost and
>>> higher value to their customers.
>>>
>>>
>>>
>>> On Fri, Aug 20, 2010 at 12:54 PM, Dustin Moskovitz <[email protected]>wrote:
>>>
>>>> Hi all,
>>>> We run haproxy in front of a bank of nginx servers, which each proxy
>>>> requests to a custom web server on the same box.
>>>>
>>>> I was wondering if it is possible to configure haproxy such that it will
>>>> redispatch requests that receive a 502 from nginx to a new server. I looked
>>>> through the docs but could not find anything that seemed relevant.
>>>>
>>>> Dustin
>>>>
>>>
>>>
>>
>

Reply via email to