Nowadays, the internet is used for pretty much everything in the digital era. Social media lets us stay in touch with our friends and family; we can play online games with people around the globe. Moreover, we can listen to music, collaborate with coworkers via video conferencing sites, and hold business meetings via the internet.
Many people have wondered how, since the internet has become accessible to everyone, we can access almost anywhere in the world with just one click from our places. Years have passed since that question has been mysterious to many.
What happens when you search for something?
- When the browser reads the URL, it extracts the domain name.
- It then queries the DNS to determine the IP address. The browser caches the domains it has visited previously, and the operating system caches applications' queries. Browsers and operating systems do not cache the IP address, so a request is sent to the DNS server configured in the system. There is no need to look up the DNS server address since the client machine knows it.
- A single packet is sent to the DNS server almost always because the request is less than the maximum packet size. An IP address is included in the packet's header, along with the contents of the request. When a packet reaches each network equipment between the client and server (except in the simplest of circumstances, such as hubs), the equipment uses a routing table to determine which network equipment it is connected to that will take the most direct route to the destination. It can be very difficult to decide which path is the best for each type of equipment.
- It either fails to reach its destination (in which case the request is repeated) or reaches its destination, the DNS server.
- Those DNS servers will provide the address for those domains if they have it. The query will instead be forwarded to the DNS server it has been configured to defer to. Until an authoritative name server fulfills the request or until it reaches an authoritative name server, the recursive process ends.
- Having obtained an IP address from DNS, the client machine now has an Internet-based identifier. Web browsers create HTTP requests that consist of a header and optional content. Things like the URL of the page being requested, the HTTP version, and cookies are included in the header.
- As with the earlier DNS query, this HTTPS request is sent off as several packets to the host server. Each of these packets is routed in the same way. (The packets are numbered sequentially, so even if they take different paths, they can be reassembled in order.) A request is received by a web server, which generates a response (there may be a static page, which is served as-is, or a dynamic page, which is created in several ways.) After the server generates the response, it sends it to the client.
It is incredible to know the complexity involved in getting to a website in our society when everything is online. Despite this, the process occurs so quickly that few can comprehend how it works.
To view infrastructure click here.