Re: [squid-users] How to setup squid proxy to run in fail-over mode

From: George Herbert <george.herbert_at_gmail.com>
Date: Mon, 15 Jun 2009 14:06:45 -0700

Most of the suggestions so far have missed the mark.

Squid - like an Apache web server etc - is essentially stateless
(transactions in progress don't make permanent changes). You can run
any number of web servers or Squid servers in parallel with requests
being freely responded to by any of them. If you set them up as a
cache peering group, the cache hit rate issues with multiple separate
servers are significantly reduced.

High Availability for servers that can run in parallel in this manner
is almost always done by putting some sort of load balancer out in
front, not using clustering software to "fail over" a service between
two nodes.

HA software makes little sense in this case.

There are various free HTTP load balancer software solutions out there
which are open source, or you can buy a commercial load balancer if
you have higher bandwidth requirements. Most of those applications
can cluster, giving you load balancer level HA.

Multiple DNS A records doesn't necessarily work - many clients will
try the first A record result they get, and if they get no response
assume the server is down. If you know that all the client software
behind your squids are properly able to try second or third A records,
then that's safe - but test it first.

One can use Linux HA or another clustering solution to create a
virtual IP address that can move around, server to server, so you
don't need a load balancer and if server A goes down the IP will go to
server B. But it's a very poor match to the application.

-george william herbert
george.herbert_at_gmail.com

On Mon, Jun 15, 2009 at 5:43 AM, abdul sami<sami.memon_at_gmail.com> wrote:
> Thanks to all for replies.
>
> Sorry i didn't mentioned the plateform I am using to run squid on
> which is freebsd 7.
>
> I have visited the linux-ha site, where it says the software is
> supported for freebsd too but their is no distribution for freebsd, so
> can u people tell me which distribution i can use for feebsd 7?
>
> Thanks & Regards,
> A Sami
>
> On Mon, Jun 15, 2009 at 4:07 PM, Muhammad
> Sharfuddin<m.sharfuddin_at_nds.com.pk> wrote:
>> just a question
>>
>>>2. Use an HA solution such as Ultramonkey3. Here you could do
>>>Active-Active.
>> Why Ultramonkey3.. why not HA from http://www.linux-ha.org/
>>
>> -Sharfuddin
>>
>> A PC is like a aircondition. If you open Windows it just don't funktion
>> properly anymore
>>
>> On Mon, 2009-06-15 at 12:12 +0200, Luis Daniel Lucio Quiroz wrote:
>>> There are 2 ways as far as I know to do this possible:
>>>
>>> 1. Use de WPAD protocol: lets say PROXY squid1; PROXY squid2 (this is fail
>>> over)
>>> 2. Use an HA solution such as Ultramonkey3. Here you could do Active-Active.
>>>
>>> Kind regards,
>>>
>>> LD
>>> Le lundi 15 juin 2009 11:09:28, Sagar Navalkar a écrit :
>>> > Hey Remy,
>>> >
>>> > The DNS server does not determine which server is down, however If It is
>>> > unable to resolve the 1st entry, it will automatically go down to the 2nd
>>> > entry.
>>> >
>>> > Regards,
>>> >
>>> > Sagar Navalkar
>>> > Team Leader
>>> >
>>> >
>>> > -----Original Message-----
>>> > From: Mario Remy Almeida [mailto:malmeida_at_isaaviation.ae]
>>> > Sent: Monday, June 15, 2009 1:36 PM
>>> > To: Sagar Navalkar
>>> > Cc: squid-users_at_squid-cache.org; 'abdul sami'
>>> > Subject: RE: [squid-users] How to setup squid proxy to run in fail-over
>>> > mode
>>> >
>>> > Hi Sagar,
>>> >
>>> > Just a Question?
>>> >
>>> > How can a DNS server determine that the primary server is down and it
>>> > should resolve the secondary server IP?
>>> >
>>> > //Remy
>>> >
>>> > On Mon, 2009-06-15 at 11:21 +0530, Sagar Navalkar wrote:
>>> > > Hi Abdul,
>>> > >
>>> > > Please try to enter 2 different IPs in the DNS ....
>>> > >
>>> > > 10.xxx.yyy.zz1 (proxyA) as primary (proxyA-Name should be same on both
>>> > > the servers.)
>>> > > 10.xxx.yyy.zz2 (proxyA) as secondary.
>>> > >
>>> > > Start squid services on both the servers (Primary & Secondary)
>>> > >
>>> > > If Primary server fails, the DNS will resolve secondary IP for proxyA &
>>> >
>>> > the
>>> >
>>> > > squid on second server will kick in automatically......
>>> > >
>>> > > Hope am able to explain it properly.
>>> > >
>>> > > Regards,
>>> > >
>>> > > Sagar Navalkar
>>> > >
>>> > >
>>> > > -----Original Message-----
>>> > > From: abdul sami [mailto:sami.memon_at_gmail.com]
>>> > > Sent: Monday, June 15, 2009 11:17 AM
>>> > > To: squid-users_at_squid-cache.org
>>> > > Subject: [squid-users] How to setup squid proxy to run in fail-over mode
>>> > >
>>> > > Dear all,
>>> > >
>>> > > Now that i have setup a proxy server, as a next step i want to run it
>>> > > in fail-over high availability mode, so that if one proxy is down due
>>> > > to any reason, second proxy should automatically be up and start
>>> > > serving requests.
>>> > >
>>> > > any help in shape of articles/steps would be highly appreciated.
>>> > >
>>> > > Thanks and regards,
>>> > >
>>> > > A Sami
>>> >
>>> > ---------------------------------------------------------------------------
>>> >- --
>>> > Disclaimer and Confidentiality
>>> >
>>> >
>>> > This material has been checked for  computer viruses and although none has
>>> > been found, we cannot guarantee  that it is completely free from such
>>> > problems
>>> > and do not accept any  liability for loss or damage which may be caused.
>>> > Please therefore  check any attachments for viruses before using them on
>>> > your
>>> > own  equipment. If you do find a computer virus please inform us
>>> > immediately so that we may take appropriate action. This communication is
>>> > intended solely
>>> > for the addressee and is confidential. If you are not the intended
>>> > recipient,
>>> > any disclosure, copying, distribution or any action  taken or omitted to be
>>> > taken in reliance on it, is prohibited and may be  unlawful. The views
>>> > expressed in this message are those of the  individual sender, and may not
>>> > necessarily be that of ISA.
>>>
>>
>>
>

-- 
-george william herbert
george.herbert_at_gmail.com
Received on Mon Jun 15 2009 - 21:06:51 MDT

This archive was generated by hypermail 2.2.0 : Tue Jun 16 2009 - 12:00:03 MDT