Re: [squid-users] Squid as Acceleration Proxy in a Squid Cluster

2007-05-10 Thread Henrik Nordstrom
tor 2007-05-10 klockan 10:11 +0200 skrev Marcel Alburg:

> But if i stop the local apache on a server and ask over the server the
> website - squid sad
> 
> 2007/05/10 08:10:30| Detected DEAD Parent: 127.0.0.1
> 2007/05/10 08:10:30| TCP connection to 127.0.0.1/80 failed
> 
> Thats ok
> 
> but the result is this:
> 
> The following error was encountered:
> 
> * Unable to forward this request at this time.
> 
> 2007/05/10 08:10:55| Failed to select source for 'http://www.xxx.tld'
> 2007/05/10 08:10:55|   always_direct = 0
> 2007/05/10 08:10:55|never_direct = 0
> 2007/05/10 08:10:55|timedout = 0


For this to work well you need a fallback non-ICP parent relation to the
other.. siblings is only queried for the content they have already
cached.

You should also have a cache_peer_access rule preventing circular
forwarding in case both is having problems..


Someting like the following should work:

cache_peer the_apache parent ... no-query originserver default
cache_peer the_other_server parent ... no-query
cache_peer the_other_server sibling ... name=other_server_sibling 
(note: no no-query on the sibling relation, only the parent relations)

acl from_other_server src the_other_server
cache_peer_access the_other_server deny from_other_server
cache_peer_access the_other_server_sibling deny from_other_server


The dual sibling & parent relation to the other server is needed so that
ICP only acts in sibling mode, but that it's still used as a parent if
the preferred web server is down.

Regards
Henrik


signature.asc
Description: Detta är en digitalt signerad	meddelandedel


Re: [squid-users] Squid as Acceleration Proxy in a Squid Cluster

2007-05-10 Thread Marcel Alburg
My cache peer lines look like this

On first server:

cache_peer 127.0.0.1parent  80  0   originserverno-query default
cache_peer server2sibling  80  3130  proxy-only no-delay allow-miss
name=server2

On second server:

cache_peer 127.0.0.1parent  80  0   originserverno-query default
cache_peer server1sibling  80  3130  proxy-only no-delay allow-miss
name=server1


Marcel




Alexandre Correa wrote:
> add no-query to cache_peer line !
> 
> i think this 'solve' ...
> 
> On 5/10/07, Marcel Alburg <[EMAIL PROTECTED]> wrote:
>> Ok, thanks - that works and i see that a sibling becomes some request
>> for caches.
>>
>> But if i stop the local apache on a server and ask over the server the
>> website - squid sad
>>
>> 2007/05/10 08:10:30| Detected DEAD Parent: 127.0.0.1
>> 2007/05/10 08:10:30| TCP connection to 127.0.0.1/80 failed
>>
>> Thats ok
>>
>> but the result is this:
>>
>> The following error was encountered:
>>
>> * Unable to forward this request at this time.
>>
>> 2007/05/10 08:10:55| Failed to select source for 'http://www.domain.tld'
>> 2007/05/10 08:10:55|   always_direct = 0
>> 2007/05/10 08:10:55|never_direct = 0
>> 2007/05/10 08:10:55|timedout = 0
>>
>>
>>
>> Thanks
>>
>> Marcel
>>
>> leongmzlist wrote:
>> > 1. your cache sibling configuration is wrong; you're not contacting any
>> > of the sibling.
>> > 2. use the proxy-only flag if you don't want squid to store cache hits
>> > from the siblings.
>> >
>> > try something like
>> >
>> > cache_peer sibling1 sibling 80 3130 proxy-only no-delay allow-miss
>> > name=sibling1
>> >
>> > mike
>> >
>> > At 03:02 PM 5/9/2007, Marcel Alburg wrote:
>> >> Hello,
>> >>
>> >> my Networks looks like
>> >>
>> >>
>> >>   Internet
>> >>   |
>> >> [LB] -ha- [LB]
>> >>   | |
>> >>  +-+
>> >>  | |
>> >>  | |
>> >> [Squid + Apache]   [Squid + Apache]
>> >>
>> >>
>> >> All Hosts has running a webserver at 127.0.0.1:80 and a squid at the
>> >> official IP Adresse on Port 80.
>> >>
>> >> The LoadBalancer ([LB]) forward the request to on of the server. The
>> >> Squid checks his Cache and it the cache valid he send from cache
>> >> otherwise he ask the local apache.
>> >>
>> >> We've a lot of hosts with this configuration and we've a problem, that
>> >> any squid cache his own version from a webpage (n-Nodes could be n
>> >> different Versions from a webpage - because the access and
>> >> generationtime differs).
>> >>
>> >> My question is. It is possible to let ask the Squid the other nodes in
>> >> the network if the requested page cached. And has any node a cached
>> >> version - than deliver this cached version - otherwise ask the local
>> >> apache.
>> >>
>> >> I tried a lot of different configs but nothing works to my
>> contentment.
>> >>
>> >> a other problem is:
>> >>
>> >> If ask the squid the local page and gets an Error 404 or 500 he should
>> >> ask the other Proxies for any valid cached version and deliver that
>> >> version. The Webuser should not see the 500 Errors (if we had a lot of
>> >> load at the server, the error 500 pages comes often).
>> >>
>> >> And i wanna stop the local apache at one node and the squid should
>> >> notice that and ask the other nodes.
>> >>
>> >> One of my not working config was like this
>> >>
>> >> cache_peer 127.0.0.1parent  80  0   originserverno-query
>> default
>> >> allow-miss
>> >> cache_peer 127.0.0.1sibling  80  3130
>> >> cache_peer 127.0.0.1sibling  80  3130
>> >> cache_peer 127.0.0.1sibling  80  3130
>> >> icp_hit_stale on
>> >>
>> >>
>> >> It is possible to realized that ?
>> >>
>> >> Thanks
>> >>
>> >> Marcel
>> >
>> >
>>
>>
> 
> 



Re: [squid-users] Squid as Acceleration Proxy in a Squid Cluster

2007-05-10 Thread Marcel Alburg
My cache peer lines look like this

On first server:

cache_peer 127.0.0.1parent  80  0   originserverno-query default
cache_peer server2sibling  80  3130  proxy-only no-delay allow-miss
name=server2

On second server:

cache_peer 127.0.0.1parent  80  0   originserverno-query default
cache_peer server1sibling  80  3130  proxy-only no-delay allow-miss
name=server1


Marcel



Alexandre Correa wrote:
> add no-query to cache_peer line !
> 
> i think this 'solve' ...
> 
> On 5/10/07, Marcel Alburg <[EMAIL PROTECTED]> wrote:
>> Ok, thanks - that works and i see that a sibling becomes some request
>> for caches.
>>
>> But if i stop the local apache on a server and ask over the server the
>> website - squid sad
>>
>> 2007/05/10 08:10:30| Detected DEAD Parent: 127.0.0.1
>> 2007/05/10 08:10:30| TCP connection to 127.0.0.1/80 failed
>>
>> Thats ok
>>
>> but the result is this:
>>
>> The following error was encountered:
>>
>> * Unable to forward this request at this time.
>>
>> 2007/05/10 08:10:55| Failed to select source for 'http://www.xxx.tld'
>> 2007/05/10 08:10:55|   always_direct = 0
>> 2007/05/10 08:10:55|never_direct = 0
>> 2007/05/10 08:10:55|timedout = 0
>>
>>
>>
>> Thanks
>>
>> Marcel
>>
>> leongmzlist wrote:
>> > 1. your cache sibling configuration is wrong; you're not contacting any
>> > of the sibling.
>> > 2. use the proxy-only flag if you don't want squid to store cache hits
>> > from the siblings.
>> >
>> > try something like
>> >
>> > cache_peer sibling1 sibling 80 3130 proxy-only no-delay allow-miss
>> > name=sibling1
>> >
>> > mike
>> >
>> > At 03:02 PM 5/9/2007, Marcel Alburg wrote:
>> >> Hello,
>> >>
>> >> my Networks looks like
>> >>
>> >>
>> >>   Internet
>> >>   |
>> >> [LB] -ha- [LB]
>> >>   | |
>> >>  +-+
>> >>  | |
>> >>  | |
>> >> [Squid + Apache]   [Squid + Apache]
>> >>
>> >>
>> >> All Hosts has running a webserver at 127.0.0.1:80 and a squid at the
>> >> official IP Adresse on Port 80.
>> >>
>> >> The LoadBalancer ([LB]) forward the request to on of the server. The
>> >> Squid checks his Cache and it the cache valid he send from cache
>> >> otherwise he ask the local apache.
>> >>
>> >> We've a lot of hosts with this configuration and we've a problem, that
>> >> any squid cache his own version from a webpage (n-Nodes could be n
>> >> different Versions from a webpage - because the access and
>> >> generationtime differs).
>> >>
>> >> My question is. It is possible to let ask the Squid the other nodes in
>> >> the network if the requested page cached. And has any node a cached
>> >> version - than deliver this cached version - otherwise ask the local
>> >> apache.
>> >>
>> >> I tried a lot of different configs but nothing works to my
>> contentment.
>> >>
>> >> a other problem is:
>> >>
>> >> If ask the squid the local page and gets an Error 404 or 500 he should
>> >> ask the other Proxies for any valid cached version and deliver that
>> >> version. The Webuser should not see the 500 Errors (if we had a lot of
>> >> load at the server, the error 500 pages comes often).
>> >>
>> >> And i wanna stop the local apache at one node and the squid should
>> >> notice that and ask the other nodes.
>> >>
>> >> One of my not working config was like this
>> >>
>> >> cache_peer 127.0.0.1parent  80  0   originserverno-query
>> default
>> >> allow-miss
>> >> cache_peer 127.0.0.1sibling  80  3130
>> >> cache_peer 127.0.0.1sibling  80  3130
>> >> cache_peer 127.0.0.1sibling  80  3130
>> >> icp_hit_stale on
>> >>
>> >>
>> >> It is possible to realized that ?
>> >>
>> >> Thanks
>> >>
>> >> Marcel
>> >
>> >
>>
>>
> 
> 



Re: [squid-users] Squid as Acceleration Proxy in a Squid Cluster

2007-05-10 Thread Alexandre Correa

add no-query to cache_peer line !

i think this 'solve' ...

On 5/10/07, Marcel Alburg <[EMAIL PROTECTED]> wrote:

Ok, thanks - that works and i see that a sibling becomes some request
for caches.

But if i stop the local apache on a server and ask over the server the
website - squid sad

2007/05/10 08:10:30| Detected DEAD Parent: 127.0.0.1
2007/05/10 08:10:30| TCP connection to 127.0.0.1/80 failed

Thats ok

but the result is this:

The following error was encountered:

* Unable to forward this request at this time.

2007/05/10 08:10:55| Failed to select source for 'http://www.xxx.tld'
2007/05/10 08:10:55|   always_direct = 0
2007/05/10 08:10:55|never_direct = 0
2007/05/10 08:10:55|timedout = 0



Thanks

Marcel

leongmzlist wrote:
> 1. your cache sibling configuration is wrong; you're not contacting any
> of the sibling.
> 2. use the proxy-only flag if you don't want squid to store cache hits
> from the siblings.
>
> try something like
>
> cache_peer sibling1 sibling 80 3130 proxy-only no-delay allow-miss
> name=sibling1
>
> mike
>
> At 03:02 PM 5/9/2007, Marcel Alburg wrote:
>> Hello,
>>
>> my Networks looks like
>>
>>
>>   Internet
>>   |
>> [LB] -ha- [LB]
>>   | |
>>  +-+
>>  | |
>>  | |
>> [Squid + Apache]   [Squid + Apache]
>>
>>
>> All Hosts has running a webserver at 127.0.0.1:80 and a squid at the
>> official IP Adresse on Port 80.
>>
>> The LoadBalancer ([LB]) forward the request to on of the server. The
>> Squid checks his Cache and it the cache valid he send from cache
>> otherwise he ask the local apache.
>>
>> We've a lot of hosts with this configuration and we've a problem, that
>> any squid cache his own version from a webpage (n-Nodes could be n
>> different Versions from a webpage - because the access and
>> generationtime differs).
>>
>> My question is. It is possible to let ask the Squid the other nodes in
>> the network if the requested page cached. And has any node a cached
>> version - than deliver this cached version - otherwise ask the local
>> apache.
>>
>> I tried a lot of different configs but nothing works to my contentment.
>>
>> a other problem is:
>>
>> If ask the squid the local page and gets an Error 404 or 500 he should
>> ask the other Proxies for any valid cached version and deliver that
>> version. The Webuser should not see the 500 Errors (if we had a lot of
>> load at the server, the error 500 pages comes often).
>>
>> And i wanna stop the local apache at one node and the squid should
>> notice that and ask the other nodes.
>>
>> One of my not working config was like this
>>
>> cache_peer 127.0.0.1parent  80  0   originserverno-query default
>> allow-miss
>> cache_peer 127.0.0.1sibling  80  3130
>> cache_peer 127.0.0.1sibling  80  3130
>> cache_peer 127.0.0.1sibling  80  3130
>> icp_hit_stale on
>>
>>
>> It is possible to realized that ?
>>
>> Thanks
>>
>> Marcel
>
>





--

Sds.
Alexandre J. Correa
Onda Internet / OPinguim.net
http://www.ondainternet.com.br
http://www.opinguim.net


Re: [squid-users] Squid as Acceleration Proxy in a Squid Cluster

2007-05-10 Thread Marcel Alburg
Ok, thanks - that works and i see that a sibling becomes some request
for caches.

But if i stop the local apache on a server and ask over the server the
website - squid sad

2007/05/10 08:10:30| Detected DEAD Parent: 127.0.0.1
2007/05/10 08:10:30| TCP connection to 127.0.0.1/80 failed

Thats ok

but the result is this:

The following error was encountered:

* Unable to forward this request at this time.

2007/05/10 08:10:55| Failed to select source for 'http://www.xxx.tld'
2007/05/10 08:10:55|   always_direct = 0
2007/05/10 08:10:55|never_direct = 0
2007/05/10 08:10:55|timedout = 0



Thanks

Marcel

leongmzlist wrote:
> 1. your cache sibling configuration is wrong; you're not contacting any
> of the sibling.
> 2. use the proxy-only flag if you don't want squid to store cache hits
> from the siblings.
> 
> try something like
> 
> cache_peer sibling1 sibling 80 3130 proxy-only no-delay allow-miss
> name=sibling1
> 
> mike
> 
> At 03:02 PM 5/9/2007, Marcel Alburg wrote:
>> Hello,
>>
>> my Networks looks like
>>
>>
>>   Internet
>>   |
>> [LB] -ha- [LB]
>>   | |
>>  +-+
>>  | |
>>  | |
>> [Squid + Apache]   [Squid + Apache]
>>
>>
>> All Hosts has running a webserver at 127.0.0.1:80 and a squid at the
>> official IP Adresse on Port 80.
>>
>> The LoadBalancer ([LB]) forward the request to on of the server. The
>> Squid checks his Cache and it the cache valid he send from cache
>> otherwise he ask the local apache.
>>
>> We've a lot of hosts with this configuration and we've a problem, that
>> any squid cache his own version from a webpage (n-Nodes could be n
>> different Versions from a webpage - because the access and
>> generationtime differs).
>>
>> My question is. It is possible to let ask the Squid the other nodes in
>> the network if the requested page cached. And has any node a cached
>> version - than deliver this cached version - otherwise ask the local
>> apache.
>>
>> I tried a lot of different configs but nothing works to my contentment.
>>
>> a other problem is:
>>
>> If ask the squid the local page and gets an Error 404 or 500 he should
>> ask the other Proxies for any valid cached version and deliver that
>> version. The Webuser should not see the 500 Errors (if we had a lot of
>> load at the server, the error 500 pages comes often).
>>
>> And i wanna stop the local apache at one node and the squid should
>> notice that and ask the other nodes.
>>
>> One of my not working config was like this
>>
>> cache_peer 127.0.0.1parent  80  0   originserverno-query default
>> allow-miss
>> cache_peer 127.0.0.1sibling  80  3130
>> cache_peer 127.0.0.1sibling  80  3130
>> cache_peer 127.0.0.1sibling  80  3130
>> icp_hit_stale on
>>
>>
>> It is possible to realized that ?
>>
>> Thanks
>>
>> Marcel
> 
> 



Re: [squid-users] Squid as Acceleration Proxy in a Squid Cluster

2007-05-09 Thread leongmzlist
1. your cache sibling configuration is wrong; you're not contacting 
any of the sibling.
2. use the proxy-only flag if you don't want squid to store cache 
hits from the siblings.


try something like

cache_peer sibling1 sibling 80 3130 proxy-only no-delay allow-miss 
name=sibling1


mike

At 03:02 PM 5/9/2007, Marcel Alburg wrote:

Hello,

my Networks looks like


  Internet
  |
[LB] -ha- [LB]
  | |
 +-+
 | |
 | |
[Squid + Apache]   [Squid + Apache]


All Hosts has running a webserver at 127.0.0.1:80 and a squid at the
official IP Adresse on Port 80.

The LoadBalancer ([LB]) forward the request to on of the server. The
Squid checks his Cache and it the cache valid he send from cache
otherwise he ask the local apache.

We've a lot of hosts with this configuration and we've a problem, that
any squid cache his own version from a webpage (n-Nodes could be n
different Versions from a webpage - because the access and
generationtime differs).

My question is. It is possible to let ask the Squid the other nodes in
the network if the requested page cached. And has any node a cached
version - than deliver this cached version - otherwise ask the local apache.

I tried a lot of different configs but nothing works to my contentment.

a other problem is:

If ask the squid the local page and gets an Error 404 or 500 he should
ask the other Proxies for any valid cached version and deliver that
version. The Webuser should not see the 500 Errors (if we had a lot of
load at the server, the error 500 pages comes often).

And i wanna stop the local apache at one node and the squid should
notice that and ask the other nodes.

One of my not working config was like this

cache_peer 127.0.0.1parent  80  0   originserverno-query default
allow-miss
cache_peer 127.0.0.1sibling  80  3130
cache_peer 127.0.0.1sibling  80  3130
cache_peer 127.0.0.1sibling  80  3130
icp_hit_stale on


It is possible to realized that ?

Thanks

Marcel




[squid-users] Squid as Acceleration Proxy in a Squid Cluster

2007-05-09 Thread Marcel Alburg
Hello,

my Networks looks like


  Internet
  |
[LB] -ha- [LB]
  | |
 +-+
 | |
 | |
[Squid + Apache]   [Squid + Apache]


All Hosts has running a webserver at 127.0.0.1:80 and a squid at the
official IP Adresse on Port 80.

The LoadBalancer ([LB]) forward the request to on of the server. The
Squid checks his Cache and it the cache valid he send from cache
otherwise he ask the local apache.

We've a lot of hosts with this configuration and we've a problem, that
any squid cache his own version from a webpage (n-Nodes could be n
different Versions from a webpage - because the access and
generationtime differs).

My question is. It is possible to let ask the Squid the other nodes in
the network if the requested page cached. And has any node a cached
version - than deliver this cached version - otherwise ask the local apache.

I tried a lot of different configs but nothing works to my contentment.

a other problem is:

If ask the squid the local page and gets an Error 404 or 500 he should
ask the other Proxies for any valid cached version and deliver that
version. The Webuser should not see the 500 Errors (if we had a lot of
load at the server, the error 500 pages comes often).

And i wanna stop the local apache at one node and the squid should
notice that and ask the other nodes.

One of my not working config was like this

cache_peer 127.0.0.1parent  80  0   originserverno-query default
allow-miss
cache_peer 127.0.0.1sibling  80  3130
cache_peer 127.0.0.1sibling  80  3130
cache_peer 127.0.0.1sibling  80  3130
icp_hit_stale on


It is possible to realized that ?

Thanks

Marcel