/ Zope / Apsis / Pound Mailing List / Archive / 2008 / 2008-03 / pounds - few questions - stickiness

[ << ] [ >> ]

[ Strange error that I get. / James Wenzel ... ] [ Re: [Pound Mailing List] Unknown Listener address ... ]

pounds - few questions - stickiness
"Mariusz Szyszka" <szycha(at)bydnet.com.pl>
2008-03-31 23:31:33 [ FULL ]
Hello there

 I am going to use Pounds product as a Load Balancer but firstly I have some 
questions so I believe I will find answers here ;)
First of all I am looking for Load Balancer with sticky session feature. In 
other words my LB will have to load balance new sessions among the few 
applicatio servers. 
The requests within the session should be sticky to the same application 
server. It seems the pounds supports this feature ("Pound has the ability to 
keep track of sessions between a client browser and a back-end server")
It seems to me I can use cookies:
Session
            Type    Cookie
            ID      "sess"
            TTL     300
        End 
However not sure If I understand it. Can you please flesh this behaviour out 
? Who insert the cookies ? Pounds or back end application?
Using a cookie approach does it mean that new session from the same browser 
will be load balance among all back end servers? I thought
if I use cookies always each session will go to the same back edn server. 

How are back ends selected ? I mean how does the pound select back end from 
a list of active. (round robin, random, by number connections?)

Does pound collect any info (stats) such as active clients, active 
connections, etc in html format ...
Where can I found more info than under http://www.apsis.ch/pound/index_html?

Thank you in advance. 
Mariusz
Attachments:  
text.html text/html 2464 Bytes

RE: [Pound Mailing List] pounds - few questions - stickiness
"Alfonso Espitia" <aespitia(at)castleworldwide.com>
2008-03-31 23:46:19 [ FULL ]
You would have to (in your application) supply a cookie (any cookie
name) that is unique to that user.  For example, if you had them log in
to your application, and set a "userid" cookie or something upon
successful login.  

What pound then does is check for the name/value pair of the cookie, and
redirects them back to the original server.  If you don't want to set
your own cookie, and you're using ASP,ASP.net, or JSP (don't know if PHP
does this too), but they have some default cookies that they use like
"ASPSESSIONIDXYZ" where XYZ is a random string attached to the cookie
name.   

I don't have it in front of me, but you can also use regular expressions
in the cookie name to handle things such as "ASPSESSIONID*".

Also, it doesn't HAVE to be a cookie.  You can use IP addresses, and
some other things to make the session stick to the back end server.

As for the original assignment of the user to the backend, I don't know
if it's random, round robin, etc...

-----Original Message-----
From: Mariusz Szyszka [mailto:szycha(at)bydnet.com.pl] 
Sent: Monday, March 31, 2008 5:32 PM
To: pound(at)apsis.ch
Subject: [Pound Mailing List] pounds - few questions - stickiness

Hello there

 I am going to use Pounds product as a Load Balancer but firstly I have
some questions so I believe I will find answers here ;) First of all I
am looking for Load Balancer with sticky session feature. In other words
my LB will have to load balance new sessions among the few applicatio
servers. 
The requests within the session should be sticky to the same application
server. It seems the pounds supports this feature ("Pound has the
ability to keep track of sessions between a client browser and a
back-end server") It seems to me I can use cookies:
Session
            Type    Cookie
            ID      "sess"
            TTL     300
        End
However not sure If I understand it. Can you please flesh this behaviour
out ? Who insert the cookies ? Pounds or back end application?
Using a cookie approach does it mean that new session from the same
browser will be load balance among all back end servers? I thought if I
use cookies always each session will go to the same back edn server. 

How are back ends selected ? I mean how does the pound select back end
from a list of active. (round robin, random, by number connections?)

Does pound collect any info (stats) such as active clients, active
connections, etc in html format ...
Where can I found more info than under
http://www.apsis.ch/pound/index_html?

Thank you in advance. 
Mariusz


--
To unsubscribe send an email with subject unsubscribe to pound(at)apsis.ch.
Please contact roseg(at)apsis.ch for questions.

--
This message has been scanned for viruses and dangerous content by
SecureMail, and is believed to be clean.

Re: [Pound Mailing List] pounds - few questions - stickiness
Dave Steinberg <dave(at)redterror.net>
2008-03-31 23:56:31 [ FULL ]
> The requests within the session should be sticky to the same application
[...]

Right, right.
[...]

The backend / your application.
[...]

I believe you're correct, the same cookie will land you on the same 
backend.  That's of course the point of sticky sessions.  :)
[...]

By priority, or if priorities are equal, I believe its random.
[...]

poundctl can give you some info, but you'd have to convert to HTML yourself.
[...]

Take a look at the man page included with the source code.  Its quite 
complete.

Regards,[...]

MailBoxer