Re: Sessions in a load balanced setup




> The loadbalancingpart is however irrelevant if you use a database for
> sessionstorage, since every session will contact the same database that
> stores the sessions.
> (If you plan to use more databases for sessionstorage, I give up. :P)

Yeah, the obvious solution is to store all the session information in a
single database. But that would limit the failover capability of the system.
I was thinking about setting up each box with its own copy of the database
and replicate the data between each one. However, I don't think this is a
feasible solution since session info changes all the time and I can't have
the dbs continuously replicate themselves all the time. I suppose I could
use sticky sessions, but I was wondering if there was a better solution out
there.

> A good place to start is at ZEND:
> http://www.zend.com/zend/spotlight/code-gallery-wade8.php
>

Yes, I looked at Zend and I'm considering investing in their technology.

> That page contains a good example, but without sessionlocking.
> I wrote my own that does implement sessionlocking. It is not tested 100%,
> but seems to work great so far. If you are interested I'll publish it on
> the net, but just start with zend. :-)
>

I'm definitly interested and I'm sure others would benefit from your work as
well. Please let us know if you do decide to publish it!

Thanks,
Balazs



.



Relevant Pages

  • Re: Multi phase processing
    ... I writing a perl/mysql backend to a website, ... number of pages of input, then, at the end, stores all the info on the ... all of which is taken from some data tables on the database. ... approach completely and use a decent session module that lets you ...
    (comp.lang.perl.misc)
  • Re: Please! Doesnt anyone know a better way to do this?
    ... account, they need to automatically be directed to the page to enter data ... session variable on the Account page. ... I assume here that you're checking a database when the user attempts to ... When a new user attempts to login or clicks to register, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Retrieving state information from a middle tier
    ... Now this very first call can make session root entry into an xml file like ... We have a middle tier which is made up ... > The current implementation only allows for one database to be served up. ... > longer use the middle tier as the source of the connection properties. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Horizontal scaling - advice needed
    ... the session can be unambiguously proxied to the right backend server, ... To start with have a single database machine. ... Full database clustering is challenging, but if your site is making you lots ... For transient session state, ...
    (comp.lang.ruby)
  • Re: VirtualPathProvider and Application Restart
    ... the session state to the Database Server and move a lot of lightweight ... to unload it from the AppDomain. ... When you update an ASPX file, ...
    (microsoft.public.dotnet.framework.aspnet)