Thanks for this post that succinctly explains how to use AWS, some great tips and things to look out for.
I’ve been dealing a lot with Amazon’s AWS platform lately. Mostly doing offline data processing using Hadoop but the latest load balancing features finally opened the door for frontend applications to take advantage of Amazon’s cloud computing platform – making it easier for developers to make application more cost efficient an scalable.
Keeping in mind that there are a lot of applications out there who can benefit from moving to the cloud (including my own) I’ve made a list of tasks/considerations to make when preparing for such a move:
The first and easiest step is to move all your static content – images, CSS, JavaScript files, etc. – to Amazon S3. Let Amazon worry about storage, backups and availability for you.
Things to consider:
Once your content is on S3 you can also use CloudFront, Amazon’s CDN (Content Delivery Network), to serve the files and improve your application’s performance.
Move your web server code and backend services – database, memcached, etc. – to run on Amazon EC2 instances.
Consider using Amazon’s availability zones to setup servers in different availability zones. This can help your serve customers at different parts of the worlds better, while making your infrastructure tolerant to the unlikely event of a datacenter failures at Amazon.
Moving your web servers to EC2 should be fairly simple. You can setup EC2 images that are configured exactly the same way your current web servers are.
If you require a queuing service as part of your architecture, consider switching to Amazon’s SQS to make administration easier.
Moving your database to EC2 is probably the hardest part of the move to AWS. If you plan on keeping your database (as opposed to migrating to a cloud solution like SimpleDB) you should use EBS (Elastic Block Storage) so that your storage is persists independently from the life of your EC2 instance.
Backup. Figure out how to take scheduled snapshots of your EBS and store them on S3.
Consider replication and sharding. If you’re using availability zone you should consider sharding your data. For example, store data European accounts data in Europe only. You should also consider replication between the different availability zones to ensure keep your site available even when one of the datacenter is unavailable.
Related Links:
Now that your application is entirely running on Amazon’s platform it’s time to take the full advantage of the platform and make it scale.
Setup Monitoring to keep up with what’s going on on your system. Amazon provides a service called CloudWatch that allows you to monitor your machines and applications.
Based on the monitoring metrics you should start using Amazon’s auto-scaling and load balancing capabilities to be able to consume and release computing resources according to demand.
At this point you should also investigate reducing your dependency on relational databases (RDMS) as much as possible (as its the most complex, and hardest to scale, component in the system) and try to move as much functionality as possible to S3 and SimpleDB.
S3 is suitable for storing large objects while SimpleDB is ideal for small stubs of data.
Important notes:
Related Links:
Thanks for this post that succinctly explains how to use AWS, some great tips and things to look out for.
SimpleDB isn't necessarily such a proprietary "all your eggs in one basket" concern: M/DB (http://www.mgateway.com/mdb.html) provides an Open Source API-compatible alternative for running on EC2 or another cloud provider...or even locally.
[..] Mueve tu aplicación a Amazón [..]
Post Comment