Amazon AWS Application Load Balancer (ALB) Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi my name is hamid i'm a certified instructor at asm educational center this is our homepage asme.com if you go to here you see all the courses we offer we offer it courses amazon aws the other courses like microsoft comptail everything like that so uh and also we have a special training package with 700. discount if you're interested please check our website again when you go to amazon aws classes we offer cloud practitioners solution architecture developer professional especially all that so today i'm going to talk one of the topic on on amazon aws certified solution architecture associate so this one eventually what's going to happen it's going to be under this blocks so later on we're going to if you go to amazon aws you will see under this path right here but the topic today i'm going to talk about is called application load balancer aalb let me tell you what we have in these pictures basically what we have we have northern region vpc which i'm going to show you down we have a two subnet we have subnet this this this number is 100 size 16 then we have some at 10 0 0 1 slash 24 that's one public in us is 1a and we have 10.003 the size here is slash 24. okay then inside here we're going to boot up a bunch of instance we're going to have a one instance here we're going to call our linux pic 1 linux pic2 and here we're going to create another instance linux video 3 and linux video 4 then we're gonna put these guys in the groups called target group group one picture and group two video okay so when you type into ips slash picture.html is gonna go to these two guys if you say w ips slash video dot html if you refresh is going to go through here it would load balance between these two gentlemen again before you do that let me show you what we have here if i go back to my console right here uh this is my vpc this is my vpc as you see ff10016 right here they have subnets i just want to show you what i have done that i have a two actually have three subnet this is a public subnet dot three network and dot one network okay and the different availability zone one is the one a and one c okay so that's that one right here there i have clear bar table this is the router we're getting access to internet right here i create that i've done that so this is route tab let's say click zero zero i'm sorry when i click edit this is the local and disappointed to igw that gets out to internet that's that one and also when subnet association and i put both my public subnet inside the router table okay so i've done all of that for us okay so what are we going to do we're going to boot up the four incense on this machine so when i look at my nose here this is what we're going to call them i need four linux machine one is called called linux pick one in one a that's key important they're going to create linux pic2 in 1a okay then we're going to pick another linux linux video 3 on 1c and linux video 1c now what's going to happen when we do this linux i'm going to put some code there okay linux pix1 is going to be called that we're going to create two two files with we did index.html the content we said this is main site of picture one and then we need another file it's called picture.html the content will be that okay then we're gonna create another one linux pics but it's gonna call linux pic2 we're going to have two files there one is called index.html the content will be this main set of picture two and this is going to subdirect for picture.html the content will be picture.3 then we're going to create linux video 3. in linux video 3 we have two files again index.html the content will say that this is the main sort of video 3 and the video html says that the column will be v2.3 then we do another v linux with windows video four inside that we have two file index.html and video.js here okay so what's going to happen when i type in ipad slash index.html i would say the kind of main website but when i type in index slash video i'm going to see the content of this guys when i refresh it okay i see three and four okay or when i type in xx index.html i will see the content main website for the pictures but when i type in this one picture.htm and i will see picture one and two okay and then we're gonna do in so let's go to that we're gonna create all this linux so i'm gonna go back to my instance right here there's nothing launched i'm gonna go back to instance right here apologize i've done some lab before did i click to remove it so i'm going to create launch instance okay as it comes out we're going to pick what linux now we're going to pick the first one select that's a free one okay here comes the next page you just have to wait that's called t2 micro we can click that launch it now here you gotta be careful i gotta pick what my vpc then i'm gonna pick what dot one network wanted because that's what i'm going to focus right now on it this is enabled i come down i have the code which i'm going to put it right here so i'm going to have the code from here this is the code basically what it's going to do it's going to install yum update it's going to install apache server you're going to start up it's going to put this and it's going to change directory to this path and then it's going to create a page we're going to create a page in this path okay and then we're going to create another page in define picture.dat so what i'm going to do i'm going to copy paste this bashes copy that and i'm going to put it what right here okay so when i go up here see that yum update install this apache start the services and check config and then it's going to create a bunch of it's going to create index.html page and also it's going to create this guy right here and it's going to do a picture so i'm going to add storage i'm going to leave that default tag i click here now this one's called what linux pick one okay secure group i already have a secure group collected but i'm going to pick the secure code that has what ssh icmp and http we need to have this secure if you don't have it you have to create that and you should be able to do it it's not that hard just say create that just create an ad keep adding all of those ssh http and then go add the next one all icmp so on but since i have it i'm going to select existing security group okay so i'm going to pick which one this one okay the one that review i come down okay launch all they create keeper i'm going to use the existing keeper and that's today's date is 1090 so i'm going to pick this one okay and i'm going to acknowledge i have this then i'm going to launch instance so right now i'm booting up a server remember everything's happening what northern virginia view instance so right now it's booting up okay if i click refresh i see right here linux peak one okay it's coming up so basically this is if i look at my diagram right here i just pick what i did this guy first one now i'm going to do the second one the second one is going to be called what linux pic 2 but the code i want to pick is this one okay so i'm going to copy paste this guy okay so let me go there but again it's going to be on what first i've already zoomed one in so both linux will be one a and the other one video is gonna be one c so you have to be careful so i'll go back launch instance again i'm gonna test it we're gonna pick this one select we're going to pick what the free t2 micro next here you have to be careful pick a correct vpc 10 0 again i'm going to pick subnet one make sure this is enabled i come down and i paste the code there and what does the code say same as before first thing is called inside password server do all of that then you're going to create a what the name for picture two under index.html file name and then the other one is going to be what pictures add storage that 8 tag i click here i call a linux pic 2 secure group i have my secure group as before i'm going to select the existing secure group again basically what i'm doing i'm just setting up the infrastructure right here review launch and i'm going to pick this uh keeper that i created today which is 1090 so here i acknowledge launch instance okay come down view instance so right now i have two instance now i have to go back again and do what same thing but here we're going to put what 1 c i got to put in what one what c be careful this one has to be 1 a okay so these are it's going to be one eight and gentlemen and this one's gonna be one what a but it's gonna be one c but it's gonna be linux we do three so go back again launch instance pick the free one select okay when it comes up you're gonna pick what same thing t2 micro next here be careful pick that but make sure you go to what 1c 1c make sure this is enabled right then what i'm gonna do i'm gonna pick the third uh things right here i'm gonna copy this i'm gonna put it back here and then i'm gonna put it back right here and paste that right here and what does that do it's going to install a patch server it's going to install all the services then you're going to create index.html it's going to call video and then you have another page video that is called this is video add a storage add tag i click here now here i'm going to call what linux video tree okay secure group same thing pick select secure group that has ssh and http make sure it has http on it right here review and launch then i'm going to pick my existing keeper which is today's october 10 i acknowledge that review and what lunch okay so so far i have what linux one linux two click one pick two video three now i'm gonna do another one what for linux video for i click select that i come down again we have to do this here so much much better i'm gonna change my to vpc i'm to change it to what subnet 1c okay enable now go back to here i'll pick this one you can jump up there install this all that good stuff right here this is going to be index.html it's going to change directly hello to that you're going to go there right then we're going to create index addition and video and this can be video 4 and video 4. so i'm going to copy this again copy pace okay so this video make sure that's video for this right here make sure you get everything right add storage tag and this can be linux video four security group pick it what correct secure group which is right here ssh with http review okay and then what launch i'm going to pick my linux which is 1090s and i acknowledge that and then launch what instance so right now it's booting up the server right now okay let's wait that comes out okay so what we're going to do we're going to test all of this make sure it's working if it doesn't work we have to assist your box and fix that so i go highlight the linux one right now i go copy these what public ipad is right here i copy this so right click go to okay okay i see this is good now i'm going to put what slash picture dot html now i should be if i click refresh see that it's going between one and what oops it should go between one and two why this is one is i'm sorry this is one okay that's good so it's working good now go to picture two right now okay i'm gonna copy this so i'll copy this guy right here i right click and go to okay that's picture do and when i do slash picture dot html i should see the page can't pick two that's good now go test the other one i go to video number three right here i copy this ip address right here i go to so that shows good then i'll put what slash video dot htm man i see the video 3 that's good so far looks super good i'll go test the last one which is video 40 right here i copy this i right click go to that's good slash what video dot html so life is good everything looks good okay so we set up the infrastructure so so far we set up these pictures okay again we have two two ins two ec2 on one a and two right here okay then what we're going to do we're going to load balance the traffic between these guys okay so that's the whole idea to the load balance between these two guys that's what we wanted to do that now before we do load balancing i go back to instance i'll come down when you go back to low bands look at the left side we have a load balance and a target group okay so the best way to do that first to the target group first then do load balancer okay um some people they do load balance inside the load balancer they do target but i highly recommend that you do target group first so i click here so we have to create target group and that's where we are right now in my notes right now so i've done all of this right here okay now we will do a lap now before you do anything you need to create two target group i'm gonna have a two target group one is called picture tg target group and video target group okay so picture tg will be for this guys and this is video okay so we need to do that now when we do that you have to be careful you have to choose create a new target group you're going to give your name picture tg we're going to pick instance the poor code is going to be http we're going to pick virginia vpc rest is default half check is going to http make sure you put index.html we need to make sure that your instant has this funnel because our instant has this so we're going to pick this path so let's go here we say create target group okay i'm going to make it instance right now later i'm going to do lab with this guy okay so just leave it as instance default right here you come down i'm going to say what picture let's say tg 30 group the port we're going to leave it 80 here you have to collect vpc okay that's correct for your pc leave this as default http1 healthcheck https fine in here just try typing what index it's very important for html you got to make sure you have this file on your linux machine that's a health check and the rest we leave as a default i'm going to click next right okay now here look what happened register target this is very important since this what picture is i'm going to click this guy and that guy that pictures i want to put those inside my target then i have to say include as handy below so right now there's nothing here see that make sure you click this if you don't if you click that that's not good you gotta say what click what include as what pending so right now i put these two inside my what target group and say create a what target group okay so this is picture target group right now okay so that's very important okay so right now if i click here see you have what to target now right now it's unused you see that unused right here eventually you're gonna see halfway later on so this is unused it's not being used okay look at what happened target is not configured to receive drive from load because we haven't done load balancer so one of the target rule did i go back to target group i'll go create another target group but this one i'm going to call a what okay again you see that when you see that you can see pending below now when create target group after finishing you see that is unused later you're going to change okay now do same thing but this one we're going to call a video target group we're going to put instance we're going to put http we're going to put same the exact same thing okay all right so let's go down so i'm going to create target group instance right here the name i'm going to call it that video tg port 80 that's fine check correct vpc this is default leave it like that fine half check http here you can type it what index dot ht ml okay make sure this is correct again next then here you have to what register target now this is for video is i gotta pick this guy and i gotta pick this guy don't forget you gotta pick this then you have to say what there's nothing here see now you have to include what pending below so make sure this name shows up then click what create okay so right now i have a picture and video i can double check that when i click video i see both what video that's good it's unused that's fine when i go back in top target group when i click picture again i see two unused right here and the name of our linux and pick like that so that's good so so far so good okay so we have two target group okay so that's what we have so we have what four instances linux pick one the next pick two which was the picture and video 3 and then we created what target group now we're going to create what load balancer so let's look at my notes right now so that's what we did we have we need to make sure as we see when we look at the target page we do not see any load balancer in front of it since we have not configured but ladder we will see it let me show you what i'm talking about so when i go back target group right here see when i move this bar to the right there's nothing here see that there's nothing in front of my column load balancer because we have not configured it yet okay so go back to low balance right now okay so what are we gonna now we go and create a low balance okay but before you create low balance there make sure you know what is your security group for instance and have it ready so let's go check your secure group addition secure group that's the best way to do that go back to instance right here you can use the same security group go to linux one go secure tab this is my what secure group right here if i click here see six eight four eight so remember that whatever is the queue group is right here i'm gonna copy this right here and i'm going to open open notepad and so i just wanted to run that foot so you need that later okay so let important so i go back to my load balancer okay i created what load balancer right now i'm gonna do what application load balancer later on i'm gonna do a network load balancer okay later i'm gonna mix them just together later on so you see that okay that means network load balancer is gonna point to application load balance as a target we wouldn't see lab so that's what we're gonna do application load balance again like what is this called choose application load balancing when you need to flex the future of that set this is for path basis okay is the advanced routing and the physician so targeting so anything ipad anything video is going to balance between video 3 and video four it's ips x x x slash picture is gonna balance between what uh if i type in a picture that hm is gonna balance between pick three i mean pick one and two okay this is network romance we're gonna do that later on so network balance is the key for example is that you have static ip addresses and networks there are capital of a handling means of a millions of requests per lot of ultra low watt latency okay so right now we're going to focus on this guy i'm going to say create okay i'm going to give a name i'm going to call that virginia elastic application load balance i'm sorry about that click here okay not this interface of ipv4 right here here you gotta make sure you pick what correct vpc okay here you gotta make sure you pick what 1a that's the only supplement we had that's good we picked that one and one c okay because it says that select at least two already zone and one subnet person the low balancer traffic outside to target is every bit zoom only about this one that are not supported by low bands or bbc are not available at this selection so make sure you have you select one a and also one scenario at the beginning we had a picture of what uh low bands uh we have one a and one c we have a bunch of is to do here and that's what we have we need those have to have that okay okay so we're right now we're right here we're going to low back so we can call this vpc that pick same sql group listen i'm going to put 80 okay now in front of the listener you need to pick your target group in here it does not matter which one you pick i'm going to pick what picture target group so right now in front when i come down okay you pick a secure group now pick a secure group which uh right here i'm going to pick the secure group which i had finished with 648 so make sure you pick the same secure group so i'm going to delete that default i need that one i'm going to pick this and also your name the name was ssh all that 6848 right here so i'm going to pick this guy 6848 okay so make sure you pick correct secure group okay now under listening routing here but it's important it's a port 80 no this is the default action forward two when i click here you see your target now it doesn't matter which one so i pick what pictures again i wrote my notes that's key part okay in here it does not matter which one you pick so i pick what picture tg okay then we're going to create what a lb okay so i'll go back to here start with that i minimize that one i pick that i come down there's nothing else here blah blah blah create what load what balance it okay so success balance i'm going to view my load balancer so right now i'm playing low balance right now okay now here's the key part when i go back to [Music] target group okay when you go back to where which one should i click pictures because i pick picture as a default when i click this you see that not is what it is initial line okay see it's unused but if i click refresh let me refresh this page it went to what see it went to initial see right now initial eventually this guy is going gonna be what halfway now again why it went to here because i picked what picture as a default right here see virginia low balance it shows right here under here i have nothing in front of what this gentleman because i did not pick it right when i doing the installation during this part which was default right here looks like that right here see that in front listen you need to pick target group in here it doesn't matter which one you pick i will pick what picture target group so you create a bit then back to your target group then you click on picture tg target group you will see initial then it has to become what half it takes approximately after two minutes it becomes healthy now when you look at the target group we are in column under low balance it shows name of region load balancer with picture changes since we choose a default but video it has nothing to it so let's go look at right now again what i'm saying in front of right here it's about ba if i click name nobody this is picture right here there's what via there's nothing in front of that because i haven't picked that let's go pick let's go click on picture target group let's see if it's healthy if i click refresh it says what initial status right here see it's taking time it takes probably two minutes so i click refresh let's see what happened it's still initializing okay so it's still what initial so we have to what wait so after two minutes it become healthy and when you look at target group page we see under that you see low balancer it shows the original low balance picture since we pick as default now go back to video tg and click and you see unused again if i go back to what target group right here click on video now look what happens this says what on what use because we haven't done it when we finish the part of lab it's going to show up a healthy tour so let's go back to target group and let's go check the uh pictures i click on pictures let's see if this is healthy it's still what initial okay let's refresh that this hash oh nice healthy see that good news is what healthy see that life is what good okay that's how i want to see that okay so now okay now in two minutes after you've done that now go back to the video and see not step 13. now we wanted to make sure now we want to make sure that we use video tg so we want to make sure that video target has been used okay so what i'm saying that we want to make sure when we are back into target group in front of the video i have something here okay that's what we're trying to do in order to do that what i'm going to do i'm going to go back to my low balancer so go back to what low balance that's what's in my nose go back to low bands on the left and click on listener tab here's what you have to be careful i'll go back to load balancer right here click what listener tab right now any team listener the default is pointing to picture tg so what we're going to do we're going to edit rules these are where the rules come from you're going to click this guy right here okay now you see that there's a plus sign see that plus sign is the add rules click the plus sign then we're going to insert what rule okay now if it match then do something else so we're going to say add condition the one i want to use a path so what i'm going to do i'm going to put star video okay start if you get all this video stuff action i'm gonna forward it to target group what vtg right here see that that then it makes you click what save that's that one so if the path anything with the video is going forward to this guy then i'm going to insert another rule i'm going to add condition path i'm going to put star picture okay star okay and forward it to what picture tg make sure you click what save so here what that is anything with the path with the vehicle is that anything good the default it goes to what picture tg okay that's default okay all right so anything with the anything video goes to here anything goes back over here okay let's go back to click here okay let's go back look at the um let's look at the notes right now so that's why they said that you click on the plus sign add to some rules click path then type video then actually forward to that one make sure you save it do the same save click pictures and forward to that one now click back go back to virginia and click on description tab and copy paste long dns name and try it and see what happens okay so what i'm going to do i'm going back to description tab right here this is a long dns name i copied this i paste that did i put slash picture dot html now when i do that it should what point to pick one that's good and refresh it pick two that's good so if you look at the diagram right now if you look at the low balance this is what the low balance is anything application anything comes with the picture dot html is going to load balance between these two guys okay this server okay so that's working good see that i anything with the picture.html doesn't go here now let's try the other one video watch this video we hope that's that's what we want to do video dot htmn if i press enter voila see it goes to video four and what three so that's working good that's what i want to see so anything with video is going to go here okay video 3 and 4 okay so that's what's in my notes right here look at this anything with the picture goes to this guy's low balancing and it's also it's called a rule it's a path basis okay so anything your ipad is any long dns name time slash picture goes here and the video goes right here if i go back down to my notes right so that's what's it remember that you can go back to your route 53 and create area code and point above link okay which i'm going to do right now now if i go back to the target group now on the alb column i will see both of them now let's go back target group let's go check it out this then we're going to do wrap 53 sorry about that so i'm going to go back to right here okay i'll go back to target group remember that on picture i had what yeah we now have this video before here was nothing there right see that now if i click video right here if i click video tg hear that first words will unused right if i click refresh see this was unused if i click refresh voila nice what healthy see that it's healthy which is good when i was unhealthy so if i go back target group okay again picture tg it shows you what healthy and healthy okay again if you go load balancer if i go back to listener right here the default goes to what to picture but if i click edit root anything with the pictures goes to what forward to this picture tg group target group any video goes there okay now what we're going to do we're going to try to wrap 53 now if i go to round 53 okay we're gonna create what a friendly name i click hostess now i have one hosted zone i have one domain name i bought it you can buy a domain name it's called home blah blah blah right here okay i'm going to create what a record here's you got to be careful i'm going to click what alias right here make sure you click alias right you want to a record click here i'm going to click what application right here click alias application now if i click these i gotta pick virginia because that's what my thing is okay and oops here's region right here okay now i see my load balance right here okay i don't need to have a target here because we can do simple routing add what records okay oops did you create that okay let me see cancel that let me say apologize okay i did not follow i go create a record again apologize make sure this is alias right here turn on go back to application you want to pick typing v so you're going to pick virginia right here then you're going to see what load balancer right create a what we don't need is target create a record so you create a record right now step 8 record right homie 777 so if i try that if i talk in some long days i'm saying hamad 77757.com [Music] slash video dot html i should see my what page all right it's working see that we do three and video four so long so this is my friendly name is hamed right if i type in what picture dot html issue what work okay so cool so that's it that does everything okay go back to that and you see that okay again if you have a question and comment uh our page is asming.com if you go back to here you see this if you have question comment you can fill up this form for us or just contact us it's our phone number two one nine eight four seven four zero zero and again everything i mentioned that is gonna be under the blog page so when you go to amazon on the blog we have a lot of amazon right here amazon aws eventually this video is going to be uploaded here okay so this was i was what application load balancer later i'm going to do the um network advanced thanks so much and you have a blessed day bye-bye you
Info
Channel: ASM Educational Center (ASM)
Views: 129
Rating: undefined out of 5
Keywords: AWS, Amazon Web Services, Cloud, AWS Cloud, Elastic Network Load Balancer, Elastic Load Balancing, cloud, amazon web services, reinvent2018, cloud computing, AWS Training, AWS Getting Started, Introduction to AWS, new introduction to aws Training, self-paced labs, AWS Certification, load balancing, cloud servers, server hosting, virtual server, how to set up ec2, how to set up a virtual server, Amazon AWS Application Load Balancer
Id: fHI22nijPOw
Channel Id: undefined
Length: 37min 36sec (2256 seconds)
Published: Wed Oct 13 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.