Setup Auto Scaling Group Part 2 - ASG Basic Setup

Sai Kiran Rathan
A free video tutorial from Sai Kiran Rathan
AWS System Administrator & Solutions Architect
4.0 instructor rating • 5 courses • 8,150 students

Learn more from the full course

Learn AWS Infrastructure for Production & Intro to Terraform

A complete hands on course to setup 3Tier Infrastructure in AWS console, Manage AWS using Terraform & Devops using Slack

04:44:54 of on-demand video • Updated February 2018

  • You will understand 3 tier architecture to host web applications
  • Create and Manage Production Infrastructure in AWS
  • Manage AWS Infrastructure using Terraform
  • Perform Devops using SLACK
  • By the end of this course you will be able to host your production applications at scale
English [Auto] It and now we're going to hear the artist get in groups. So for the artist we're taking the name I would give it the same thing my big company publication he Civitas for all of us can be and give it to me and I want to start with let's say two instances at least because I wanted to put it into the songs and we are going to choose a part with B PC and the submersed that we put in here is actually the public's a good one and probably submit to the will of the songs because this killing group is launching the application service. So that goes in the public subnet and we want the artist to launch it in those two subnets. So we're going to configure it in the public subnet one and public subnet to and the next thing that we're going to do is like OK. So there is there is a grace period. So what this does is like the tigerish Peter is it obvious for this amount of time before it starts checking for the rest of the application server. So in some cases what happens is like the application server takes more then it takes more amount of time to configure itself and then ready for the Ready For go. Going into the lord balancer so we don't want our health checked to be triggered prior to that so that it results in an unhealthy and artist killing group will try to take it out. So we want to wait for a certain amount of time. So that is what this number is going to tell us so thénard seconds is more than enough for our hour are so were to go into Solaris. I'm just going to live with that. You entered and you could always have in instances protected from killing that is one hour some alarm happens and your partner's getting group skills in that its like degrees off instances if you want to protect these instances you can protect it. But I don't want to put it. Now let's talk about the use cases in the next lessons. So I'm going to. So let's keep this scaling policies to the next lesson because we want to understand how the are getting up works first and then we'll try to come back to this and configure this properly when we have all the alarms and everything else is set up. So I'm just going to skip this part now. I'm going to go to the configuration of notifications. Are we going to skip this part as well because I talk about this once we have the and this topic here so that we could use this here and then we could use it for notifications. So the next thing is like I'm going to keep the tags which is our name tag and my big one from the application is G. Surprised. And as usual the strong OK. So we we have the artist in groups here minimum and maximum size. I want to change this to b c an option to put in the maximum size. OK. I think we can and we can put that once this is created. I'm just going to leave the scouting policies and notifications for the the lesson and I'm going to hit it. So now what this is going to do is like now the artist group is created. What we haven't told it how to keep the way to launch the instances and assign it to which target group or something like that. So now that this is clear that we are going to go here and edit this and here you have the target group section and here you could select the target group that you have already created in the previous lessons and you're going to tell that we need a maximum of four. And we want the health check type to be a health check that is fine. Now this is going to check the target groups health instead of the instance. If you go to your census itself you have a separate health check that is assigned to this and this is going to show it here. I mean like the status checks something goes bad here then this will turn into unhealthy. But we don't want to check this because this doesn't tell us if they are piggishness healthy or not. It just answers with the instances healthy or not. But instead we want to use the application load balancers health check. And this is going to tell us if our application is working fine or not. So let's go back here and I'm going to choose the health check here and our termination policy. We want to keep in the oldest instance that it's like whenever a new instance came up we wanted the oil instance to go out when it's kids stand rather than having the new instance go out. So I like to expand the use cases for this in the next lesson as well. So that's it for this pardon. I'm safe. So now what this is going to do is this is going to put up new instances do new instances. And if you see here they have launched successfully. Let's see if they entered the target group or not. So if I go back here and the target group and hit refresh I should see two new instances getting added to our target groups and you can see that this artist group launched the sensors in both the one in one B because we want our servers to be present in both our liberties and that's why we have a minimum of two servers so that it can launch in our liberties on time even if one zone goes away and you have the seconds on up and running. Now that we have our orders getting group configured to these to put in servers into the target groups we can go ahead and terminate these application servers that we have created manually. Before that I just wanted to check if they are all in healthy state. So I'm going to go to the application servers. You're going to search for these two and then I'm going to terminate those two service those to instant state terminate. Now I want to go back here. Go to the Lord balancer and check if this is still working as expected or not. I'm going to go to this and yes so I am getting back my response from my production on purgation. Now we have all these killings configured so that we could add more instances it can decrease the number of instances that you want in our target group to handle our load. So that's it for this. And in the next lesson what we're going to do is like we're going to create this catering policy we're going to create the alarms that are required for our Lord balancers so that without your intervention if there is some load that is coming in the oddest killing group and the load balancer will figure out whether or not to scale up the new instances. So that's it for now. As you that thanks.