So now let's talk about the Network Load Balancer.
So it's a Layer four load balancer, and therefore
it allows you to deal with TCP and UDP traffic.
Okay, this is lower level.
Layer seven was HTTP,
and layer four is going to be TCP and UDP traffic.
So these work for Network load balancer
and therefore when in the exam you see UDP,
think Network load balancer or even TCP.
Okay, also on top of it, the Network load balancer,
is really, really high performance
and therefore it can handle
millions of requests per seconds.
And the latency compared to
the Application load balancer is lessened.
That means you get around a hundred milliseconds
versus 400 millisecond for the ALB.
Now another specificity of the Network low balancer
is that it only has one static IP per availability zones,
and you can assign an Elastic IP to each AZ.
So this is very helpful when you need to
expose your application with a set of static IPs
and this can be Elastic IPs.
So when the exam you say,
"Hey your application can only be accessed
within one, two, or three different IPs".
Then you need to think about
the Network load balancer as an option.
So if you see extreme performance, TCP, or UDP,
or static IPs think Network load balancer.
Now using it is not included in the AWS free tier.
So let's have a look at how that works.
So it works very similarly to the Application load balancer.
We create target groups
and then the Network load balancer will redirect to them.
So we can use, for example, the TCP traffic,
or for example in the backend HTTP,
but still in the front end use TCP.
So what about the target groups?
This is the important parts.
So the target groups can be EC2 instances.
That means that your Network load balancer
can redirect to your EC2 instances
and send TCP or UDP traffic to them
but you can also register IP addresses,
and these IP addresses when they're hardcoded,
and they must be hardcoded,
they must be private IPs.
So why would you do this?
Well, you can, of course send the private IP
of the EC2 instance that you own,
but also you could use the private IP of a server
that you have in your own data center.
And therefore both of them can be fronted
by the same Network load balancer.
And it's also possible for you
to have a Network load balancer
in front of an Application load balancer.
So in that case, the NLB is in front of your ALB.
So why would you do this?
Well, thanks to the Network load balancer,
you would get for example, the fixed IP addresses,
and then thanks to the Application load balancer,
you can get all the rules
that you have around handling HTTP type of traffic.
So it is a valid combination.
Now, one last thing you need to know for the exam,
is that the health checks
performed by the Network load balancer target groups
are support three different kind of protocols.
They support the TCP protocol, the HTTP protocol,
and the HTTPS protocol.
So if your backend application
supports the HTTP or HTTPS protocol,
then it is definitely possible for you
to define a health check on these protocols.
Okay, so that's it for the Network load balancer.
I hope you liked it.
And I will see you in the next lecture.