Dominic Marks wrote:
> Dominic Marks wrote:
>> Ulric Eriksson wrote:
>>>
>>> On Sun, 26 Mar 2006, Dominic Marks wrote:
>>>
>>>> Hello,
>>>>
>>>> A quick question on pen's weighting feature which I couldn't find
>>>> the answer to in the documentation. Can pen be configured with two
>>>> servers to direct requests so that the first server will always
>>>> receive requests if available and the second server used if the
>>>> primary server is down.
>>>>
>>>> I'd like to run pen in front of apache so I can restart / shut down
>>>> apache any time I like and have pen deliver any incoming requests to
>>>> a static html site being served by another lightweight httpd
>>>> (probably thttpd) with a 'down for maintainence' message.
>>>
>>> Specify an "emergency" server using the -e option.
>>>
>>> -e host:port
>>> host:port specifies the emergency server to contact
>>> if all regular servers become unavailable.
>>>
>>> So you run pen something like this:
>>>
>>> pen 80 www1:80 -e www2:80
>>>
>>> Pen will send everything to www1 until it goes down, and then it will
>>> automatically blacklist www1 and send everything to www2 instead.
>>>
>>> Ulric
>>
>> Perfect Ulric. I should have seen that. I did read the manual page,
>> obviously not very well though!
>>
>> I see that I can use the -b option to configure how long pen will wait
>> before retrying the primary server. This is exactly what I need.
>>
>> Thanks for pen :)
>
> Any clues why pen might think that 127.0.0.1 was an invalid IP address
> for the emergency option?
>
> ws# pen -Q -n -b 5 -f <external ip>:80 127.0.0.1:8890 -e 127.0.0.1:8880
> unknown or invalid address [-e]
Dom <- thick.
pen -Q -n -b 5 -e 127.0.0.1:8880 80 127.0.0.1:8890
Works fine. I should have guessed that -e in the square brackets
referred to what it thought the IP address was rather than the argument
it was rejecting. Perhaps the attached patch would be useful as it makes
things more obvious.
> 8890 is apache, 8880 is thttpd.
>
>> Dom
>
> Cheers,
> Dom
Dom
This archive was generated by hypermail 2.2.0 : Sun Mar 26 2006 - 18:11:34 CEST