Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Realistically, how do I setup Amazon AWS to make it auto-scale?

I have had an EC2 instance working just fine for months (still developing, app not live yet), but I just realized I don't even know how to make my EC2 instance scale up / down depending on traffic.

The sheer number of services offered by Amazon is overwhelming, and I'm very confused.

Initially, I though I'd just have one instance, and Amazon would transparently allocate resources or create identical instances to handle traffic but it seems my impression was wrong.

My question is: can someone please tell me (in simple words, bullet list or point me to a tutorial) how to make my instance automatically grows to handle 100,000 simultaneous users then automatically goes back when the surge is done?

Assuming this is possible, can I do this via the AWS control panel? If so, how?

All I can see is micro, small, medium, etc.. instances. Each one has limited resources and it's not clear how to automatically setup the instance so that Amazon dynamically allocate additional resources to handle traffic spikes (or even gradually go up to keep with natural traffic growth for that matter).

Side question May I assume that Amazon auto-handle DDOS attacks when scaling up? (meaning rogue traffic would eventually stopped/slowed down by Amazon and scaling would only affect legitimate traffic spike). I realize this side question may be really stupid, keep in mind I didn't take my coffee yet :)

like image 641
TheDude Avatar asked Dec 07 '12 14:12

TheDude


People also ask

Does AWS EC2 scale automatically?

Dynamic Scaling Amazon EC2 Auto Scaling will then automatically adjust the number of EC2 instances as needed to maintain your target.

What triggers Auto Scaling in AWS?

The triggers scale when the average outbound network traffic from each instance is higher than 6 MB or lower than 2 MB for five minutes. To use Amazon EC2 Auto Scaling effectively, you must configure scaling triggers that are appropriate for your application, instance type, and service requirements.

Which AWS services can scale automatically?

AWS Auto Scaling provides a simple, powerful user interface that lets you build scaling plans for Amazon EC2 instances and Spot Fleets, Amazon ECS tasks, Amazon DynamoDB tables, and Amazon Aurora Replicas.

Does AWS S3 scale automatically?

Amazon S3 automatically scales to high request rates. For example, your application can achieve at least 3,500 PUT/COPY/POST/DELETE or 5,500 GET/HEAD requests per second per partitioned prefix. There are no limits to the number of prefixes in a bucket.


2 Answers

This article details how to auto scale using load balancers and EC2: http://kkpradeeban.blogspot.com/2011/01/auto-scaling-with-amazon-ec2.html

For scalability you may also want to look into this article on implementing a pub/sub system for distributed systems: http://www.infoq.com/articles/AmazonPubSub

like image 152
fjxx Avatar answered Oct 18 '22 15:10

fjxx


You can't automatically change the instance type (m1.small, m1.large, etc.) in response to changing load. You can, however, have AWS automatically create new instances as your load increases, and tear them down when load subsides.

I believe this article will help you: http://aws.amazon.com/autoscaling/.

like image 25
Tim A Avatar answered Oct 18 '22 14:10

Tim A