开发者

How do I use amazons elastic load balancer and auto scaling together? [closed]

开发者 https://www.devze.com 2023-02-01 12:46 出处:网络
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. 开发者_Python百科

This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.

Closed 6 years ago.

Improve this question

I am working with amazon web services and right now have a simple micro instance set up for my development environment.

I want to add a load balancer in addition to auto scaling to dynamically increase the amount of instances or the power of an instance when I need it.

Right now I have my domain pointing to my micro instance. Should I change this and have it somehow point to my load balancer and then have my load balancer add instance when the micro instance is under high load?

If anyone knows a good tutorial with examples that would really help too. Amazons documentation is somewhat lacking and out of date.


I haven't done this yet but this is how I believe it's supposed to work.

You create an Elastic IP Address and point your domain to that. You then configure the load balancer on that IP address and then add your instance to the load balancer.

When the auto scaling decides to add an instance then you need to make sure that instance gets added to the load balancer.

Note that you also need to make sure that your server design allows any instance to handle the request.

Frankly, I suggest you think about scaling by getting a bigger instance to start with. It's much easier to get things started that way and it will probably take a while before your app actually needs to auto-scale.


First: You must create a Load Balancer and set it's DNS name (which is an A record) to your domain at Route 53.

Second: You must create a Launch Configuration that stores the Ec2 instance information to use while creating a new one (Which AMI to use, which instance type and etc...).

Third: You must create an Auto Scaling Group, select the Launch Configuration previously created, set Load Balancer, set the alarms to increase or decrease and Voila!

You can watch this video to understand more clearly.
You can read this answer to understand how to use the "min, desired and max" values of the Auto Scaling Group.

0

精彩评论

暂无评论...
验证码 换一张
取 消