Elastic Load Balancing automatically distributes incoming application traffic across multiple targets, such as Amazon EC2 instances, containers, and IP addresses. When you are running applications in production, you typically will use multiple instances so if one fails, your application can still work. The Load Balancer will get the traffic, and will forward it to the instances that serve your app. You can more about this here.
- Go to EC2 under Compute section.
- On left menu select Load Balancers under LOAD BALANCING.
- Click Create Load Balancer.
- Select Application Load Balancer.
- As name put:
aws-workshop-load-balancer
. - Select at least 2 Availability zones.
- Click Next: Configure Security Settings.
- Click Next: Configure Security Groups.
- Select Create a new security group and as name put
load-balancer-security-group
and add a description. - Click Next: Configure Routing.
- As name put:
aws-workshop-target-group
. - As Port:
9000
. - As path:
/api/tags
. - Click Next: Register Targets.
- Click Next: Review.
- Click Create.
- Click Close.
Next: create an Auto Scaling Group.