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

Reply via email to