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.

I have a server application for numeric math intense calculations. A user can spawn a "process" and poll the progress until the calculation has finished.

Now I want to migrate to the Amazon AWS. I really like the idea of Auto Scaling and Elastic Load Balancing.

If I use Elastic Load Balancing, how can I make sure, that the users requests (progress and final result) stay at the EC2 unit, that was used to calculate the results.

If there is no way to make this work. It's probably a better way to update the database e.g. SimpleDB and let the user use the database for progress and result queries?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

ELB has a feature called "sticky sessions", where the user will (via a cookie) be assigned to a single instance for the duration of their session.

Another option is, as you surmised, storing stuff in a central database (SimpleDB, DynamoDB, RDS, etc.) and having your front-end servers check that.

share|improve this answer
    
Although the sticky sessions is probably the easiest way to go I personally am a fan of the central database being updated I think its more of a distributed solution as it even frees the worker nodes from having to answer simple web requests. –  bwight Apr 2 '12 at 21:08

@Friedrich, I agree that a distributed solution is the way to go here, at least that would be my choice ;).

In general, all system components in distributed DB solutions are distributed across several servers, and this type of architecture contributes to the DB being highly available and scalable, as well as helps preventing freezing up when operations that require many resources are executed. Some DB solutions also provide replication in addition to the distributed design, which enables running administrative and maintenance tasks without adversely affecting the availability and performance of your DB.

Since you are interested in migrating to Amazon AWS, I would recommend you take a look at RDS and Xeround, both are hosted databases available on EC2. I think Xeround architecture is more distributed and can scale out automatically without any downtime, while I'm not sure RDS has this option. In any case, I suggest you check and compare these two, and see which type of DB architecture suits your requirements best.

share|improve this answer

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.