What is the main differences between an load balancer and a autoscaling group

0

What is the main differences between an load balancer and a autoscaling group

4 回答
3

Load balancer - Think of it as a set of AWS-managed servers across Availability Zones (AZs) that front-end your instances and balance traffic to them.

Autoscaling group - If you mean EC2 autoscaling, this helps you create a set of instances across AZs that will increase or decrease in number in response to conditions you define, e.g. CPU load on the running instances, or number of messages in an SQS queue the instances are reading from.

Note the SQS example I mentioned - you may have autoscaling without load balancing for a "worker tier". Or, often the two work together where a load balancer targets the instances in an autoscale group, balancing traffic to them.

专家
已回答 2 年前
1
已接受的回答

Load Balancer distributes the application traffic across multiple targets such as EC2 instances, IP addresses and containers. If I have two running instances and N number of members are requesting for access their data. Then load balancer will distribute those N requests evenly between two running instances. Load balancer decreases the load on the individual instance and increases the overall performance of the application. There are few load balancer choices on AWS:

  • Application Load Balancer: Operates at layer 7. Targets IP instances, Lambda, containers. Supported protocols are HTTP, HTTPS, gRPC
  • Network Load balancer: Operates at layer 4. Targets IP, instances, ALB, containers. Supported protocols are TCP, UDP, TLS
  • Gateway Load Balancer: Pass through load balancer that operates as layer 3 gateway and layer 4 load balancer. Targets IP, instances. Supported protocols are IP.
  • Classic Load Balancer: Operates at layer 4/7. Targets EC2-Classic. Supported protocols are TCP, SSL/TLS, HTTP, HTTPS. Classic load balancer isn't actively developed.
  • AWS Global Accelerator: Acts like a load balancer. Operates at TCP/UDP. Targets IP, ALB, NLB. Supported protocols are TCP, UDP

Autoscaling is used to automatically increase and decrease the number of instances based on the application requirement. It ensures that you have the correct number of instances available to handle the load for your application. For example, an Auto Scaling group has a minimum size of 1 instance, a desired capacity of 2 instances, and a maximum size of 4 instances. The scaling policies that you define adjust the number of instances, within your minimum and maximum number of instances, based on the criteria that you specify. The goal of an Auto Scaling Group is to:

  • Scale out (add EC2 instances) to match an increased load
  • scale in (remove EC2 instances) to match a decreased load
  • Ensure we have a minimum and a maximum number of machines running
  • Automatically register new instances to a load balancer
profile pictureAWS
专家
已回答 2 年前
1

From an AWS services point of view:

Load Balancing as it sounds is related to balancing out the traffic to multiple targets to achieve stability. It is also referred to as Elastic Load balancing. Elastic Load Balancing (ELB) automatically distributes incoming application traffic across multiple targets and virtual appliances in one or more Availability Zones (AZs).

vs ASG or an auto-scaling group enables you to use Amazon EC2 Auto Scaling features such as health check replacements and scaling policies. The size of your auto scaling group is maintained according to a pre-defined number of instances, which you configure as the required capacity. You can use manual or automatic sizing to resize groups according to application requirements.

profile pictureAWS
支持工程师
已回答 2 年前
0

Thanks very much for all them who answered my query, i have got a better understanding now.

已回答 2 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则