Re: [squid-users] Reverse proxies...

From: John Doe <jdmls_at_yahoo.com>
Date: Fri, 27 Jun 2008 07:20:39 -0700 (PDT)

----- Original Message ----
> > Indeed, my unique server has 3 IP aliases.
> >
> > Apaches:
> > 127.0.0.1:8081
> > 127.0.0.1:8082
> > 127.0.0.1:8083
> > Squids:
> > 192.168.17.11:80
> > 192.168.17.12:80
> > 192.168.17.13:80
> >
> > I added udp_incoming_address 192.168.17.[11|12|13] respectively in each squid
> confs
> > I don't need to change udp_outgoing_address, do I? (See netstat at the end of
> this post)
>
> Maybe you do. Definitely tcp_outgoing_address might be a good idea too.
>
> Amos

Ok, I try that. But, the doc says: "If udp_outgoing_address is set to 255.255.255.255
(the default) it will use the same socket as udp_incoming_address." So I thought I could leave the default... And my netstat did show:

 udp 0 0 192.168.17.13:3130 0.0.0.0:*
 udp 0 0 192.168.17.12:3130 0.0.0.0:*
 udp 0 0 192.168.17.11:3130 0.0.0.0:*
 udp 0 0 192.168.17.11:33134 0.0.0.0:*
 udp 0 0 192.168.17.12:33136 0.0.0.0:*
 udp 0 0 192.168.17.13:33137 0.0.0.0:*

==========

So I did add 3 new IP aliases for the outgoings (outgoing ICP IPs do not show up in logs but they do in netstat):

2008/06/27 15:50:25| Accepting accelerated HTTP connections at 192.168.17.11, port 80, FD 14.
2008/06/27 15:50:25| Accepting ICP messages at 192.168.17.11, port 3130, FD 15.
2008/06/27 15:50:25| Outgoing ICP messages on port 3130, FD 16.
2008/06/27 15:50:25| Configuring Parent 127.0.0.1/8081/0
2008/06/27 15:50:25| Configuring Sibling 192.168.17.12/80/3130
2008/06/27 15:50:25| Configuring Sibling 192.168.17.13/80/3130

2008/06/27 15:50:28| Accepting accelerated HTTP connections at 192.168.17.12, port 80, FD 14.
2008/06/27 15:50:28| Accepting ICP messages at 192.168.17.12, port 3130, FD 15.
2008/06/27 15:50:28| Outgoing ICP messages on port 3130, FD 16.
2008/06/27 15:50:28| Configuring Parent 127.0.0.1/8082/0
2008/06/27 15:50:28| Configuring Sibling 192.168.17.11/80/3130
2008/06/27 15:50:28| Configuring Sibling 192.168.17.13/80/3130

2008/06/27 15:50:31| Accepting accelerated HTTP connections at 192.168.17.13, port 80, FD 14.
2008/06/27 15:50:31| Accepting ICP messages at 192.168.17.13, port 3130, FD 15.
2008/06/27 15:50:31| Outgoing ICP messages on port 3130, FD 16.
2008/06/27 15:50:31| Configuring Parent 127.0.0.1/8083/0
2008/06/27 15:50:31| Configuring Sibling 192.168.17.11/80/3130
2008/06/27 15:50:31| Configuring Sibling 192.168.17.12/80/3130

udp 0 0 192.168.17.16:3130 0.0.0.0:*
udp 0 0 192.168.17.13:3130 0.0.0.0:*
udp 0 0 192.168.17.15:3130 0.0.0.0:*
udp 0 0 192.168.17.12:3130 0.0.0.0:*
udp 0 0 192.168.17.14:3130 0.0.0.0:*
udp 0 0 192.168.17.11:3130 0.0.0.0:*
udp 0 0 192.168.17.14:33213 0.0.0.0:*
udp 0 0 192.168.17.15:33214 0.0.0.0:*
udp 0 0 192.168.17.16:33215 0.0.0.0:*

==========

Same test (fill the 3 squids then delete 1 object from squid1 and browse squid1) and same result (squid1 asks siblings but end up asking apache1):

squid1:
1214575092.895 0 192.168.17.11 TCP_MEM_HIT/200 2338 GET http://192.168.17.11/ - NONE/- text/html
1214575093.043 148 192.168.17.11 TCP_MISS/200 4378 GET http://192.168.17.11/img/apache_header.gif - FIRST_UP_PARENT/127.0.0.1 image/gif

1214575093.042 SWAPOUT 00 00000004 8BC2233ECEF0C976FDD190FF1A652998 200 1214575093 1214468039 1214575393 image/gif 4084/4084 GET http://192.168.17.11/img/apache_header.gif

squid2:
1214575093.033 0 192.168.17.14 UDP_MISS/000 63 ICP_QUERY http://192.168.17.11/img/apache_header.gif - NONE/- -
1214575099.628 0 192.168.17.12 TCP_MEM_HIT/200 374 GET internal://pc-03/squid-internal-periodic/store_digest - NONE/- application/cache-digest

1214575094.267 RELEASE 00 00000004 F560EF12A0FB4963759C32554341CB17 0 -1 -1 -1 unknown -1/0 NONE http://192.168.17.13/squid-internal-periodic/store_digest
1214575094.267 SWAPOUT 00 00000004 6BB5F118D5D548296562668556E2FF74 200 1214575094 1214574631 1214578231 application/cache-digest 147/147 GET http://192.168.17.13/squid-internal-periodic/store_digest

squid3:
1214575092.501 0 192.168.17.14 UDP_MISS/000 63 ICP_QUERY http://192.168.17.11/img/apache_header.gif - NONE/- -
1214575094.267 0 192.168.17.13 TCP_MEM_HIT/200 374 GET internal://pc-03/squid-internal-periodic/store_digest - NONE/- application/cache-digest

1214575099.628 RELEASE 00 00000004 D03BA4AEAA228DAF8EA08C9197F05522 0 -1 -1 -1 unknown -1/0 NONE http://192.168.17.12/squid-internal-periodic/store_digest
1214575099.628 SWAPOUT 00 00000004 1BDEF453F2C0A866DD905F6C79CF1002 200 1214575099 1214574628 1214578228 application/cache-digest 147/147 GET http://192.168.17.12/squid-internal-periodic/store_digest

apache1:
127.0.0.1 - - [27/Jun/2008:15:58:13 +0200] "GET /img/apache_header.gif HTTP/1.0" 200 4084

==========

Again, two things seem strange:
 ICP_QUERY http://192.168.17.11/img/apache_header.gif (do squid 2 and 3 ignore the 192.168.17.11 IP in their object search?)
 GET internal://pc-03/squid-internal-periodic/store_digest - NONE/- application/cache-digest (why does my hostname (this IP is nowhere in the confs) show up in the logs?)

I would think it would be more a problem of hash (if webserver IPs are used) by example, which would make the same object look different on each squid.
Remember, it is not 3 squids querying the same apache. They have each their own apache.

Thx,
JD

      
Received on Fri Jun 27 2008 - 14:20:48 MDT

This archive was generated by hypermail 2.2.0 : Fri Jun 27 2008 - 12:00:05 MDT