Automate Marketing Initiatives with Salesforce Marketing Cloud Learn More

AWS is Retiring the Classic Load Balancer: What’s Next?

Abhay

Patidar

Published On:

Today to match the fast-growing pace of the world everybody wants to launch their business as soon as possible to hit the market on time. This requires technology with more flexibility and features that can help your products and services capture the market as quickly as possible. At the same time, it should be easy to maintain and scale as the user base grows. That’s where we prefer cloud services, where a feature-rich cloud platform provides you an all the components to deploy your IT product or service. Amazon Web Services AWS is one of the Cloud services market leaders and it always keeps adding and improving its services. As AWS add new services, they do discontinue a some services or launch an updated version of the same. Few months back AWS decided to discontinue their EC2 classic load balancer from AWS load balancer and through this article you will come to know why.

 

In March 2006 Amazon launched its cloud services that we all know as AWS. It starts with only one type of instance i.e. m1.small, one region us-west, and one type of flat network i.e. EC classic network. After the launch of the first version service, AWS kept on adding new services. Considering the user demands and evolution of new technologies also required them to deprecate some of their legacy services e.g. AWS server migration service and recently CLB in AWS Elastic Load Balancer on 15 August 2022.

Why Classic Load Balancer is Discontinued?

Before going too deep and exploring different alternatives and better options to replace our Classic Load Balancer, let’s first understand what actually means the discontinuation of CLB here. It is basically Classic Load Balancer with EC2 classic being discontinued not the whole classic load balancer service. In simple terms, while launching the CLB you will not get the option to use EC2 classic instances rather you will get the option to select a VPC.


How to Migrate?

Before we actually start discussing all the migration options know how to migrate your Classic Load Balancer. Let’s first list the steps that need to be followed to be sure that the new system is completely up and running and is ready to serve all our user base and features without any surprising issues because of migration. We can follow the below steps for a safer migration –

  1. Setup a new load balancer, by following one of the migration options.
  2. Start redirecting the traffic gradually to the new load balancer.
  3. Create all the required roles, and policies and make the necessary code updates in your application/deployment scripts e.g. CI/CD tools.
  4. Once it works fine with 70% of the traffic routed to it then we can delete the old load balancer i.e. CLB.
Now let’s explore different possible migration options
  1. Using Migration wizard in AWS console.
  2. Load balancer copy utility from Github (URL??).
  3. Using manual migration to the application or Network Load Balancer.
  4. Using manual migration to a Classic Load Balancer with VPC.

After seeing the above four options you might be thinking that there are a number of articles online that describe all the above four options and also explains them in detail. Yes, you are correct and I do not have any problem accepting it. The value that I want to bring here is every option provided above has certain challenges with it and some of the options e.g. option 1 and 2 it not as straightforward as it seems from the fancy word like wizard/utility inside it.

 

And the main concern is the CLB should be in the VPC, I still see the steps not defined clearly, they already assume a solution before they actually solve the problem, and they do not address the issue of how to migrate from EC2 classic to ALB or NLB directly rather they give you a next-level option where they expect you to migrate to ALB or NLB considering you might have already migrated you EC2 classic to VPC. But what about this first step here i.e EC2 classic to VPC and what is recommended as a way to follow it and address different challenges in this. Going forward to address the main challenge, first I would list down the blockers we need to consider to do it –

  1. Migrating EC classic to VPC instance.
  2. What if we have both application and network layer rules in our CLB i.e. HTTP/HTTPS or TCP. The migration wizard to ALB will only consider HTTP/HTTPS once and to NLB it will only consider TCP.

Now let’s Discuss Both of Them in Detail

 

1. Migrating EC2 Classic to VPC Instance

  1. Create a new VPC with at least two subnets in it. Now, create subnets in the availability zone you want your new EC2 resource to distribute the load by ELB.
  2. Create a new security group and copy the rules from your existing security group to the new sg.
  3. Create AMI of the old EC2 classic resources and launch new resources using these AMIs. Make sure to attach the new instance to the same VPC we created in step 1.
  4. Assign the security group and subnet created previously to the new instance.
  5. Create a new classic load balancer by selecting the VPC in step 1. And one subnet from each availability zone containing the instance that you plan to register with the new VPC CLB.
  6. Register new instances with the new CLB. Make sure to add tags if any from previous Ec2 classic CLB.
  7. Update your DNS record, if your DNS server supports a weighted feature to route the requests like Route53 then gradually load transfer is recommended e.g. first only transfer 10% of the traffic to the new LB then 50% then 100%.

2. Handle Both HTTP and TCP Listeners/Rules

Once you are done with this you can use approaches like migrate wizard or GitHub copy utility or manually migrate to ALB. Or even NLB to move your existing VPC CLB to ALB or NLB. While doing this we will face another challenge i.e how to route the rules if CLB contains both HTTP and TCP-based rules. None of the next-generation AWS LB supports both.

 

ALB supports HTTP and NLB supports TCP rules. Considering this fact we need to make changes in our applications to listen over HTTP APIs instead of TCP sockets if we want to migrate to ALB. Or converting APIs to TCP socket if we want to migrate to NLB. And it depends on the type of your application, if it’s more of Rest APIs then ALB is preferred. Another way is to adopt a hybrid approach where registering different subdomains for TCP rules and using NLB to route TCP-based requests. The flexibility to register the same set of instances behind both NLB and ALB gives us the choice to use the same instance. Even though we use a hybrid approach. We can consider the below image for an overview diagram of the above explanation.

A place for big ideas.

Reimagine organizational performance while delivering a delightful experience through optimized operations.

 

 

In the above article rather than describing the actual steps of migration I tried to make it even simpler. I rearranged the steps and completed the flow from EC2 classic CLB to VPC CLB. And then further advancing it to the ALB or NLB. Based on the application or deployment you have another more feasible way to address the migration. The main concept I tried to explain here might give you a way forward to take the migration challenge. The article does not actually describe the migration with wizard or Git utility completely. But if you find any good resource covering the migration, please do share the URL in the comment section. If you have any questions, connect with me by writing the question in comments. I will be more than happy to assist you in that.

Let’s
Work
Together

Top Stories

Microsoft Azure Cloud
5 Reasons to Use Microsoft Azure Cloud for Your Enterprise
Cloud computing is the stream of modern computer science technology in which we learn how to deliver different services through the Internet. These services include tools like servers, data storage, databases, networking, and software. Cloud computing is an optimized solution for people and enterprises looking for several benefits, such as
Cloud Computing Platform
What Makes Microsoft Azure a Better Cloud Computing Platform
Microsoft has leveraged its continuously expanding worldwide network of data centers to create Azure cloud, a platform for creating, deploying, and managing services and applications anywhere. Azure provides an ever-expanding array of tools and services designed to fulfill all your needs through one convenient, easy-to-manage Platform. Azure sums up the
Azure Cloud
Things You Should Know About Microsoft Azure Cloud Computing
Microsoft Azure is a cloud computing service provided by Microsoft. Azure has over 600 benefits, but overall, Azure is a web-based platform for building, testing, managing, and deploying applications and services. Azure offers three main functional areas. Virtual machines, cloud services, and application services. Microsoft Azure is a platform for
Microsoft Azure Cloud Computing
What Are the Options for Automation Using Microsoft Azure?
Automation is at the forefront of all enterprise IT solutions. If processes overlap, use technical resources to automate them. If your function takes a long time, find a way to automate it. If the task is of little value and no one needs to work on it, automate it. This
Apache Airflow
How to Create and Run DAGs in Apache Airflow
Apache Airflow is an open source distributed workflow management platform built for data orchestration. Maxime Beauchemin first started his Airflow project on his Airbnb. After the project's success, the Apache Software Foundation quickly adopted his Airflow project. Initially, he was hired as an incubator project in 2016 and later as
Apache Airflow Automation
How Easy is it to Get Started with Apache Airflow?
Apache Airflow is a workflow engine that efficiently plans and executes complex data pipelines. It ensures that each task in your data pipeline runs in the correct order and that each job gets the resources it needs. It provides a friendly UI to monitor and fix any issues. Airflow is

          Success!!

          Keep an eye on your inbox for the PDF, it's on its way!

          If you don't see it in your inbox, don't forget to give your junk folder a quick peek. Just in case. 





              You have successfully subscribed to the newsletter

              There was an error while trying to send your request. Please try again.

              Zehntech will use the information you provide on this form to be in touch with you and to provide updates and marketing.