Amazon AWS Certified Advanced Networking Specialty – Load Balancer Section

  • By
  • January 16, 2023
0 Comment

1. Different Load Balancer Types in AWS

Hey everyone and welcome back to the Kplabs course. So in today’s lecture we will be discussing about the load balancer types which are available in AWS. So many years back there was only one single load balancer type which was the classic load balancer which was available. But as soon as the time went by, AWS actually launched various other types of load balancers which came to be an improvement over the classic load balancers.

And this is the reason why it is important to understand various types of load balancer and its associated use cases. So as of now, AWS currently offers three major type of load balancers. First is the classic load balancer, second is the network load balancer and third is the application load balancer. So classic load balances were really the old generation load balancers and they are only recommended to use if and if you have instance within the EC to Classic.

And If you do not have, then it is really recommended that you move or you migrate to either application or the network based load balancer. So in order for us to understand the comparison, we’ll actually go into the official documentation link. I just don’t want to copy paste the same thing over again. So you see there are three type of load balancers. So classic load balancer as we’ve already discussed that if you have an instance within the EC to Classic network then this is something which is very useful. However, if not, then you can either migrate to application or the network based load balancers.

And So if you look into the feature set of Classic load balancer and you look into the feature set of application load balancer so the features which are present in classic load balancer, all of those features are present in the application load balancer. Now, one thing which is not supported in application load balancer is the TCP protocol. So that is actually for that you have the network based load balancer which is available.

And Now there are a few interesting comparison that I would like to show you in this lecture. One is the introduction of static and elastic IP addresses. So this was one of the very requested features. So earlier during the classic load balancers you just had the CNAME and the IP address of the load balancer kept on changing and that used to be a big pain. Now network load balancer actually offers you a static IP which is a quite an interesting thing to do and a lot of organizations are actually using network load balancer because of this specific feature of static IP. Now again, application load balancer has a lot of advantages and instead of just showing you this feature sets, what we’ll be doing is we’ll be dedicating individual lecture for each of this load balancer and we’ll be discussing in detail with practical related to what these load balancers are.

And So before we conclude this lecture, I just wanted to show you that I have a Classic Load Balancer and AWS actually offers you a migration plan where you can migrate your Classic Load Balancer to the application Load Balancer. So this is a migration plan if you intend to do so. If you’re using Classic Load Balancer for the layer seven to serve the websites based on http https protocol application Load Balancer is really amazing. So anyways, we’ll be discussing more about this in the upcoming lectures. So when you go ahead and click on Create Load Balancer, you see there are three type of load balancers which are created and Classic Load Balancer is in the gray area. So all the newer features which AWS releases, none of the new features are for classic. All the new features which AWS releases, they are either for Network and for application. So this is like Windows XP. However, these two are like windows. Ten. The latest features, the latest updates comes here.

2. Overview of Classic Load Balancer

Hey everyone and welcome back to the KP Labs course. So in today’s lecture we’ll go ahead and look into the overview about the classic load Balancers which are also generally referred as the first generation of load balancers in AWS. So the classic load balancers are the older generation of load balancer which were provided by AWS, which works both for the instances which are part of the VBC, as well as the instances which are part of the EC to Classic network. Now, classic Load balancers, they provide the basic set of features for all the protocols which can be http, https, TCP and SSL. So it’s like the basic load balancer functionality, it provides for all the protocols, so it provides the basic. But there are a lot of necessary functionality which are not supported by the classic load balancers. Those functionalities are now ported to a newer generation of load balancers which are application or the network load balancers. So let’s look into how we can implement the classic load Balances. So for the demo purpose I have two instance.

And One is kplab one and second is kplab two. So if I just quickly open the kplabs one I put in the IP address. You see I have a default page which is installed. So we’ll do the same thing for the KP lab two so that even you can get familiar on how I manage to do that. So I’m connected to the kplab two, we’ll quickly install the NGINX package. Perfect. So the default document route is in user share NGINX HTML. And if you quickly go ahead and edit the index HTML, go a bit down and this is where we are interested in. So just quickly replace the NGINX with server two and I’ll remove the latter part. Perfect. So once you’ve edited this, just start the NGINX and once the NGINX has started, just open up the IP address and verify if you are able to see the NGINX page. Perfect. So now you have the server one, you have the server two. Great, so we are in the good start for the practical Labs. So now let’s go to the load balancer. Now. Click on create, load, balancer. Now there are three type of load balancer. Let’s begin with the classic load Balancer. In today’s lecture, I’ll name this as Kplabs Hyphen classic.

And The VPC in which this load balancer needs to be present should be the same VPC where we have our instances. So the Kplabs instance is in VPC 583, so I’ll just select the VPC. Perfect. So that is the default VPC. Now the load balancer protocol. As we already discussed, this is like a basic load balancer which supports all the protocol. We’ll use the Http protocol for the time being. Let’s assign a security group. Or let’s create a new security group so where port 80 is open for everyone. Hell check would be on index HTML and let me change the interval to ten let’s add the EC to instances and it seems that it is showing all the servers as thought which is quite interesting. So the reason why this is happening is because of the cache functionality. So in case you get something similar kind of error just sign up and log in again. So I still remember one of my colleague, he came running at us saying that things are really acting weird in AWS and all it needed was to remove the cache from his browser and things seems to be working perfectly anyway. So let’s come back to the topic. I’ll go to the load balancers.

And Let’s create a load balancer again. I’ll name it KP Labs Hyphen. Classic. Same Http protocol security group. I’ll just say? KP Labs hyphen classic. Let me change the interval to 10 seconds. Great.

And Now you see the older entries are remote. Great. So we actually learnt one out of topic things which can be very useful. So click on Add, I’ll select Review, and I’ll click on Create. Perfect. So the load balancer has been created and this is our load balancer. So let’s wait for a minute or two. So currently the instances are out of service so it will take a little time for the instance to come under service. So before we do that we have to make sure that the load balancer can connect to the EC two instance. So let’s look into the security group of the EC two instances and the security group doesn’t seem to be allowed. So just allow on port 80 for everyone. Perfect. Let’s verify the security group is the same. Perfect. So let’s just wait for a minute and the status should be in service. Perfect. So the status of the instances are now up. So now if you go to the description this is the DNS name which is associated with the classic elastic load balancer. I’ll copy the DNS name, let me put it in the browser and now you see I am able to connect to both the servers. So you see it is actually switching between server one and server two. So this is what classic load balancer is all about.

And So this is the pretty much the features which Classic Load Balancer supports. So just the health checks and the listeners and the monitoring. Now if you look into the migration, AWS actually recommends that you migrate to the application load balancers. So there are certain reasons why AWS actually asks you for that. So first is that Classic Load balancer they do not support the native Http two protocol so that is only supported by the application load balancer. Now there are a few interesting things like IP address as targets are also not supported.

And So IP address are targets really means that in the classic Load balancer we generally select which easy to instance we want to put it under the load balancer. But the application load balancer actually supports the IP address as the target. So instead of EC two instance you can put the IP address and that IP address can be in on premise or even in different locations, so it necessarily not be in AWS and that is a really interesting thing. Third, which is a quite important feature that is path based routing is not supported. So for example, if you want that images Uri should go to server one and whenever a request is made to PHP, it should go to server two. So these type of path based routing is not supported. SNI extensions are also not supported and nowadays during the generation of Dockers, the Classic load balancer does not support multiple ports on the same instances and there are a lot of other features which Classic load balancer do not support. So this is it about the overview about Classic load balancers in the relevant sections we’ll be discussing more about the application load balances and we’ll look into how good the application load balancer is when compared to the Classic load balancer. Thanks, thanks for watching.

3. Overview of Application Load Balancer

Hey everyone and welcome back to the KP Labs course. So in today’s lecture we’ll discuss about the application load balancers and we’ll have a little demo related to how a LB really works. So as we’ve already discussed, application load balancers are one of the next generation load balancers which have been provided by AWS. So since this is the application load balancers, they support the Http as well as the Https protocol. So there are a lot of new features which are in ALB when compared to that of classic load balancer. Some of them are path based routing, host based routing, you can register servers based on IP addresses, you have the SNI support, you also have load balancing to multiple ports within the same instance. So this is very useful for docker containers and lot of other features. So instead of giving you the entire feature list, what I actually decided to do is let’s take some of the features and look into great detail because that is something which will give you much more better understanding instead of just plain list and comparison table.

And So we’ll discuss about this very interesting path based routing which is also quite useful. So what exactly path based routing is all about? So the requests are routed based on the Uri path. So for example, whenever a request comes, let’s say example coinages, we can see to the load balancer that whenever the path of images images Uri is present then send that request to the server one. So you have one more example where you have the path of slash work. So whenever a load balancer whenever the application load balancer finds slash work into the Uri, then it will forward that request to the server too. So this is what is meant by the path based routing. So let’s understand this with a simple diagram where you have two servers over here and you have the application load balancer which is connected to both of the servers.

And Now whenever a user visits the domain and puts something like slash images, then the application load balancer will automatically send that request to the server one which is configured. However, when a user puts slash work in the Uri, it will automatically go to the server two. So this is called as a path based routing and it is handled completely by the application load balancer. So I just give you one of the demo on how exactly that would look like. So I have two servers which are configured and in one of the server I have slash images and in the second server I have a path of slash work. So let me show you on what exactly I mean by this. So this is just for a demo, so you can just watch it for the time me and when necessary we’ll implement it.

And So this is the Kplab one server. So this is the one server where I have a directory called images so I’ll copy the public IPV four and if I go to Slash images Galaxy Jpg, I have a wonderful andromeda Galaxy over here. So this is really amazing. Whenever I see universe, the photos of galaxies with like millions of stars, it really mind bloggers on what we are actually doing in our life. Such a big universe. Anyways, coming back to the topic, so this is the first server. In the second server I have the directory of slash work. So this is the second server.

And So when I do Work TXT, you see I have I like work and no travel. So these are the two servers and the two Uri paths which are associated with each one of them. Now, coming back to the interesting part, I have an application load balancer which is in the state of active. So within this application load balancer so this is the Uri for the application load balancer. Now, whenever I put Images Galaxy Jpg, what will happen is the request will hit the application load balancer. So this request will hit the application load balancer. The application load balancer will look into the Uri path. So here the path is Slash images. So as soon as it’s fine images it will forward it to the server one. So when I press Enter, you see I automatically got the Galaxy photo.

And Now let’s try one more. This time I’ll put Work TXT and again as soon as the application load balancer finds that there is a Uri of work, it will automatically send it to the second server. So when I press Enter over here, you see I like work and no trial. So this is what the path based routing is all about. Now, we have actually done quite interesting things along with the application load balancer. So let me just show you. So within the target groups, you see I have actually registered IP as the target state of the instances. Anyways, we’ll take a feature one by one.

And If we discuss everything together, it will become a bit confusing. So this is it about the high level overview about the application load balance and it’s one feature which is the path based routing. So this is it and in the upcoming lecture we’ll actually go ahead and implement a new application load balance and we’ll look into how exactly things work. This is it and I look forward to seeing you in the next lecture.

Comments
* The most recent comment are at the top

Interesting posts

The Growing Demand for IT Certifications in the Fintech Industry

The fintech industry is experiencing an unprecedented boom, driven by the relentless pace of technological innovation and the increasing integration of financial services with digital platforms. As the lines between finance and technology blur, the need for highly skilled professionals who can navigate both worlds is greater than ever. One of the most effective ways… Read More »

CompTIA Security+ vs. CEH: Entry-Level Cybersecurity Certifications Compared

In today’s digital world, cybersecurity is no longer just a technical concern; it’s a critical business priority. With cyber threats evolving rapidly, organizations of all sizes are seeking skilled professionals to protect their digital assets. For those looking to break into the cybersecurity field, earning a certification is a great way to validate your skills… Read More »

The Evolving Role of ITIL: What’s New in ITIL 4 Managing Professional Transition Exam?

If you’ve been in the IT service management (ITSM) world for a while, you’ve probably heard of ITIL – the framework that’s been guiding IT professionals in delivering high-quality services for decades. The Information Technology Infrastructure Library (ITIL) has evolved significantly over the years, and its latest iteration, ITIL 4, marks a substantial shift in… Read More »

SASE and Zero Trust: How New Security Architectures are Shaping Cisco’s CyberOps Certification

As cybersecurity threats become increasingly sophisticated and pervasive, traditional security models are proving inadequate for today’s complex digital environments. To address these challenges, modern security frameworks such as SASE (Secure Access Service Edge) and Zero Trust are revolutionizing how organizations protect their networks and data. Recognizing the shift towards these advanced security architectures, Cisco has… Read More »

CompTIA’s CASP+ (CAS-004) Gets Tougher: What’s New in Advanced Security Practitioner Certification?

The cybersecurity landscape is constantly evolving, and with it, the certifications that validate the expertise of security professionals must adapt to address new challenges and technologies. CompTIA’s CASP+ (CompTIA Advanced Security Practitioner) certification has long been a hallmark of advanced knowledge in cybersecurity, distinguishing those who are capable of designing, implementing, and managing enterprise-level security… Read More »

Azure DevOps Engineer Expert Certification: What’s Changed in the New AZ-400 Exam Blueprint?

The cloud landscape is evolving at a breakneck pace, and with it, the certifications that validate an IT professional’s skills. One such certification is the Microsoft Certified: DevOps Engineer Expert, which is validated through the AZ-400 exam. This exam has undergone significant changes to reflect the latest trends, tools, and methodologies in the DevOps world.… Read More »

img