Re: Accelerator mode: connect retry possible?

From: Andreas J. Koenig <>
Date: 14 Apr 1999 04:29:17 +0200

>>>>> On Mon, 12 Apr 1999 22:12:32 +0200, Henrik Nordstrom <> said:

> Andreas J. Koenig wrote:
>> I'm using squid in accelerator mode only and I haven't yet found a way
>> to let squid retry to connect to the backend apache if a connect
>> fails. Squid aborts immediately with an error message.

> It does, but very fast. If your OS has the IP interface enabled any
> instance when Apache is not listening then Squid will quickly give up.

> What you can do is to set up the backend server on an virtual IP
> interface which is brought up after Apache is started, and brought down
> before Apache is shut down. This way Squid will properly retry
> connections until the backend server is online again.

Thanks Henrik!

Sounds like a clever workaround. But is it portable? I took a day ill
to try it out on Linux (2.2.5) but so far I haven't got it working.
I'm stuck because taking down the interface with "ifconfig eth0:0
down" also cleans the routing table. That causes Squid to fail with
"No route to host" too quickly. It's better than before but not
predictible enough. Any suggestion how to improve what I have tried?

  case "$1" in
          echo -n "Configuring virtual IPs: "
          ifconfig eth0:0
          route add -host dev eth0:0
          echo Done
          echo -n "Unconfiguring virtual IPs: "
          ifconfig eth0:0 down
          # implicitly done by ifconfig down: route del
          echo Done
          echo "Usage: virt-ip {start|stop}"
          exit 1

Received on Tue Apr 13 1999 - 20:14:06 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:45:50 MST