Home > OS >  How do I choose the right AWS Elastic Beanstalk instance types and quantity?
How do I choose the right AWS Elastic Beanstalk instance types and quantity?

Time:10-28

In a load-balanced environment type, they wrote "We recommend a minimum of two instance types."

  1. If I can set the maximum instance number, why should I choose different instance types?
  2. Suppose I chose 3 different instance types and the maximum number of instances of 4; If so, will 12 different instances run simultaneously at peak traffic time?
  3. Is there a significant difference between choosing 4 instances with 1GB/1vCPU or 2 instances with 2GB/2vCPUs? (For now, it seems logical to choose weak and cheap instances and keep the maximum number of instances high)

CodePudding user response:

If I can set the maximum instance number, why should I choose different instance types?

It's your choice.

Some instance types may not be available for launch sometimes in your designated region - that is one reason I can think of which would make it useful to have more than 1 instance type.

Suppose I chose 3 different instance types and the maximum number of instances of 4; If so, will 12 different instances run simultaneously at peak traffic time?

No.

The EC2 Fleet attempts to launch the number of instances that are required to meet the target capacity specified in your request i.e. you will only have a max of 4 instances running at a given time.

Those 4 instances may have any instance type that you've specified in your list of 3, but the maximum will be 4.

You will never have 12 instances.

Is there a significant difference between choosing 4 instances with 1GB/1vCPU or 2 instances with 2GB/2vCPUs? (For now, it seems logical to choose weak and cheap instances and keep the maximum number of instances high)

This depends on your application needs.

If your application runs perfectly fine on 1GB/1vCPU, then it is logical to use that configuration. The amount of instances needed is again, dependent on your application.

Ultimately, you are doing a tradeoff between performance and cost - a question that only you can answer.

  • Related