Search squid archive

Re: affinity session load balancing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday 16 November 2015 at 12:17:49, Patrick Chemla wrote:

> Hi,
> 
> This is exactly the problem.
> 
> When users connect to the application, they go through the squid, then
> reach a login page where they enter login/passwd.
> 
> The application creates cookies including a PHPSESSION cookie.
> 
> Can squid use such cookie?

I do not believe Squid can do session-affinity load balancing based on cookies 
(but I'm happy to be corrected by anyone who knows better).

You may be better off using Apache in proxy/balancing mode: 
https://httpd.apache.org/docs/trunk/mod/mod_proxy_balancer.html

https://opensourcehacker.com/2011/04/15/sticky/


Regards,


Antony.

> On 16/11/2015 12:49, Antony Stone wrote:
> > On Monday 16 November 2015 at 11:32:31, Patrick Chemla wrote:
> >> I am doing load balancing as sourcehash, so on IP source.
> >> 
> >> The problem is that about 80% of clients come from the same IP, so I
> >> have a highly loaded backend, while other are sleeping.
> >> 
> >> So whatever you call it, on haproxy they call it session affinity LB,
> >> my need is to use a round-robin load balancing, but, very important,
> >> each user should always directed to the same backend.
> > 
> > So, the question remains "how do you identify a session?" (or maybe you
> > could rephrase it as "how do you identify a user?").
> > 
> >> Can we do that with squid? avoiding user login on squid (userhash is not
> >> convenient)?
> > 
> > You've already said that source IP is not a reliable indication of the
> > user (and this is very often true anyway), so what additional
> > information exists in the requests to identify a session / user?
> > 
> > Without knowing what application you're dealing with, we can't guess this
> > for ourselves.
> > 
> > Regards,
> > 
> > 
> > Antony.
> > 
> >> On 16/11/2015 11:41, Antony Stone wrote:
> >>> On Monday 16 November 2015 at 10:35:39, Patrick Chemla wrote:
> >>>> Hi,
> >>>> 
> >>>> I am using squid for years, maybe with basic features, and I have a
> >>>> problem today with an app where I need to manage multiple backends, be
> >>>> sure that a user is always sent to the same one because the app writes
> >>>> on local disk, and I have 80% users coming from same IP.
> >>> 
> >>> Is this Squid operating in accelerator mode (in front of the server/s)
> >>> or in proxying mode (being used by the clients)?
> >>> 
> >>>> So I need to load balance, not on the soucre IP, and I can't have a
> >>>> login on squid to identify each user, because it will create a double
> >>>> connexion procedure with the application login.
> >>> 
> >>> How does the app distinguish between different clients *without* Squid
> >>> being involved?
> >>> 
> >>>> Is there a way that squid will recognize a new connexion, maybe same
> >>>> IP, and load balnace it to any backend using round-robin? some
> >>>> affinity session load balancing?
> >>> 
> >>> The first thing needed to answer that is a definition of "session".
> >>> 
> >>> 
> >>> Regards,
> >>> 
> >>> Antony.
> 
> _______________________________________________
> squid-users mailing list
> squid-users@xxxxxxxxxxxxxxxxxxxxx
> http://lists.squid-cache.org/listinfo/squid-users

-- 
I own three Windows books, published by O'Reilly.   They are "Windows 
Annoyances", "Office 97 Annoyances" and "Windows 98 Annoyances".   That pretty 
much sums it up for me.

                                                   Please reply to the list;
                                                         please *don't* CC me.
_______________________________________________
squid-users mailing list
squid-users@xxxxxxxxxxxxxxxxxxxxx
http://lists.squid-cache.org/listinfo/squid-users




[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux