Everything's better with a pretty diagram

  • DNS resolution

  • that the request hitting server IP on the appropriate port

  • that the traffic is encrypted

  • that the traffic goes through a firewall

  • that the request is distributed via a load balancer

  • that the web server answers the request by serving a web page

  • that the application server generates the web page

  • that the application server request data from the database

  • Now the Total illustration for the above diagram:-

    Client: This represents the user’s computer or any device that’s trying to access a website (https://www.example.com in the example).

  • Local DNS Server: This is a server maintained by your internet service provider (ISP) that stores a temporary database of frequently visited websites.

  • Authoritative DNS Server: This is the official server that stores the IP address for a specific domain name (https://www.example.com).

  • Firewall: This is a security system that monitors and controls incoming and outgoing network traffic based on a set of rules.

  • Load Balancer: This distributes incoming traffic across multiple servers in a network.

  • Web Server: This server stores and delivers static content of web pages, like HTML, CSS and JavaScript files.

  • Application Server: This server generates dynamic content, like personalized web pages or applications.

  • Database: This stores data that is used to generate dynamic content.

The process goes like this:

  1. The client tries to access a website (https://www.example.com) by entering the URL in a web browser.

  2. The client doesn't know the IP address of https://www.example.com, so it first contacts its local DNS server (provided by your ISP) and asks for it.

  3. The local DNS server checks its cache to see if it has the IP address for https://www.example.com stored.

  4. If the local DNS server doesn't have the IP address in its cache (shown as a cache miss in the image), it then contacts the authoritative DNS server for https://www.example.com and asks for it. In the image, the authoritative DNS server is labelled as ns1.example.com or ns2.example.com

  5. The authoritative DNS server responds with the IP address for https://www.example.com (10.10.10.1 in the example).

  6. The local DNS server stores the IP address for https://www.example.com in its cache for future reference (cache hit).

  7. The local DNS server then responds back to the client with the IP address of https://www.example.com.

  8. The request goes through a firewall, which filters traffic based on security rules.

  9. The request is encrypted using HTTPS, which ensures the privacy and integrity of the data being transmitted.

  10. The client initiates a connection to the web server using the IP address and the appropriate port number (port 443 for HTTPS).

  11. The request reaches Google's network and is distributed by a load balancer to an appropriate web server.

  12. The web server retrieves static content (HTML, CSS, JavaScript) from its storage and sends it back to the client.

  13. The application server might then communicate with a database to retrieve additional information needed for the web page.

  14. The application server generates dynamic content and sends it back to the web server.

  15. The web server combines the static and dynamic content and sends the complete web page back to the client.

  16. The client’s browser receives the response, decrypts it (if using HTTPS), and renders the web page on your screen.

In essence, DNS (Domain Name System) translates human-readable domain names into numerical IP addresses that computers can understand. The firewall protects the network from malicious traffic. HTTPS encrypts communication between the client and the server. The load balancer distributes incoming traffic to improve efficiency. The web server delivers static content, while the application server generates dynamic content by interacting with a database.

0
Subscribe to my newsletter

Read articles from Zerihun Shiferaw directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Zerihun Shiferaw
Zerihun Shiferaw

π‘°β€™π’Ž π’Šπ’π’”π’‘π’Šπ’“π’†π’… π’ƒπ’š π’„π’“π’†π’‚π’•π’Šπ’—π’Šπ’•π’š π’Šπ’ 𝒂𝒍𝒍 π’Šπ’•π’” π’‡π’π’“π’Žπ’”β€”π’˜π’‰π’†π’•π’‰π’†π’“ π’Šπ’•β€™π’” 𝒄𝒐𝒅𝒆, 𝒂𝒓𝒕, π’Žπ’–π’”π’Šπ’„, 𝒐𝒓 π’‚π’π’šπ’•π’‰π’Šπ’π’ˆ 𝒕𝒉𝒂𝒕 π’”π’‘π’‚π’“π’Œπ’” π’Šπ’Žπ’‚π’ˆπ’Šπ’π’‚π’•π’Šπ’π’. π‘°β€™π’Ž 𝒉𝒆𝒓𝒆 𝒕𝒐 𝒄𝒆𝒍𝒆𝒃𝒓𝒂𝒕𝒆 π’Šπ’•.