
js5 at sanger
Jun 30, 2008, 12:18 AM
Post #7 of 12
(1988 views)
Permalink
|
On Sun, 29 Jun 2008, Perrin Harkins wrote: > On Sat, Jun 28, 2008 at 9:48 AM, Jeff Peng <peng.kyo[at]gmail.com> wrote: >> But I have a question, does nginx support for session-keeping? >> A user's request, should go always to the same original backend server. >> Otherwise the user's session will get lost. > > I would advise you not to do this. It's a non-scalable design. If > you need to keep session data beyond what will fit in an encrypted > cookie, you'd be better off storing it in a shared database. That > way, if you lose one of your web servers, the session won't get lost. I would consider using a shared memory solution to save traffic too from the database server (consider a solution based on memcached??)... I would be very careful about going back to a single machine for each request - due to traffic profiles (when a user makes a request there is a "spike" of requests from the session - all these then get handled by one machine and not load balanced)... -- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.
|