Re: [load balancing] Cookie Persistence

From: Tony Bourke <tony [izzat] vegan.net>
Date: Thu Mar 29 2007 - 15:14:09 EDT

See, I (respectfully) disagree. There are plenty of modern, well
written applications that are stateful. And using persistence,
especially cookie persistence, can be a simple and elegant solution.

While there are obvious advantages to having a stateless/common state
application (being able to tolerate constantly crashing servers, for
instance), the development of such may involve quite a bit of work,
bypassing a lot of the common tools already out there for developing
interactive sites.

Application developers the session handling capabilities of the
underlying application platform, such as PHP, ASP, Ruby, Java, etc. To
setup a session PHP for instance, all you need to do is
"session_start();". PHP handles the rest. Other platforms have similar
mechanisms. (It would be interesting to see if those session state
directories could be shared among various servers.)

People might inherit an application, or use a pre-packaged application,
that utilizes these platform's session handling mechanisms. For them,
it would be insane to try to re-write them to be stateless, when all it
would take is a load balancer with persistence. All you need to do is
setup active or passive cookies (or even IP persistence). A simple and
easy solution. Sure, you've got to keep your servers up, but even with
Microsoft, that's not really hard anymore.

I've seen the session argument used by some load balancer vendors that
don't support cookie persistence. Even the LVS site had such a stateful
admonishment page, but they removed it (possibly because many LAMP
applications are stateful). It always reeked of competitor advantage
nullification.

Most applications are a hybrid anyway. Certain state information is
kept on the server, but the important aspects, such as message board
posts, OIDs, whatever, are stored on a common backend database.

If you've got servers that are rebooted often, that would seem to me to
be the weakness, not a stateful application. :)

Tony

Ben Wilson wrote:
> Sessions should be shared between the load balanced servers; if that
> isn't possible because of application constraints that qualify for both
> adjectives, in my opinion.
>
> We preserve sessions across _sites_ by using a common database session
> table.
>
> I would catch so much crap is 1/5 our users lost their session because
> we had to boot a server! (Windows servers...)
>
>
>
>
>> -----Original Message-----
>> From: lb-l-bounces@vegan.net [mailto:lb-l-bounces@vegan.net] On Behalf
>> Of Tony Bourke
>> Sent: Wednesday, March 28, 2007 8:53 AM
>> To: Load Balancing Mailing List
>> Subject: Re: [load balancing] Cookie Persistence
>>
>> Hi Ben,
>>
>> If the server does go down, then yes the session is lost.
>>
>> What do you mean by "poorly designed" and "legacy"? I've heard that
>> term before when referring to stateful applications.
>>
>> Tony
>>
>> Ben Wilson wrote:
>>
>>> I don't understand layer 7 persistence. Don't sessions break if you
>>> take a server down?
>>>
>>> As a crutch for a poorly designed or "legacy" applications I guess
>>>
> it
>
>>> would be useful.
>>>
>>> --
>>> Ben
>>>
>>>
>>>
>>>> -----Original Message-----
>>>> From: lb-l-bounces@vegan.net [mailto:lb-l-bounces@vegan.net] On
>>>> Behalf Of Tony Bourke
>>>> Sent: Tuesday, March 27, 2007 12:19 PM
>>>> To: Load Balancing Mailing List
>>>> Subject: [load balancing] Cookie Persistence
>>>>
>>>> Since there hasn't been much traffic on the list lately, I thought
>>>>
> I
>
>>>> might throw out a topic for discussion.
>>>>
>>>> Cookie persistence, your thoughts? Crucial or superfluous?
>>>>
>>>> Tony
>>>>
>>>> _______________________________________________
>>>> lb-l mailing list
>>>> lb-l@vegan.net
>>>> http://vegan.net/mailman/listinfo/lb-l
>>>> Searchable Archive: http://vegan.net/lb/archive http://lbdigest.com
>>>> Load Balancing Digest
>>>>
>>>>
>>> -----------------------------------------
>>> The information contained in this email is confidential and is
>>> intended solely for the use of the person identified and intended as
>>> the recipient. If you are not the intended recipient, any
>>>
> disclosure,
>
>>> copying, distribution, or taking of any action in reliance on the
>>> contents is prohibited. If you receive this message in error,
>>>
> contact
>
>>> the sender immediately and delete it from your computer. Personal
>>> e-mails are restricted by PSECU policy. As such, PSECU specifically
>>> disclaims any responsibility or liability for any personal
>>>
>> information
>>
>>> or opinions of the author expressed in this email.
>>>
>>> _______________________________________________
>>> lb-l mailing list
>>> lb-l@vegan.net
>>> http://vegan.net/mailman/listinfo/lb-l
>>> Searchable Archive: http://vegan.net/lb/archive http://lbdigest.com
>>> Load Balancing Digest
>>>
>>>
>> _______________________________________________
>> lb-l mailing list
>> lb-l@vegan.net
>> http://vegan.net/mailman/listinfo/lb-l
>> Searchable Archive: http://vegan.net/lb/archive http://lbdigest.com
>> Load Balancing Digest
>>
>
> _______________________________________________
> lb-l mailing list
> lb-l@vegan.net
> http://vegan.net/mailman/listinfo/lb-l
> Searchable Archive: http://vegan.net/lb/archive
> http://lbdigest.com Load Balancing Digest
>

_______________________________________________
lb-l mailing list
lb-l@vegan.net
http://vegan.net/mailman/listinfo/lb-l
Searchable Archive: http://vegan.net/lb/archive
http://lbdigest.com Load Balancing Digest
Received on Thu Mar 29 15:14:51 2007

This archive was generated by hypermail 2.1.8 : Thu Mar 29 2007 - 15:14:51 EDT