1 00:00:00,210 --> 00:00:03,570 So now let's talk about the Network Load Balancer. 2 00:00:03,570 --> 00:00:06,210 So it's a Layer four load balancer, and therefore 3 00:00:06,210 --> 00:00:10,680 it allows you to deal with TCP and UDP traffic. 4 00:00:10,680 --> 00:00:11,820 Okay, this is lower level. 5 00:00:11,820 --> 00:00:13,980 Layer seven was HTTP, 6 00:00:13,980 --> 00:00:17,730 and layer four is going to be TCP and UDP traffic. 7 00:00:17,730 --> 00:00:21,060 So these work for Network load balancer 8 00:00:21,060 --> 00:00:24,450 and therefore when in the exam you see UDP, 9 00:00:24,450 --> 00:00:26,970 think Network load balancer or even TCP. 10 00:00:26,970 --> 00:00:31,170 Okay, also on top of it, the Network load balancer, 11 00:00:31,170 --> 00:00:33,210 is really, really high performance 12 00:00:33,210 --> 00:00:34,680 and therefore it can handle 13 00:00:34,680 --> 00:00:36,960 millions of requests per seconds. 14 00:00:36,960 --> 00:00:38,730 And the latency compared to 15 00:00:38,730 --> 00:00:41,520 the Application load balancer is lessened. 16 00:00:41,520 --> 00:00:43,170 That means you get around a hundred milliseconds 17 00:00:43,170 --> 00:00:46,290 versus 400 millisecond for the ALB. 18 00:00:46,290 --> 00:00:50,280 Now another specificity of the Network low balancer 19 00:00:50,280 --> 00:00:54,810 is that it only has one static IP per availability zones, 20 00:00:54,810 --> 00:00:59,280 and you can assign an Elastic IP to each AZ. 21 00:00:59,280 --> 00:01:00,900 So this is very helpful when you need to 22 00:01:00,900 --> 00:01:05,550 expose your application with a set of static IPs 23 00:01:05,550 --> 00:01:07,590 and this can be Elastic IPs. 24 00:01:07,590 --> 00:01:08,497 So when the exam you say, 25 00:01:08,497 --> 00:01:10,620 "Hey your application can only be accessed 26 00:01:10,620 --> 00:01:13,530 within one, two, or three different IPs". 27 00:01:13,530 --> 00:01:14,970 Then you need to think about 28 00:01:14,970 --> 00:01:18,450 the Network load balancer as an option. 29 00:01:18,450 --> 00:01:22,380 So if you see extreme performance, TCP, or UDP, 30 00:01:22,380 --> 00:01:25,950 or static IPs think Network load balancer. 31 00:01:25,950 --> 00:01:30,950 Now using it is not included in the AWS free tier. 32 00:01:31,080 --> 00:01:32,490 So let's have a look at how that works. 33 00:01:32,490 --> 00:01:37,140 So it works very similarly to the Application load balancer. 34 00:01:37,140 --> 00:01:39,150 We create target groups 35 00:01:39,150 --> 00:01:43,200 and then the Network load balancer will redirect to them. 36 00:01:43,200 --> 00:01:47,760 So we can use, for example, the TCP traffic, 37 00:01:47,760 --> 00:01:50,280 or for example in the backend HTTP, 38 00:01:50,280 --> 00:01:52,263 but still in the front end use TCP. 39 00:01:53,910 --> 00:01:55,770 So what about the target groups? 40 00:01:55,770 --> 00:01:57,450 This is the important parts. 41 00:01:57,450 --> 00:02:00,390 So the target groups can be EC2 instances. 42 00:02:00,390 --> 00:02:02,580 That means that your Network load balancer 43 00:02:02,580 --> 00:02:05,130 can redirect to your EC2 instances 44 00:02:05,130 --> 00:02:08,460 and send TCP or UDP traffic to them 45 00:02:08,460 --> 00:02:11,160 but you can also register IP addresses, 46 00:02:11,160 --> 00:02:13,560 and these IP addresses when they're hardcoded, 47 00:02:13,560 --> 00:02:14,910 and they must be hardcoded, 48 00:02:14,910 --> 00:02:16,860 they must be private IPs. 49 00:02:16,860 --> 00:02:17,820 So why would you do this? 50 00:02:17,820 --> 00:02:21,270 Well, you can, of course send the private IP 51 00:02:21,270 --> 00:02:23,700 of the EC2 instance that you own, 52 00:02:23,700 --> 00:02:26,970 but also you could use the private IP of a server 53 00:02:26,970 --> 00:02:28,920 that you have in your own data center. 54 00:02:28,920 --> 00:02:31,710 And therefore both of them can be fronted 55 00:02:31,710 --> 00:02:34,023 by the same Network load balancer. 56 00:02:34,950 --> 00:02:36,510 And it's also possible for you 57 00:02:36,510 --> 00:02:37,860 to have a Network load balancer 58 00:02:37,860 --> 00:02:41,010 in front of an Application load balancer. 59 00:02:41,010 --> 00:02:45,120 So in that case, the NLB is in front of your ALB. 60 00:02:45,120 --> 00:02:46,800 So why would you do this? 61 00:02:46,800 --> 00:02:49,020 Well, thanks to the Network load balancer, 62 00:02:49,020 --> 00:02:52,380 you would get for example, the fixed IP addresses, 63 00:02:52,380 --> 00:02:54,960 and then thanks to the Application load balancer, 64 00:02:54,960 --> 00:02:56,460 you can get all the rules 65 00:02:56,460 --> 00:02:59,940 that you have around handling HTTP type of traffic. 66 00:02:59,940 --> 00:03:02,220 So it is a valid combination. 67 00:03:02,220 --> 00:03:04,050 Now, one last thing you need to know for the exam, 68 00:03:04,050 --> 00:03:05,880 is that the health checks 69 00:03:05,880 --> 00:03:09,450 performed by the Network load balancer target groups 70 00:03:09,450 --> 00:03:12,870 are support three different kind of protocols. 71 00:03:12,870 --> 00:03:17,100 They support the TCP protocol, the HTTP protocol, 72 00:03:17,100 --> 00:03:19,560 and the HTTPS protocol. 73 00:03:19,560 --> 00:03:21,330 So if your backend application 74 00:03:21,330 --> 00:03:24,480 supports the HTTP or HTTPS protocol, 75 00:03:24,480 --> 00:03:26,070 then it is definitely possible for you 76 00:03:26,070 --> 00:03:30,360 to define a health check on these protocols. 77 00:03:30,360 --> 00:03:32,850 Okay, so that's it for the Network load balancer. 78 00:03:32,850 --> 00:03:33,810 I hope you liked it. 79 00:03:33,810 --> 00:03:35,760 And I will see you in the next lecture.