On 14/07/11 23:45, viswanathan sekar wrote:
Thank you very much Amos
When sibling realtionship is configured in cache_peer without any
protocols( icp/htcp), whether squid sends GET request to peers instead
of ICP/HTCP requests ?
Eg.
cache_peer 172.16.1.10 sibling 3128 0 no-query
cache_peer 172.16.1.11 sibling 3128 0 no-query
I don't think it does. sibling is a "sideways" level of hierarchy. Going
there is only worthwhile if there is a guarantee that the object an be
fetched faster than via a parent or direct. If Squid has no knowledge of
object there then it cannot make that choice.
Sibling will be picked if they (a) answer to ICP, (b) answer to HTCP,
(c) provide a cache digest matching the URL hash. There is also some
case for originserver siblings when doing origin parent checks.
Amos
Thanks
-Viswa
On Wed, Jul 13, 2011 at 11:03 AM, Amos Jeffries<squid3@xxxxxxxxxxxxx> wrote:
On 13/07/11 15:52, viswanathan sekar wrote:
Hello All,
I want to configure squid like following setup and please share your
views to achieve it.
Setup:
Squid is configured as a reverse proxy with two Apache servers as
parent. In both apache servers video content will be added
continuously.
Requirement:
If the requested object is not found in the first parent(Apache1.com),
squid must check for requested object in the second
parent(Apache2.com).
Squid.conf:
cache_peer parent Apache1.com parent 80 o originserver
cache_peer parent Apache2.com parent 80 o originserver
Tricky. 404 (not found / does not exist) is a proper response supposed to be
sent to the client. It indicates that the object does not exist _at all_.
You could work around that by making apache1 produce a 5xx code instead of
404. That way Squid is tricked into believing the peer is broken and move on
to the next.
Its best to split that data between the peers based on some part of the URL.
Either the subdomain name, or the top level folder of the path. That way
Squid can check for that detail and pass requests straight to the right
origin.
If they are supposed to be redundant mirrors of each other then place them
in the order you update the content. The one most likely to have content
will be checked first, and failure to find it there is a guarantee that the
other wont have it either.
Amos
--
Please be using
Current Stable Squid 2.7.STABLE9 or 3.1.14
Beta testers wanted for 3.2.0.9
--
Please be using
Current Stable Squid 2.7.STABLE9 or 3.1.14
Beta testers wanted for 3.2.0.9