Hi, everyone, and welcome back.
Now into this video, we are going to explore the network load balances.
Now at a high level overview, it is important for us to note that the network load balancer works on
the fourth layer of the OSI model.
So if you look into the US model, you have physical data, link, network and transport.
So transport is the layer where the network load balancer operates.
And this is one of the reasons why the NLP also supports some of the protocols that are part of the
transport layer, which is TCP, UDP as well.
Now one of the great benefits of the network load balancer is that it can handle millions of requests
per second and any use cases related to ultra high performance that you require as part of the load
balancer and is the right choice there.
Now just to revise, I have a packet captured associated with a request that had loaded a website.
Now within this is basically the HTTP protocol based request that we see over here.
Now when we discuss about the application load balancer, since it supports the HTTP protocol, the
application load balancer can also go ahead and it can read the contents of various headers like the
user agent header, the host header, the request method and so on.
Now since the network load balancer does not work on layer seven, it does not really have any control
over this.
So you'll not be able to perform any actions based on the content of the HTTP headers.
So let's do one thing.
Let's go ahead and directly jump with the practicals now for today's video.
I already have an easy two instance that is configured.
The name is LP Hyphen Instance and I have installed Engine X Web server on top of this.
So if I copy the public IP and if I add it to the browser as expected, we are getting the default engine
page.
Now going back to our EC2 console, let's open up the load balances and this time you can go ahead and
create a network load balancer.
Before we do that, let's also go ahead and create a target group and we'll be creating a target group
for the network load balancer will be choosing the target type instances.
And note that in the protocol, if you want to associate this target group with a network load balancer,
you have to make use of a specific protocol like TCP, UDP, which the NHLBI supports.
So I'll be using the protocol of TCP and the target group name.
I'll just call it as a nhlbi hyphen tag so that we can identify this.
Once this is done, you can click on Next.
You can register your target.
Once this is done, you can go ahead and create the target group.
Great.
So our target group is created.
Now let's go to the load.
Balancers will create a new load balancer.
The load balancer type this time will be selecting network load balancer will click on create in the
load balancer name I'll just call it is demo, hyphen and LP.
Once this is done, let's go a bit down.
Make sure that this is an internet facing load balancer will go a bit down.
You can go ahead and select the availability zones here.
So in the Node California region, this is the configuration.
Let's go a bit down within the target group.
Over here are an LP target group is appearing over here.
Let's select this now.
Again, at this stage, one more important thing to note is that we had two target groups, if you remember.
In fact, let me quickly show you once more.
So within the SC two console, let's go to target groups.
We had two target groups over here.
However, when we select this dropdown, only one target group is appearing primarily because of this
protocol.
As we already know, I have one more target group here.
College Demo, hive DC and the protocol here is the HTTP.
Now we know that the network load balancer does not support the HTTP protocol directly, and this is
one of the reasons why only the target group associated with the transport layer is something that will
be appearing here.
Once you have done that, you can click on Create Load Balancer.
All right.
So our load balancer is created.
Let's click on View Load Balancer.
And at this stage it is in the provisioning state.
Now, one important thing specifically for the network load balancer is that you will not be able to
associate a security group with it.
So if you look into these options over here, there is no security group related options in the network
load balancer.
This is one important thing to note.
So let's do one thing.
It is still in the provisioning state.
Let's quickly wait for a minute or two and we'll resume once it's ready.
All right.
So it has been a minute and a load balancer is currently active.
So let's copy the DNS name and from a newer tab, let's add this DNS here and here.
Our default engine space is working perfectly well.
Now again, as we're discussing that the analogy works at the transport layer, you will not really
see those fancy listener rules that you will typically see at the application load balancer level.
So you have a simple TCP rule based on it that you can forward it to the certain target groups.
All right.
So this is the basics of the network load balancer.
Again, once we have completed with the practical, make sure that you delete the load balancer so that
you do not really get the surprise bill at the end of the month.
Now, a few important things to note here is that the network load balancer primarily selects the target
using a flow hash algorithm.
And this low hash algorithm is based on certain constraints like protocol, source IP, source port,
destination IP, destination port as well as the TCP sequence number.
So this would primarily mean that each individual TCP connection will be routed to a single target for
the lifetime of the connection.
So with this will conclude today's video.