Search squid archive

Re: RE: Two squid servers to talk to each other before the internet

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

 



On 07/09/10 18:37, Tóth Tibor Péter wrote:
Anybody? Any Idea regarding this problem?
How can I check if two Squid nodes are talking to each other?

Thanks,
Tibby

-----Original Message-----
From: Tóth Tibor Péter [mailto:tibor.peter.toth@xxxxxx]
Sent: Monday, August 30, 2010 8:43 AM
To: Bucci, David G; squid-users@xxxxxxxxxxxxxxx
Subject:  RE: Two squid servers to talk to each other before the internet

The documentation on the wiki says:

"In case you want to be able to use direct connections when all the parents go down you should use a different approach:
cache_peer parentcache.foo.com parent 3128 0 no-query
prefer_direct off

The default behavior of Squid in the absence of positive ICP, HTCP, etc replies is to connect to the origin server instead of using parents. The prefer_direct off directive tells Squid to try parents first."


You've mentioned I should use
cache_peer other-server-name sibling 3128 3130

He did. Which means all of that wiki text is not relevant.
It describes a vertical hierarchy (client->squid->parent(s)->Internet)


Two questions: I dont have to set up a parent first?
The other squid node should be a sibling, not a parent.

What about the Prefer_direct function?
It says works for the parents first.
What if I have siblings, and no parents?

In answer to all of your questions; No, the Internet itself (DIRECT) is equivalent to a parent which does not need any configuration and is (usually) always available. The diagram you presented at the start with shows this clearly. "up" is the parent, "down" is the client, and "sideways" being the siblings.

"prefer_direct on" in your config will prevent siblings being used. Since the Internet will always be tried first. "prefer_direct off" should have no effect for you.

always_direct and never_direct will be what you use to force or bypass the sibling from a particular request. Just be careful with never_direct that one of them is allowed to fetch the object requested.


Is there a way to check if squids are talking to each other?

The access.log of each proxy will contain entries for messages going to and from the sibling.

On a basic setup like you have so far, expect to see SIBLING hit/miss codes sometimes. UDP_SIBLING_* are the ICP messages flowing between the siblings as they check whether the other has an object. TCP_SIBLING_HIT are the actual HTTP reply objects being fetched.

Amos

-----Original Message-----
From: Bucci, David G [mailto:david.g.bucci@xxxxxxxx]
Sent: Friday, August 27, 2010 6:00 PM
To: Tóth Tibor Péter; squid-users@xxxxxxxxxxxxxxx
Subject: RE: Two squid servers to talk to each other before the internet

Absolutely ... you can examine the Wiki Features/CacheHierarchy information for the basics, http://wiki.squid-cache.org/Features/CacheHierarchy

For a very basic setup, you'll want in each squid instance's squid.conf:

      cache_peer other-server-name sibling 3128 3130

For more details, check out your Squid version's documentation on cache_peer, cacahe_peer_access, etc. -- http://wiki.squid-cache.org/SquidFaq/ConfiguringSquid#Do_you_have_a_squid.conf_example.3F has links to configuration guides for your version.


-----Original Message-----
From: Tóth Tibor Péter [mailto:tibor.peter.toth@xxxxxx]
Sent: Friday, August 27, 2010 9:33 AM
To: squid-users@xxxxxxxxxxxxxxx
Subject: EXTERNAL:  Two squid servers to talk to each other before the internet

I was wondering, if is there any way to get two squid servers to talk to each other before going out and cacheing data from the internet?

Here is what I would need to do:

              ┌────────┐
              │   INTERNET   │
              └────────┘
                      │
     ┌───────────────────┐
     │                                 │
     │                                 │
┌────┐                       ┌────┐
│SQUID01│<---- I NEED THIS ---->│SQUID02│
└────┘                       └────┘
     │                                 │
     │                                 │
┌────┐                       ┌────┐
│CLIENT1│                       │CLIENT2│
└────┘                       └────┘

I want SQUID01 and SQUID02 to "ask" each other if the other have the data, before going out to the web. I guess you call this exchanging data between squids? In case if one server go down, the other need to go directly to the internet, and not just standing and waiting for answer from a disabled machine.

Can this be done int he squid.conf file?

Thanks,
Tibby


--
Please be using
  Current Stable Squid 2.7.STABLE9 or 3.1.8
  Beta testers wanted for 3.2.0.2


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

  Powered by Linux