Search squid archive

Re: Connect directly if parent cache fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi there,

I've been trying to do the same thing, but squid always tries too hard
on parents.

You can do this as what I do:

Have a local squid with "always_direct allow all" listening on another
port as the last entry of cache_peer with a default .

when squid tried the peers above and failed, it will fall back to the
last one which runs on the same computer, so should (suppose) always
work as long as your local network works..


On Sun, Feb 20, 2011 at 10:18 PM, Tom Tux <tomtux80@xxxxxxxxx> wrote:
> Hi
>
> Is my scenario in general possible to implement (connect directly, if
> the one and only cache_peer fails)?
>
> Thanks a lot.
> Tom
>
> 2011/2/17 Tom Tux <tomtux80@xxxxxxxxx>:
>> Hi Amos
>>
>> This doesn't work as expected. I removed the "never_direct" entry (I
>> was unsure, how "strong" it is in the configuration...) and dropped
>> also the hierarchy_stoplist-directive.
>>
>> But if the cache_peer fails, it either connects directly (if I have
>> set nonhierarchical_direct on) or the connect will fail.
>>
>> I just want to implement the behavior, that when the cache_peer fails,
>> the squid should connect directly.
>>
>> Thanks a lot for your help.
>> Tom
>>
>>
>> 2011/2/17 Amos Jeffries <squid3@xxxxxxxxxxxxx>:
>>> On 17/02/11 21:29, Tom Tux wrote:
>>>>
>>>> Hi
>>>>
>>>> I'm trying to configure Squid (3.1.9) to connect directly, if the one
>>>> and only cache_peer (parent) fails:
>>>>
>>>> cache_peer xx.xx.xx.xx parent  8080            0       no-query
>>>> no-digest default connect-fail-limit=5
>>>> prefer_direct off
>>>> never_direct allow all
>>>>
>>>>
>>>> But squid will never connect directly, even if the parent isn't
>>>> available. How can I implement this?
>>>>
>>>
>>> WTF? (sorry but you will kick yourself in a second)
>>>
>>> You have set a directive called "never_direct" to always be true/on/working
>>> and are having trouble because Squid never connects directly.
>>>
>>>
>>> So, you need to drop that never_direct entry.
>>> Also drop any hierarchy_stoplist entries.
>>>
>>> Also take a look at nonhierarchical_direct, it operates on requests like
>>> CONNECT which are best handled directly. Setting it to ON will make the peer
>>> handle those as well when its available.
>>>
>>> Amos
>>> --
>>> Please be using
>>>  Current Stable Squid 2.7.STABLE9 or 3.1.11
>>>  Beta testers wanted for 3.2.0.5
>>>
>>
>



[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux