Classic to Application Load Balancer Migration
Published: 2023-12-13 07:39:25

**Classic Load Balancer:**
Classic load balancer(CLB) serves as the single point of contact for the clients in which the instances are added without disrupting the flow of the requests for the application and here the ‘listeners’ check for the connection requests from the client using the protocol and port that we configure.

**Application Load Balancer:**
Application Load Balancer(ALB) serves as the single point of contact for the clients and distributes the incoming application traffic to multiple targets, which increases the availability of the application. We can add two or more listeners as the listeners check for the connection request from the client using the protocol and port that we configure.

**Difference between CLB and ALB:**
Classic load balancer is for simple load balancing of traffic in multiple EC2 instances and Application load balancer is for micro services for which we need to route traffic to multiple services across multiple ports on the same EC2 Instance. Application Load Balancer has more services provided than the Classic Load Balancer.

**Steps for Migration from CLB to ALB:**

1. Open the AWS Console and go to the load balancers.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/26h0oqtowhgtj23uysx2.png)
2. create a load balancer
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lygfhqgwe738nuft3dnw.png)
3. Create a Classic load balancer
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9kzq7tz8vq0plvqw3ysa.png)
4. Enter a load Balancer Name
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/icvveuuwood7lij6vzfe.png)
5. Select a Availability zone.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v9ii0wxoikwzre7wjkpv.png)
6. Select security groups and listener.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xr2b5q3dv7h166arxetc.png)
7. Verify summary and launch a load balancer.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qcwqo1dl0cuq7z9t0ka7.png)
8. Classic LB is available
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rc5qdarok0c1xgmu1dow.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qpnz19hvyigs586n12tz.png)
## Convert a Classic Load Balancer to Application Load Balancer.

1. Click Launch ALB migration wizard.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2n8vi1svdmq8jgyzwbqx.png)
2. Migration review option available.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yrk5owkgot0fawnxju5o.png)
3. Click create
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p9auj1hvkq6tddv5sly9.png)
4. Successfully ALB created.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/732vj55nkozqkyhihl3z.png)
5. verify ALB
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ixi9p404rc0ha8bwerm5.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o4te7c1hlj153g302k48.png)

## Cost Comparison:

**CLB:**
Region:US East (N.Virginia)
1.$0.025 per Classic Load Balancer-hour (or partial hour)
2.$0.008 per GB of data processed by a Classic Load Balancer

**ALB:**
Region:US East (N.Virginia)
1.$0.0225 per Application Load Balancer-hour (or partial hour)
2.$0.008 per LCU-hour (or partial hour)(LCU-Loadbalancer Capacity Units)

The price of CLB is higher than ALB but CLB does not provide support to applications through public IPs, back end server authentication and the ALB can be used to help in complex load balancing by managing the traffics and the price may increase when the process in terms of LCU increases, hence we are going on with the application load balancer and below are the steps to migrate the old classic load balancer to application load balancer.

Ref: https://aws.amazon.com/elasticloadbalancing/pricing/