Few concepts sometimes can be confusing also sometimes they are interchangeably used so here we are going to discuss two important concepts that are Elastic Load Balancing and Autoscaling.
Autoscaling:
Auto Scaling automatically adjusts resources to keep up with the changes in demand based on pe configured AS policies.
Asynchronously adding or removing instances from resource groups depending on scheduled, periodic, or alarm policies. Auto Scaling can automatically increase instances during traffic surges to maintain application performance and reduce instances during slow periods to save money.
Auto Scaling automates the process of establishing and terminating ECS instances based on traffic needs. Auto Scaling ensures you have enough ECS instances to handle the application load.
It allows for elasticity and scalability. An Auto Scaling group is a grouping of ECS instances (ASG). You can set a minimum number of instances in each ASG, Auto Scaling will never drop below that number. You can optionally set a maximum number of instances per ASG, which will be respected. Auto Scaling will guarantee the group has the desired capacity. A scaling policy determines when Auto Scaling launches or stops instances. On-demand/dynamic scaling, and cyclic/scheduled scaling determine when, if, and how the ASG scales.
Scaling Plans define the triggers and de-provisioning of instances. A launch configuration contains parameters like instance family, instance type, AMI, key pair, and security groups.
Elastic Load Balancing:
Elastic Load Balance (ELB) automatically distributes incoming traffic to different backend servers based on the rules you set up. Applications that run on ELB can be better at providing service and be more available because it eliminates single points of failure (SPOFs).
Load balancing distributes workload evenly across numerous servers for high-traffic applications and websites that serve thousands of users globally. A load balancer routes requests to servers that can efficiently handle them, reducing downtime.
A load balancer distributes traffic among ECS instances. With a load balancer, your application will have a single point of access (DNS) to several downstream instances. The load balancer will also regularly verify the instances' health, They now include security, acceleration, and authentication.
Elastic Load Balancing (ELB) can also provide SSL termination. This means it will handle the client-server connection termination and encryption. The ELB will also help you keep track of permissions between areas.
Conclusion:
Load balancing does not replace auto-scaling. When both of them function together, it can help promote effective auto-scaling. In order to redirect connections from faulty instances, load balancing must create new instances.
So auto-scaling will create new instances, and load balancing will connect them. That's why both Elastic Load Balancing and Auto Scaling are useful. and by using both of them together availability, robustness and efficiency of the system is improved.
Sources:
https://support.huaweicloud.com/intl/en-us/productdesc-as/as_pro_0010.html
https://www.huaweicloud.com/intl/en-us/product/as.html
https://medium.com/programmingnotes/aws-auto-scaling-and-load-balancing-b1c6eeb4d074
https://www.cloudzero.com/blog/aws-auto-scaling