Re: [squid-users] Load Balancing Query

From: Mario Remy Almeida <malmeida_at_isaaviation.ae>
Date: Mon, 15 Jun 2009 17:26:07 +0400

Thanks Amos for the help

On Tue, 2009-06-16 at 00:30 +1200, Amos Jeffries wrote:
> Mario Remy Almeida wrote:
> > Hi Amos,
> >
> > Thanks for that,
> >
> > so I need to use carp and sourcehash to do load balancing, right?
>
> only the one you want.
>
> >
> > but where do I specify in squid to monitor the prots?
> >
> > I mean if port 8080 is down on 'ServerA' how Squid will know that it
> > should send the request to 'ServerB' on port 8080?
>
> It's automatic in the background.
>
> The latest 2.HEAD and 3.1 have options to configure how long it takes to
> detect. Other squid attempt ~10 connects and then failover.
>
> Amos
>
> >
> > //Remy
> >
> > On Mon, 2009-06-15 at 23:05 +1200, Amos Jeffries wrote:
> >> Mario Remy Almeida wrote:
> >>> Hi All,
> >>>
> >>> Want to know if load balancing is possible with squid by maintaining
> >>> sessions.
> >>> Health check should be TCP Ports
> >>>
> >>> eg:
> >>> Server A -> Active port 8080
> >>> Server B -> Active port 8080
> >>>
> >>> Client -> Squid -> Server A and/or B
> >>>
> >>> Request 1 comes from 'Client A' Squid forwards the request to 'Server A'
> >>> Request 2 comes from 'Client A' Squid forwards the request to 'Server A'
> >>> and so on
> >>> any further request from 'Client A' squid should only forward to 'Server
> >>> A' until the session is same
> >>>
> >>> if
> >>>
> >>> Request 1 comes from 'Client B' Squid forwards the request to 'Server B'
> >>> Request 2 comes from 'Client B' Squid forwards the request to 'Server B'
> >>>
> >>> if 'Server A' fails Squid should forward all the request to 'Server B'
> >>>
> >>> //Remy
> >>>
> >>
> >> HTTP is stateless. It contains no such thing as sessions. That is a
> >> browser feature.
> >>
> >> What you are looking for is something like CARP or sourcehash peering
> >> algorithms. They keep all requests for certain URLs sent to the same
> >> place (CARP) or all requests for the same IP to the same place (sourcehash).
> >>
> >> see
> >> http://www.squid-cache.org/Doc/config/cache_peer
> >>
> >>
> >> Amos
> >
> >

------------------------------------------------------------------------------
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.
Received on Mon Jun 15 2009 - 13:25:52 MDT

This archive was generated by hypermail 2.2.0 : Mon Jun 15 2009 - 12:00:03 MDT