Explain what happens when you type https://www.google.com in your browser and press Enter.
Several processes happen behind the scenes to deliver website content to our computers. The step-by-step breakdown is as follows:
DNS REQUEST:
The first step in accessing the domain name https://www.google.com is to perform a Domain Name System (DNS) lookup. Your computer or local host sends a request to a DNS server to translate the domain name you entered into an IP (Internet Protocol) address. The DNS server looks up the IP address associated with the domain name and returns it to your computer. If the DNS server doesn't have the IP address in its cache, temporary storage storing frequently accessed data will query other DNS servers until it finds the IP address.
TCP/IP:
Once your computer has the IP address of the website https://www.google.com, which you want to access, it establishes a TCP (Transmission Control Protocol) connection with the web server at that IP address. TCP/IP is a set of standardized rules that allow devices on either a private or public network to communicate and transfer data between themselves.
FIREWALL:
The connection may be blocked by a firewall if https://www.google.com is known to be malicious or if the network administrator has blocked access to the website for security reasons. If the connection is allowed, the web server will respond to the request from the client.
Examples of firewalls include Windows Firewall, Juniper SRX Series, Cisco ASA, etc
HTTPS/SSL:
if the website has an SSL (Secure Sockets Layer) certificate installed, the connection will be encrypted using HTTPS (Hypertext Transfer Protocol Secure). SSL ensures that the data exchanged between your computer and the website is secure and cannot be intercepted by a third party.
LOAD BALANCER:
If the website is hosted on multiple web servers, a load balancer will distribute the incoming requests among the servers to ensure that each server is handling an equal amount of traffic.
Examples of load balancers include HAProxy, Microsoft Azure LB, Citrix ADC, etc
WEB SERVER:
Once the TCP connection is established and the HTTPS handshake is complete, your web browser sends an HTTP (Hypertext Transfer Protocol) request to the web server. The web server processes the request and sends an HTTP response back to your browser. Some of the popular web servers used today include Apache HTTP Server, Microsoft IIS, Nginx, and Google Web Server.
APPLICATION SERVER:
If the website requires dynamic content, the web server will forward the request to an application server. The application server processes the request and generates a response that is sent back to the web server.
Examples of dynamic content that can be generated are User-specific data, E-commerce transactions, Social media feeds, Messaging and chat, Analytics, database queries, etc.
Some popular examples of application servers include Oracle WebLogic Server, IBM WebSphere, Apache Tomcat, JBoss, and Microsoft IIS.
DATABASE:
If the application server needs to retrieve or modify data, it will send a request to a database server. The database server processes the request and sends a response back to the application server, which can then generate a response for the web server.
Some Examples of databases are MySQL, PostgreSQL, ObjectDB, OrientDB, InfluxDB, etc.
WEB SERVER to WEB BROWSER:
The web server receives the response from the application server or database server and sends it back to your web browser. Your web browser then renders the content, and you can see the website on your screen.