How Does the Web Work? 🌎

July 5, 2022 ¿Ves algún error? Corregir artículo
      fmt.Println("Hello World 🌎")

Hello world 👋🏾! My name is Carlos García. In this blog we'll see in a simple and summarized way for non-technical users, how does the web work?

Servers and the Client

The web is based on the communication of two entities: the client and the server. The client in this case is you, reading this blog or watching this YouTube video or listening to this podcast, and the server, which is where all the information your client needs to enjoy the content is stored.

The Client

The client in our case is the browser. Our browser has two functions: to request and to present. What does it request? Basically HTML, CSS and JAVASCRIPT files (in principle) and it's responsible for interpreting these files and showing them to the User.

An analogy would be: the browser is Excel and the files it requests from the server would be the XLSX files.

The Server

It's a mystical 🧙‍♀️ entity that works in another dimension... oh maybe not. Servers are nothing more than other computers using minimal requirements to store and manage information. With them we try to keep certain files and data always available to be consulted.

Servers are found in large buildings called data centers where they're treated in the best way. It's like a 5 ⭐️ star hotel for computers: refrigeration, perfect electrical current for their operation, security and constant maintenance.

In the "old days" companies built their own data centers (some still do either for convenience or state regulations) incurring large costs. Currently we use non-proprietary data centers better known as the cloud ☁️

How Do the Client and Server Communicate?

  1. First, the client, that is our browser, when we write the link of the page we want to visit and press enter, starts this great journey with a request to this page.
  2. Immediately after, this request encounters the first challenge: I want to go to YouTube.com but since I don't know where the server is located, the DNS (a great address book) is responsible for telling us the exact address of the server (the IP).
  3. Then this request travels to the now-known IP address and tells the server what type of request it is: I'm a GET (obtain) type request and what my client asks you to send are the necessary files to load the YouTube page.
  4. The server processes the request and searches for the location of those files and then immediately sends them to the client.
  5. The client receives these files and is responsible for displaying them. Ta-da! The YouTube page was loaded.

In Conclusion

Web pages are stored on remote computers or servers located in data centers and these are requested by our browsers like (Google Chrome) and then presented to users.

I hope you enjoyed learning with my content. I invite you to share, subscribe and leave your thumbs up so this video reaches more people who are starting in the web world.