Okay.
Hello bloggers and welcome to this lecture and this lecture we're going to look at or weighted rooting
policies so weighted rooting policies allows you to split your traffic based on different weights assigned
for example you can send 10 per cent of your traffic to go to USD to one and ninety per cent of your
traffic to go to EU w 1.
So basically it works like this you user types in the domain name into their browser and they navigate
to Route 53.
Route 53 sends 20 percent of the traffic over to USD 1 and 80 percent of the traffic over to us.
1.
That's all weighted rooting is it allows you to wait your traffic into different areas or different
regions around the world.
Okay so here I am in the WS console.
We just need to go over to Route 53 which is always going to be under networking and content delivery.
We go into our hosted zones and click in here and then what we want to do now is you want to delete
this a record.
So just click on delete records set and we're gonna go ahead and create a new record set.
It's gonna be our naked domain name are ozone Apex records.
It's not going to have any w w w or anything like that it's just gonna be Hello closure is 2019 dot
com and we just click over here and do a refresh.
You can see that DNS is still being served.
It does.
Again this is the TTL kicking in so is going to take some time before that record set has been deleted.
Okay so where did a couple of minutes.
I'm just gonna refresh and you can see that now it can't be reached full disclosure.
That took a bout four or five minutes before I get this error.
So if you are refreshing and it's still serving things up even though you've gone in and deleted your
record.
That's why it is.
It's basically just you know the TTL.
That's why that haiku is so very true.
You think it's not DNS and then you wait and then you wait and eventually it is DNS.
So let's go ahead and create our records set in here.
I'm just going to paste in my different IP addresses so pasted that in now and then I'm going to change
my writing policy from simple to weighted now the way this works is you actually create multiple records
sets so you don't want to have multiple IP addresses in here.
So I'm going to cut that out.
I'm just going to have one IP address and I'm gonna give this a wait of 20 so I'm going to go ahead
and hit create.
And it's asking for a set I.D. and the set D is just the name.
So this IP address is my Sydney one.
So I'm just gonna call it Sydney and go ahead and hit create and that has now created a record set.
Let's go ahead and create another record set we may just want to drop this TTL because down to a minute
rather than 300 seconds which is five minutes and then I'm gonna go ahead and create my second record
set.
I'm gonna paste in my value in here and I'm gonna grab that one out.
So this IP address is my Ohio address I'm going to change this to waited and I'm going to give this
a wait of 30.
And in here I'm gonna call this Ohio.
So go ahead and hit create.
Now if you scroll over you'll be able to see the weight in here and the way this works is it basically
adds up these numbers.
So right now we've got 40 percent of our traffic going over to this address here.
So over to Sydney and then we've got 60 percent of our traffic going over to Ohio.
We go ahead and create one more record set.
I'm going to pace my value in here drop this down to a minute.
I'm going to change the weight and then I'm gonna give this a weight of 50 and then this one will get
50 percent of the traffic and the rest will get their appropriate values in here.
I'm just going to type in Ireland.
So going to send 50 percent of my traffic over to Ireland.
And there we go.
We can now see 50 percent is going over here.
Thirty per cent is going over to Ohio and twenty per cent is going over to Sydney.
If I go ahead and refresh it took a little bit of time but there we go.
I'm now hitting the Ohio web server so that Ohio web server had a chance of 30 per.
Now when we were setting this up.
If you actually click in here you see right down the bottom it says associate with health checks and
you can go ahead and hit yes.
And it says when responding to queries Route 53 can emit resources that fail health checks.
So basically if you're easy to instances of failing a health check it will will remove it from the DNS.
Now we have no existing health checks right now but we can click over here and go to health checks and
we can go ahead and create a health check.
And so we could call this health check Sydney and what to monitor.
We're going to monitor an endpoint and we're going to monitor it by an IP address in here I'm just going
to enter the IP address for my Sydney one which is 50 to 65 dot 15 dot 1 4 5.
So the hostname This is the name of the domain you want Route 53 to run the health check on Hello cloud
gurus 2019 dot com.
And in here we're going to do it on port 80 and then the path what I'm gonna do is just index not reached
here Miles because that's our index page you can do advanced configuration in here.
This is where you can do a different request intervals.
You can make it pass every 10 seconds and then you can specify the failure threshold.
So I might make this fast and I might make the failure threshold too.
So that means within 20 seconds of this going down it's going to know about it straight away.
So I'm gonna go ahead and hit next and then you can also get notified when a health check fails and
you probably do want to do that in real life.
I'm not going to go through and create nastiness notification though so I'm just going to leave that
is no.
And I'm gonna go ahead and create my health check.
Now that we've got our health check we can go into our hosted zones and we can click in here and we
can go over and then start associating with our health check.
You have to do this for each record so I'm gonna do this for the Sydney record.
And actually I should probably do it for this one here because this is the Sydney record here.
So go ahead and associate with health check and go ahead and hit yes and save my records sets.
So there we go.
So I'm gonna go ahead and create two more health checks.
You don't need to watch me do this it's just exactly what we just did then I'm just going to pause a
video while I do this and then we go I've created my health checks I'm just gonna pause a video and
wait for them to all be healthy so go ahead and hit refresh.
There we go we've got our three healthy health checks going to go back over to my hosted zones and I'm
gonna go through and just delete that a record so we can get on to the next lab so I'm gonna delete
my three different records in here and you can delete multiple items at once.
So waited rooting is really really simple.
Again we have our user and we they visit Route 53 and then Route 53 We essentially send the traffic
to different regions around the world based on the weights that we supply and essentially what it does
is adds up all the weights in the records set and then it apportions it off appropriately.
And then finally we learnt about health checks.
So with health checks you can set checks on individual records sets.
So we did three health checks on our three different records and if a record set fails a health check
it will be removed from Route 53 until it passes the health check and you can also set up SSA notifications
to alert you if a health check is failed.
So that's it for this lecture guys in the next lecture we're going to learn about latency routing policies.
So if you got the time please join me in the next lecture.
Thank you.