Network Load Balancers
Network Load Balancers
1h 7m

This course provides detail on the AWS Networking and Content Delivery services relevant to the Developer - Associate exam.

Want more? Try a lab playground or do a Lab Challenge!

Learning Objectives

  • Understand the basics of APIs
  • Learn about HTTP and internet communication
  • Understand the difference between HTTP and REST
  • Understand what types of APIs API gateway can create
  • The general differences between those API types
  • How an API gateway functions at a high level
  • Give you an understanding of Amazon CloudFront and its high-level process of operation
  • Understand what an elastic load balancer is and what is used for
  • Be aware of the different load balancers available to you in AWS
  • Understand how ELBs handle different types of requests, including those that are encrypted
  • Be able to identify the different components of ELBs
  • Know how to configure ELBs 
  • Know when and why you might need to configure an SSL/TLS certificate



Hello and welcome to this lecture focusing on the network load balancer and its configuration. 

Between the ALB and the NLB, the principles are the same as to how the overall process works, so to load balance incoming traffic from a source to its configured target groups. However, whereas the ALB work to the application level analyzing the HTTP header to direct the traffic, the network load balancer operates at Layer 4 of the OSI model enabling you to balance requests purely based on the TCP and UDP protocols. As such, a request to open a TCP or UDP connection is established to load balance the host in the target group. The listener supported by the NLB include TCP, TLS and UDP. The NLB is able to process millions of requests per second making the NLB a great choice if you need ultra high performance for your application. Also if your application logic requires a static IP address, then the NLB will need to be your choice of elastic load balancer. Unlike the application load balancer that has cross-zone load balancing always enabled, for the NLB this can either be enabled or disabled. When your NLBs are deployed and associated to different availability zones, an NLB node will be provisioned in these availability zones. The node then uses an algorithm which uses details based on the sequence, the protocol, source port, source IP, destination port and destination IP to select the target in that zone to process the request. When a connection is established with a target host, then that connection will remain open with that target for the duration of the request. Let me now provide a demonstration on how to configure and set up a network load balancer. 

As you can see, I'm in the AWS management console. So to create our network load balancer, let's go to EC2 under Compute. Then if we go down the left-hand side again under Load Balancing, click Load Balancers, we can see here our existing application load balancer we created before. So let's click on Create Load Balancer and this time we're going to create a network load balancer. So click on Create. And again, it's very similar configuration to the application load balancer. So let's firstly give it a name. Let's call this DNS-NLB. This time we'll have it internal facing. For our listener, let's select the UDP protocol and the load balancer port is port 53 which is DNS. Again, we can select our availability zones where we want our load balancer to reside. So under eu-west-1a, let me select that subnet. And on the b, that one there. Next, configure security settings. Again, we receive this message because we're not using a secure listener and for this demonstration that's okay. Configure routing, now we need to associate our target group. Let's create a new target group this time and we'll call this DNS. For the target type, I shall leave as instance. We have our port and protocol there. Health checks under TCP. And if you wanted to, you can make any changes to your advanced health check settings there. Next, click on Register Targets. As we can see, we don't have any registered targets as yet. If I scroll down, I can see I have one instance here so I'm going to add that to the registered list of targets. Once that's been added, click on Next Review. Once you're happy with all your configuration settings, click on Create. And there you have it. Your network load balancer is now created. We can see here provisioning which is our network load balancer. This is our previous application load balancer that we created earlier. So it's a very similar process with different ports and protocols available between the load balancers. And that's the end of this demonstration.

About the Author

William Meadows is a passionately curious human currently living in the Bay Area in California. His career has included working with lasers, teaching teenagers how to code, and creating classes about cloud technology that are taught all over the world. His dedication to completing goals and helping others is what brings meaning to his life. In his free time, he enjoys reading Reddit, playing video games, and writing books.