Asynchronous

소바·2022년 9월 12일
0
post-thumbnail

Web server에 접근할 때 일어나는 일

Domain name

Now this domain name, restcountries.eu is actually not the real address
of the server that we're trying to access. that is easy for us to memorize.

DNS(=Domain name server)

But what this means is that we need a way of kind of converting the domain name
to the real address of the server.d
And that happens through a so-called D-N-S. So DNS stands for domain name server
and domain name servers are a special kind of server.

So the first step that happens when we access any Web server is that the browser makes a request to a DNS and this special server will then of the URL to the server's real IP addres.

TCP / IP socket

So once we have the real IP address, a TCP socket connection is established between the browser and the server. And so they are now finally connected.

And this connection is typically kept alive for the entire time that it takes
to transfer all files of the Website or all data.

Now what are TCP and IP?
TCP is the Transmission Control Protocol.
And IP is the Internet Protocol And together they are communication protocols.
that define exactly how data travels across the Web. They are basically the Internet's fundamental control system.

TCP

So first the job of TCP is to break the requests and responses down into thousands of small chunks, called packets before they are sent.
Once the small packets arrive at their final destination, TCP will reassemble all the packets into the original request or response.
And this is necessary so that each packet can take a different route through the Internet because this way the message arrives at the destination as quick as possible, which would not be possible if we sent the entire data simply as a big chunk.

IP

the job of the IP protocol is to actually send and route these packets through the Internet. So it ensures that they arrive at the destination they should go,
using IP addresses on each packet.

HTTP REQUEST

And the request that we make is an HTTP request, where HTTP stands for Hypertext Transfer Protocol.
They are the communication protocols that define how data travels across the Web.
Now in the case of HTTP, it's just a protocol that allows clients and Web servers to communicate. And that works by sending requests and response messages from client to server and back.

start line

is not only for getting data, but we can also send data, now right.

HTTP request headers

Then the next part of the request are the request headers, which is just some information that we sent about the request itself.

Request Body

And the main difference between HTTP and HTTPS
is that HTTPS is encrypted using TLS or SSL, which are yet some are protocols,
the logic behind HTTP requests and responses still applies to HTTPS, alright?

Rendering

But anyway, when all the files have finally arrived, then the Web page can be rendered in the browser, according to the HTML, CSS and JavaScript specifications that you already know.

profile
소바보이

0개의 댓글