Are you deciding whether to stay with AWS Classic Load Balancer (CLB), previously known as Elastic Load Balancer, or migrate to one of the newer types of Elastic Load Balancing (ELB) solutions:
If you’re currently using CLB, could you use some guidance on how to migrate to ALB or NLB? If so, this blog is for you.
As you may know, AWS ELB can help improve the scalability, reliability, and performance efficiency of your AWS environments. It does so by automatically distributing incoming application traffic across servers in multiple Availability Zones.
In this blog, we’ll look at each of the types of AWS ELB to help you decide which of them is best for your workload or organization. And, if you’re already using CLB and decide that ALB or NLB is more appropriate for your needs, we’ll guide you through the steps to perform a migration.
Here at nClouds, when we build container infrastructure for our customers, our default choice is to use AWS ALB. We select ALB because it integrates really well with Amazon Elastic Container Service (Amazon ECS), Amazon Elastic Container Service for Kubernetes (Amazon EKS), AWS Fargate, and AWS Lambda. So, it’s a no-brainer choice for building new infrastructure.
Many customers are still running on CLB. Our customers typically want to switch due to key features available only from ALB, like:
The list of features goes on — you can find the complete list here.
If you have already configured ELB in AWS, what you have is most likely CLB. You may decide to stay with CLB if your AWS environment is comprised of clearly defined services that can each be mapped to a specific address.
However, if you have a microservice architecture or a container-based infrastructure, you may want to migrate from CLB to the newer types of Elastic Load Balancing — ALB or NLB. That said, before migrating, it’s essential to understand the differences between and benefits of the new types of ELB.
As mentioned above, ELB distributes the traffic between EC2 instances within single or multiple target groups. It scales as traffic to your application changes over time and can scale to most workloads automatically.
In this illustration, you can see the traffic distribution with ELB:
The main advantages of ELB are:
Let’s compare ELB types by some of their features. (You can see the complete comparison in the official AWS Elastic Load Balancing product description.)
CLB | ALB | NLB | |
---|---|---|---|
Protocols | TCP, SSL/TLS, HTTP, HTTPS | HTTP, HTTPS | TCP, TLS |
Performance (a higher number is slower): the ability to handle more traffic | 2 | 3 | 1 (fastest) |
Host/Path-based routing | No | Yes | No |
Sticky Session (for session-based applications) | Yes (redirect to the same machine) | Yes (redirect to the same target) | No |
Static/Elastic IP | No | No | Yes |
Load balancing to multiple ports on the same instance | No | Yes | Yes |
Configurable idle connection timeout | Yes | Yes | No |
Based on the official comparison, here’s an illustration showing the features that the three types of ELBs have in common, and the features that are unique to each ELB type:
As you can see, ALB and NLB support almost all the features of CLB, except for:
That said, you will derive more benefits by migrating from CLB to ALB or NLB, including host/path-based routing and containerized applications (Amazon ECS).
Before we talk about the migration path, it’s worth mentioning that, unlike CLB, ALB doesn’t support Layer 4 protocol, the transport layer that describes the Transmission Control Protocol (TCP) connection between the client and your back-end instance, through the load balancer. To support Layer 4 protocol, you need to use NLB for layer load balancing.
Here are some migration strategies for migration from ELB to ALB or NLB:
Before the migration, we recommend that you generate the AWS CloudFormation template from your existing ELB by using CloudFormer, a template creation tool that creates a CloudFormation template from existing AWS resources in your account. Currently, this AWS service is a beta. It may help you to roll back from the new ELB, if necessary.
Decide which new load balancer to migrate to:
The Migration Wizard helps you create an ALB or an NLB with a configuration that is equivalent to your CLB. With the Migration Wizard, there’s no need for you to do step-by-step configuration. It enables you to:
After the migration, you can configure the advanced features offered by the new load balancer. You can access the Migration Wizard from the Migration tab in the console for a CLB.
You can find the complete guide in the official AWS Elastic Load Balancing documentation.
If for some reason you want to roll back to the previous ELB, we recommend that you wait for several days to make sure everything is working properly before deleting your previous ELB. Why?
We recommend that you consider the following factors when deciding on the best type of AWS Elastic Load Balancing for your business.
Need help with AWS Elastic Load Balancing? The nClouds team is here to help with that and all your AWS infrastructure requirements.
Top takeaways: AWS Managed Microsoft AD and Microsoft Active Directory
2022-12-05 15:25:16