The goal of this lab is to create Network Load Balancer; but instead using different target group we will use ALB as target group .
Pre-Step 1) You need to have and ALB ready and we have it as follows:
Here is the link for ALB
When you type example.com/video.html it will go to EC2 and after refreshing will show video3 and Video4 (Please see the link for creating ALB lab)
When you type example.com/picture.html it will go to EC2 and after refreshing will show “Pic1” and “Pic2” Pages
Now goal is then when I go to NLB and type example.com/video.html
it will be point to ALB target group that will show Video3; and Video 4
When I go to when I go to NLB and type example.com/picture.html
it will be point to ALB target group that will show Pic1; and pic 2
Step1) So Far we have these target group from last
lab: (see Picture )
Step 2) I need to create a New target group called “ALBTargetGroup”
Step 3) Go Target group and click New target group and pick ALB
Give Name = ALBTargetGroup
Step 4) On next page pick ALB ; then create the target group .
Step 5) Now when you go back to target group page ; you will see nothing under the Load Balancer ; since we have not associate anything in here.
Step 5a) We will create another target group called WindowsTG and will have this info :
Path=/healthy.html ( we must have this file inside my IIS server; it could be also index.html ; as long as we have that file in c:\inetpub\wwwroot\healthy.html
Step 6) Now I will go to Load Balancer and then I will create a new Network load Balancer (NLB)
Step 7) Give Name =NLBwithALB
AZ=US-east-1a and US-east-1c
For listener Then Pick TCP(80) and point to TargetGroup (ALBTargetgroup)
Click Add Listener and pick TCP(8080) and pint to Target Group (WindowsTG)
Step 8) Now when I go to each target group after 5 – 7 mins we will see under the Load Balancer column we have target group.
Step 9) Now when I go to description tab and copy and paste long DNS name ; it will show my result
When I keep refreshing; it will show result Pic1 and Pic 2 page
When I keep refreshing it will show the content of Video 3 and Video 4
So above URL/video.html and URL/picture.html is coming from ALB
Step 10) When I copy and paste long DNS name with port 8080 it should show the content of Windows server IIS page
Step 11) Now after all the target group has been healthy, we should see these on my target group page.
Summary :So we have shown I am using Network Load Balancer with Target Group (ALB) that is pointed to two target group (VideoTG and PictrueTG)
Also we have shown NLB with target group pointed to Windows Content when I use port 8080