that server could be overloaded it's having trouble serving out all the data
and so you're making these requests but it's just maybe it's losing the request
or it's something is crashing or something's not working ready so you're
not going to get this data back and it might be in that case of hitting
refresh refresh is causing these requests to be reissued you get lucky
and it means that you get your page back and somebody else doesn't and so you buy
your raffle tickets and somebody else doesn't
you clicked on this URL
so what's gonna happen this kind of breaks up into in this case about three
different components
so you've got the path in the URL you've got the name domain name tells you which
website it is and you got protocol the schema is called the scheme which is the
protocol is going to use this case the standard protocol HTTP you clicked on
that wherever that is it could be an email could be in a web browser it could
be something you've tightened by and the URL bar in your browser
whatever it might be you clicked on it and what's going to happen as a result
of that
so what logically speaking of that there's a sort of high-level what has to
happen is your computer now needs to make a connection or your phone or
whatever might be no need to make a connection to the server that contains
that data and send a request about data and receive data back again
so the first thing it's going to do is work out which machine is a need to
connect it because this is the internet things don't have names that go IP
addresses and so it needs to translate the name which in this case example.com
into some IP address so it can actually get data to the destination because on
the routine stuff that we've talked about all that data all those packets
are being routed through the network based on their destination address
you've got to put a destination address in the packet and in this case you want
to find the destination address the IP address that corresponds to
example.com so you look up the name and you get the IP address
there's a couple ways this can happen kind of the communest ones are
it might be a statically configured there'll be a file on your system called
post doc txt or medical side different things on different systems but it says
when you see this name is this address
more commonly what will happen is it will run a protocol called dns stands
for the domain name system essentially what happens with that is that your
system before it tries to actually connect this will construct a request
that basically has a question
the question will be what is example.com
construct that as a request it may be able to answer that locally so if you've
made a previous connection to example.com recently
it might be that you already have a translation to hand and so that your
computer is only do anything other than reuse the same answer
but if you've never clicked on that before then it's going to need to send
that request out into the domain name system to try and get a response back to
say what IP address should i connect to the protocol is quite simple
it's a one-shot is the question what's the answer but the service is
constructed to operate this is quite complex there's a lot of hierarchy in it
lots of other service that will be running in your you make a query to one
server which may have to send a query on to another server which was in turn on
the server which eventually will have a response that can get set back to you
but let's say all that happens
and so you get back the answer that let's say it's you know 10.0.0.1
second argument
so you now know that to connect to example.com you have to send packets to
the machine with the address 10.0.0.1 to get this answer so then you have to
create a connection to you actually go to connect the machine
so you're going to use a protocol tcp to do this and what that does is it sets of
the connection to this destination and then allows you to send a request for
this path over that connection
so the weighty speed works is you're going to have let's say you've got your
client here
the example.com server 10.0.0.1 there so you're gonna send a
packet and replied with a packet you apply the packet
this is called the three-way handshake these are called syn syn ack ack
so synchronize synchronize acknowledged knowledge and at this point here
you create the connection so both sides now not to the other side exists and is
trying to communicate with them and where they are and how to get there was
gonna stop
you've now got this situation set up we've got a connection so then what
happens is he will actually send an HTTP command over this connection you've
created by transmitting a packet to the example.com use this protocol tcp
and in that packet
let's say it's the old version of HTTP 1.0
there will be a command that will be something like get some path
HTTP 1.0 and then it will be a new line in line
we actually used to be command the HTTP protocol operating here is this get some
path
HTTP 1.0 your new line and that's the HTTP command has been sent and so that
gets sent through across this connection to the server which can then respond
with whatever it is that's associated with the data so that might be a web
page for example and so that web page might get sent back in a single package
might be so big it gets sent in multiple packets the server interprets this URL
this path some path turns into data somehow the Internet of Things it stuff
coming up it might be that what actually happens there is that your fridge is
turned off or washing machine gets turned on so now you can be anything that happens
there and then some data is read the results from that is sent back to you
so in the web 1.0 that would have been a file will be found in the fastest and
sent to you and web 2.0 it's much more i said dynamic databases
construction of assemblage of multiple components to construct a page that they
get sent back to you
in fact it can happen in a kind of x so this is the case for sending data back
responding to this single URL commonly what happens on the web page you get a
web page into your browser having clicked on a link and that web page
won't be everything that it requires self-contained it will contain
references to other web pages that contain references comedy to a CSS
stylesheet it will contain a reference to some JavaScript maybe several
javascript libraries and so what happens as a result of this is that lets say
this this data comes back here and it contains other references to some
javascript file and it contains a reference to
style.com blast / food . CSS and will contain more preference like that and
then what would have to happen is your web browser will interpret this as it's
trying to render this page is trying to put the page open from to you and it
will start having to make connections to each of these sites so that those data
comes back my actually cause your browser to fire
a lot more of the sense that yeah and so in love each of its most available for
our it's a lot of it will be fine but it's a neat but each this process would
have to be going through each of those so they'll have to be a dns resolution
of some jas . , and start , whatever the science there will have to be a TCP
handshake that will go out to each of those sites they will then have to be to
get / jas file . jas that will have to be to get food
CSS HTTP 10 http/2 10 and so this simple act of having clicked on that link could
cause many name resolutions to happen could cause many connections to be set
up and it could cause lots of later and commands to be issued in order to allow
your browser to pull together everything it needs to put that webpage on the
screen from to you it doesn't come immediately so I click it again and
again and again and i think it because it's not working does that all happen
over and over again with the bird
potentially yes it will depend on exactly how that's interpreted so it
might be that the browser decide to ignore some of that because already
busy
it might be that it's going to reach the whole thing it might be that it stops
what's been happening early and just throw it all away and starts again it
might be that lets what's already happening continue in the background in
that hope that that's going to finish sooner than the need to click that you
just also some of the market intelligence going on there but
generally speaking it might be quicker to not click again
yeah it's only you need the often you need to get a little bit of time to
respond because it's a complex page or the or the internet is busy there's lots
of congestion or the server is busy it's overloaded it can take some time to
respond
on the other hand one of the things that can happen because of the way these
protocols work is in this step in particular the syn step this initial
connection setup fails so that fails down there that can take a long time for
the system to retry that the other thing is that if this DNS resolution fails
it's not reliable on the protocol and DNS doesn't retry for you
the application has to request that to happen all the operating system usually
will request that to happen because this gets initiated usually by your browser
of making a function call system called the operating system to say please could
you look up his name for me then the u.s. will do something
background if that fails or that's taking too long
then again sometimes it might be that clicking again actually does speed
it up because it forces that to happen sooner
so there's no direct answer to that literally tell you that's it
because there's so many different components in this and you've got the
whole internet as well as all the other bag of components
it's complex there's lots of stuff happening it's a complicated system
we'd like to thank or double dot com for sponsoring this computer file video and
if you like books get over to audible.com / computer file for the
chance to check out an audio book for free today would like to recommend Kim's
etters countdown to zero day it's all about Stuxnet the worm that sabotage
Iran's nuclear effort and it tells the story of how it was discovered and how
it works to get over to audible.com / computer file check out countdown to
zero day by kim zetter and thanks once again to audible.com for sponsoring
computer file for this video
when it was the Pakistan network operator they tried to inject
information into bgp to prevent people connecting to youtube from within their
network but because of the way they did that that information propagated and it
caused lots of other networks to also fail to be able to connect to youtube