[squid-users] Load Balancing Query

2009-06-15 Thread Mario Remy Almeida
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



--
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.


Re: [squid-users] Load Balancing Query

2009-06-15 Thread Amos Jeffries

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
--
Please be using
  Current Stable Squid 2.7.STABLE6 or 3.0.STABLE15
  Current Beta Squid 3.1.0.8 or 3.0.STABLE16-RC1


Re: [squid-users] Load Balancing Query

2009-06-15 Thread Mario Remy Almeida
Hi Amos,

Thanks for that,

so I need to use carp and sourcehash to do load balancing, right?

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?

//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.


Re: [squid-users] Load Balancing Query

2009-06-15 Thread Amos Jeffries

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





--
Please be using
  Current Stable Squid 2.7.STABLE6 or 3.0.STABLE15
  Current Beta Squid 3.1.0.8 or 3.0.STABLE16-RC1


Re: [squid-users] Load Balancing Query

2009-06-15 Thread Mario Remy Almeida
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.


Re: [squid-users] Load balancing query

2005-02-20 Thread Henrik Nordstrom
On Fri, 28 Jan 2005, Carinus Carelse wrote:
I have two external networks connected and I have one proxy server that
is servicing about 500 users.  I would like the squid box to do some
load balancing across the two external link so that the http traffic
does not just go through the one link.
Is this possible and how do i go about setting this up.
This is best done by route load balancing in your OS.
But you can use tcp_outgoing_address to make Squid select which link to 
use for certain kinds of request.

Regards
Henrik


[squid-users] Load balancing query

2005-01-27 Thread Carinus Carelse
I have two external networks connected and I have one proxy server that
is servicing about 500 users.  I would like the squid box to do some
load balancing across the two external link so that the http traffic
does not just go through the one link.

Is this possible and how do i go about setting this up.

Carinus