Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.
  1. If we scale up (add an instance to ELB), could we redirect some existing requests to the new instance. So that, The users that we force to a new server will be asked to login again

  2. If we scale down (remove an instance from ELB), then all users from that server will automatically be redirected by ELB to other remaining servers. These user should not be aked to login again.

Is this possible (including the redirect of request)? How?

Any ideas are welcome but I presume this can be solved using a central session store. I just don't know how to implement it .

And what are the options in using a central session store? simpledb? redis? memcached?

UPDATED:

Our application is just a simple web application hosted in apache. We have two instances of it added unto the Amazon ELB, and we are using PHP.

Any ELB php specific suggestions? when a scale down/up happens that no user-visible symptomps should be shown?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

Yes, you can solve all those problems and more with the use of a centralised session store. Without knowing your application, it's impossible to point you at a definitive guide for implementing it (and it would be a Stack Overflow question anyway), but it's usually as simple as either setting an option (in frameworks like Rails) to writing a few lines of glue code that get called by the web framework and which connects to the store to store the details or retrieve them.

As far as what to use, I recommend Redis. While memcached would appear to do the trick, it has the unpleasant downside of requiring users to re-login whenever you need to restart your memcached instance(s). A good rule of thumb to follow in redundant systems is that no change to your infrastructure should show any user-visible symptoms. Redis, on the other hand, persists to disk, is blazingly fast both on update and retrieval, and has shown itself to be incredibly robust in the large-scale situations I've used it in.

share|improve this answer
    
Hi womble thank you, our application is just a simple web application hosted in apache. We have two instances of it added unto the Amazon ELB, and we are using PHP. Any ELB php specific suggestions? when a scale down/up happens that no user-visible symptomps should be shown? –  Aivan Monceller Jul 7 '11 at 13:26
    
As I said in my answer, questions of how to implement a shared session store in your code are for Stack Overflow. –  womble Jul 7 '11 at 22:21
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.