Search squid archive

Re: [squid-users] Two squid instances based on file types? Is it good?

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

 



On Tue, 22 Feb 2005, Marco Crucianelli wrote:

Why shall I use never_direct? Maybe to force the frontend squid (the one
caching web stuff) to never ask for multimedia files the origin servers,
but to redirect these "calls" to the backend squid, the one caching
multimedia stuff?!?

Yes..

Maybe I've a wrong idea of how squid works!

Many are confused about the relations of cache_peer, never_direct and always_direct etc.


cache_peer defines possible paths where Squid MAY forward the request.

cache_peer_access/cache_peer_domain limits when these paths may be considered.

always_direct forces Squid to ignore all peers and always go direct for the request.

never_direct (when always_direct is not in effect) tells Squid that it may not go direct.

when neither always_direct or never_direct is in effect (the default situation) Squid is free to choose whatever path it sees most fit for the request, and will do this based on a number of criterias.

  - type of request
  - hierachy_stoplist
  - prefer_direct on/off
  - ICP status of the possible peers
  - TCP status of the possible peers
  - netdb information
  - etc..

With the goal of finding a reasonable balance between global cache hit ratio and request latency.

Normally it selects

  1. The "best" ICP peer or Digest HIT peer.

  2. Direct

  3. Some parent (default, round-robin etc..)

If prefer_direct off then 2 and 3 switches place.

In never_direct then the picture looks somewhat different

  1. The "best" ICP peer or Digest HIT peer.

  2. Some parent (default, round-robin etc..)

  3. All parents.

If always_direct then the picture becomes simply

  1. Direct

Regards
Henrik

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

  Powered by Linux