Re: [squid-users] multiple instances peering

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Thu, 27 Oct 2011 19:32:36 +1300

On 26/10/11 23:48, jiluspo wrote:
> This is the first pair, on every peer line will be commeted
> All ip are 127.0.0.1 only named in host file.
> I need the squid instance to query simultaneously to other siblings to avoid
> duplications.
> Squid2head
>
> #cache_peer cache00 multicast 90 30 no-tproxy use-storeurl
> multicast-siblings
> cache_peer cache01 multicast 91 31 no-tproxy use-storeurl multicast-siblings
> cache_peer cache02 multicast 92 32 no-tproxy use-storeurl multicast-siblings
> cache_peer cache03 multicast 93 33 no-tproxy use-storeurl multicast-siblings

I'm not very familiar with the multicast side of things. But this config
seems a bit weird. Here is what little I understand about it:

  port 3x are configured to send ICP requests *to* each peer. But these
are marked as multicast, which means the ICP is sent to the group
address instead of the individual peers.

I think all peers would need to be listening on the same icp_port to get
the multicast ICP request, which is not possible in multi-instance.

Also,

  * "no-tproxy" is a Squid-3.1 option. Not available in any squid-2.

  * what is "use-storeurl" about? it is not an option in any Squid
version at all.

> #cache_peer_access cache00 allow all
> cache_peer_access cache01 allow all
> cache_peer_access cache02 allow all
> cache_peer_access cache03 allow all
>
> all instances has
> mcast_groups 127.0.0.1
>
> is there anything I missed? Or too much?

Maybe something built into multicast and how it works. But I'm almost as
much in the dark there as you. So good luck, and I'd like to hear how
this turns out :)

> With this setup is there possibilities the object may loop?

I don't think so. The sibling and multicast relationships both goes some
way to resolve that. With a combined coverage greater than the individual.
  You could ensure that "via on" is configured anyway. It will make any
loops that do happen highly visible.

>
>> -----Original Message-----
>> From: Amos Jeffries
>>
>> On 25/10/11 02:39, jiluspo wrote:
>>> Remedy I have is making name in host file. Is there any other squid
>>> configurations that I might need?
>>
>>
>> Some more description of your particular problem so we can answer would
>> be good. Proxies peering with hosts/DNS entries to connect them
>> describes the Internet.
>>
>> I assume you mean 2 Squid instances running on the same machine. Linked
>> as siblings to share objects. Correct?
> Yap bec. Last time I've try (4 instances) it didn't work when using
> 127.0.0.1 so I named it in host file

Ah. k. That is what the name=* option is for. To avoid needing the hosts
file as well.

Some things to be aware of in squid-2.7 and squid-3.x:

  * the default value of name= is the peer hostname/IP found as first
entry on the cache_peer line

  * name= values must be unique in one loaded config

  * the cache_peer_access and cache_peer_domain directives refer to the
name= value as their first parameter

With that understood, no additional configuration outside of squid.conf
is needed.

Amos

-- 
Please be using
   Current Stable Squid 2.7.STABLE9 or 3.1.16
   Beta testers wanted for 3.2.0.13
Received on Thu Oct 27 2011 - 06:32:43 MDT

This archive was generated by hypermail 2.2.0 : Thu Oct 27 2011 - 12:00:08 MDT