Hello bloggers and welcome to this section of the course.
So this lecture is called DNS 1 0 1 and we're going to be looking at Amazon's DNS service which is called
Route 53 throughout the rest of this section of the course.
Now first of all you might be wondering where did they get the name Route 53 from.
Well if you know a little bit about US history the very first interstate was Route 66 was the very first
road that went from one side of the country to the other.
And with DNS DNS is actually on the port 53.
So that's where Route 53 gets its name.
And that is actually a popular interview question at AWB.
So if you are going to try and get a job at AWB as a solutions architect or as a technical account manager
that's where Route 53 comes from.
So Route 53 will probably come up four or five times in your exam.
The exam questions are randoms it really depends which questions you get.
But it is definitely a heavily tested topic and to be honest if you want to work as a solutions architect
in real life you're going to need to understand DNS.
Back to Front now in this lab we are going to go out of free tier because we're going to set up three
easy two instances this section of the course could cost you money if you follow along or you can just
watch me do it myself.
So let's start with DNS.
What is DNS.
And I want you to think of a phone book and that's the easiest way to remember what DNS is.
I know we don't really have phonebooks anymore but you know hopefully you can still remember them or
maybe I'm just getting old.
So if you use the internet you've used DNS DNS is used to convert human friendly domain names such as
a cloud guru into an IP for or IP sixth address such as HDP 82 dot 124 dot 53 dot 1 So IP addresses
are used by computers to identify each other on a network and IP addresses come in to different forms
IP for an IP 6 and this one the 82 dot one two forward at 53 dot 1 is an IP four.
So that's all DNS is it's a way of looking up a domain name and getting an IP address just like you
when you used to look into the Yellow Pages you'd look up someone's name and you'd get their telephone
number.
So let's talk about HPV 4 versus HPV 6 and IP 4 addresses have been running out they've been running
out for ages that's why we invented IP vs sex so IP V for is a 32 bit field which has over 4 billion
different addresses and essentially it has a finite number of addresses and this worked really well
in the early days of the internet because we just didn't have that many devices online.
Nowadays everyone's mobile phone everyone's computer everybody's fridge everyone's Alexa they all have
unique independent IP addresses and we've just run out of space and to help you visualize this I want
you to imagine that each IP the four address is a single grain of sand.
If you were to take all the IP for addresses and add them up together they would be enough to fill a
dump truck.
So that's how many IP V4 addresses there are.
We created IPTV six to solve this problem of running out of IP V for addresses and IP these 6 has an
address space of 128 bits.
And in theory this is basically 340 undisciplined addresses.
So if you then turn this analogy on its head and you take a single grain of sand at a four 340 under
silicon addresses it's enough to fill up the sun.
That's how many IP these six addresses that there are.
Now big problem is a lot of ISP is just not switching over to IP 6.
So we're in this sort of weird world right now where we're using both HPV 4 and HPV 6 but I'm sure that
is going to change in the next decade or so.
So now that you know what IP V for is versus HPV 6 We're going to talk about top level domains and if
we look at common domain names such as Google dot com or BBC or dot uk or a cloud dot guru you'll notice
a string of characters separated by a dots or periods and the last word in a domain name represents
the top level domain.
The second word in a domain name is known as a second level domain name.
And this is optional though and depends on the domain names.
So we've got dot com that is the top level domain dot E.U. is a top level domain dot gov is a top level
domain in the UK we have a lot of dot co dot uk so dot uk is a top level domain name.
And then the dot co is known as the second level domain name.
So that's the difference between a second level domain name and a top level domain name.
Similarly in Australia we've got dot com dot EU.
So top level is dot a few.
And then the dot com is the second level domain name.
So these domain names are controlled by the Internet Assigned Numbers Authority or I an a and this isn't
a root zone database which essentially is a database of all available top level domains and you can
go and view this database just by visiting I and a dot org forward slash domains forward slash route
forward slash DP and that'll give you all the top level domain that are available now because all the
names in a given domain have to be unique.
There needs to be a way of organizing this all so that all domain names aren't duplicated.
And this is where domain registrars come in and a registrar is an authority that can assign domain names
directly under one or more top level domains and these domains are registered with Internet which is
a service of I can name and I can basically enforces the uniqueness of domain names across the Internet
and each domain name must be registered in a central database known as a who is database and popular
domain registrars include Amazon themselves.
It's relatively recent that Amazon have become a domain register but it makes our lives so much easier.
When I first started recording the courses we had to go and buy the domains from GoDaddy and then transfer
them over to Amazon.
Go Daddy dot com is a very famous one one two three Reg in the UK is also very famous etc. So these
are places where you can go and buy domain names.
Now when you've bought a domain every DNS address begins with a start of authority record or an S O
A and the a record stores information about the name of the server that supplied the data for the zone
who the administrator of the zone is.
This could be your system administrator.
The current version of the data file and then the default number of seconds for the time to live.
File on resource records and will come to what a TTL is in a second we did kind of cut it off in the
cloud front lecture.
Now if all this sounds a bit too technical for you.
Don't worry it's gonna get simpler.
So we know what a state of authority record is it's where our DNS is going to start.
We now need to understand what an n s record is and an N S just stands for name server records and they're
used by top level domain servers to direct traffic to the content DNS server and the content DNS server
contains the authoritative DNS records.
So let's look at the example to make this all makes sense.
So we've got our user and they type into their browser Hello cloud gurus 2019 dot com and their browser
doesn't know the IP address for that domain.
So what their browser does is it goes to the top level domain server and essentially it's querying it
for the authoritative DNS records is saying hey I've got this domain called Hello cloud gurus 2019 dot
com.
I need to know the IP address for it.
Now the top level domain doesn't contain the IP address it's going to contain something similar to this.
So it's gonna have the dot com ah sorry the top level domain it's gonna have the top level domain and
then it's basically going to have the name server.
So it's going to give it a name server record and it's going to point to an S dot AWOL as DNS dot com
and that's the name Server record.
We then go and query the N S Records and the N S records are going to give us this start of authority.
So it's going to give us the start of authority and inside the start of authority.
That's where we're going to have all our DNS records and our DNS records consist of different things.
So we've got our a record and this is the most fundamental type of DNS record.
The a in a record stands for address and the record is used by a computer to translate the name of the
domain to an IP address.
So for example WW WD w a cloud dock guru might point to GDP one two three dot ten dot ten dot eighty
so that's all in a record is it's just like the phone example the phone book example that we're talking
about earlier it's going to take a name and give us an IP address.
Now we have sort of touched on details before we touched on them in cloud front a TTL is basically the
length that a DNS record is cached on either the resolving server or on the user's own local P.C. and
it's equal to the time to live in seconds so TTL just stands for time to live and the low the time to
live the faster there is changes to DNS and the lower the time to live the faster changes to DNS records
take to propagate through the Internet.
Now with most providers the default time to live is 48 hours and that can be quite frustrating because
if you do make a DNS change that DNS change can take 48 hours to propagate throughout the entire internet.
If someone has just visited your website they're going to cache that DNS address so it might be an APB
for address and it will be cash for the time to live.
And if that's 48 hours it means if you go in and change that IP address that could take 48 hours to
take effect.
This is my Twitter.
Go ahead and follow me.
I don't have actually all that many followers compared to how many students I've got but this is one
of my favorite tweets.
I tweeted this at the 6th of December and this is a haiku.
And it says it's not DNS.
There's no way it's DNS.
It was DNS.
And if you're a system administrator I'm sure you'll find that funny.
The reason this is funny is because of the time to live it can just take 48 hours to do a change and
you'd ripping your hair out.
You're trying to figure out what the hell is going on.
And it was a DNS issue it's a time to live issue.
You have to wait those for two days before that change goes in and takes effect.
So we've covered off a records what's a C name.
Well a c name stands for a canonical name and it can be used to resolve one domain name to another.
For example you might have a mobile Web site with the domain name m dot a cloud dot guru and that's
used for when your users browse to a domain name on their mobile devices.
You may also want the name mobile at a cloud dot guru to resolve to the same address and instead of
having two separate IP addresses you just map one to the other.
And if you've been looking at this yellow pages one you can see Batman in here and then it goes see
w Adam.
So it does not giving us a an IP V for or it's not giving us a telephone number.
Actually it's just giving us another reference that we can then go up and look.
And then that will give us our IPTV for justice.
That's all a C name is an alias records are used to map resource records in your hosted zone to elastic
load balancers cloud front distributions or S3 Buckets that are configured as Web sites and Alias records
are effectively just the same as a C name record that allows you to map your DNS to another target name.
There is a crucial difference however a C name can't be used for naked domain names.
So your zone are naked domain name is sometimes called a zone Apex record.
Basically it's the entire domain without a w w w in front of it or without a mobile dot or whatever
your domain name is et cetera et cetera.
So that's all a naked domain name is.
So C name can't be used for naked domain names.
You can't have a C name for a cloud guru has to either be an A record or an alias.
And again we're gonna have a look at this in the labs.
We're going to go in and set up our very first alias and that will point to our little easy to web servers
that we're going to provision around the world.
And I know some times this can sound really complicated and the like I always say the best way to learn
AWOL is to get your hands dirty with it so don't worry if none of this is making sense just yet.
It will after with finished the lapse.
So onto my exam tips and I appreciate we have not yet covered elastic load balances in any detail.
The reason for that is we're going to cover it in the high availability section of the course elastic
load balances are crucial to understand in order to pass your certified solutions architect associate
exam you're gonna have at least 10 questions on there but really we need to understand DNS and we really
need to understand VPC before we can look at Elastic Load balances in any kind of detail.
So we're gonna do those two things first.
That being said what you do need to know going into your exam for Route 53 is that Elastic Load balances
never have a predefined IP for address you're always resolved to them using a DNS name.
So just remember that you're never going to get an IP before address for an elastic load balancer.
You really need to understand the difference between an alias record and a C name.
So just remember when we're doing ours net zone Apex record are a naked domain name and we're trying
to point that towards an easy to instance for example we're going to be using an alias record.
We're not going to be using a C name.
So if you're in the exam and you're given a choice between an alias record and a C name always choose
an alias record and then just remember some common DNS type.
So we've got our start of authority record.
We've got our n s record.
Then we've got our records our sea names our M X records which we use for mail and then a PTA record
is essentially a it's the reverse of an A records.
So it's a way of looking up a name against an IP address.
So now that we've had a crash course on DNS what we're going to go ahead and do is we're going to go
in and register a domain name and I'm going to start provisioning three little easy two instances around
the world as little web servers and then we're going to be ready to start on the route 53 section of
the course.
So if you've got the time please join me in the next lecture.
Thank you.