What happens when you type google.com in your browser and press Enter?
Have you ever wondered what happens when you press enter after typing https://www.google.com into your browser?
DNS request:
Let us start with a simple question:
how can computers connect with one another over the internet?
Every machine on the Internet has a unique number assigned to it, called an IP address. Without a unique IP address on your machine, you will not be able to communicate with other devices, users, and computers on the Internet. You can look at your IP address as if it were a telephone number, each one being unique and used to identify a way to reach you and only you.
For example, if Google's IP address is 142.250.200.238, typing this address in your browser may provide the same results as typing https://www.google.com.
The problem is that we, as humans, cannot remember IP addresses, so we use domain names such as google.com.
The Domain Name System (DNS) translates domain names such as google.com to IP Addresses such as 142.250.200.238.
How DNS transforms domain names into IP addresses:
The following steps happen:
1. The user types. www.google.com
2. The browser checks its local cache to see if there is a DNS resolution for www.google.com, If the browser cache does not contain a DNS resolution, the browser uses the operating system cache.
3. If the operating system does not give a DNS resolution for www.google.com, the browser queries the DNS resolver for an IP address.
4. The DNS resolver checks its local cache to determine if there is a DNS resolution for www.google.com. If it does not find one, the DNS resolver contacts the root server.
5. The root server sits at the top of the DNS hierarchy, however, they will only provide you with the IP addresses of the Top-Level Domain servers (TLDs), like ".com", ".NET", ".org", etc.; thus, the root server will direct the DNS resolver where to find the .com TLD server.
6. A Top-Level Domain (TLD) server is a Domain Name System (DNS) nameserver that keeps all the information for all domain names that share a common domain extension. As such, the .com TLD nameserver contains all the data related to all the .com domains. If you want to access Google.com, therefore, your browser needs to contact the .com TLD server.
You can find the authoritative name server through the .com TLD server. The authoritative name server will be a subdomain of google.com, such as ns1.google.com, therefore the .com server will provide you with the IP address of a subdomain like ns1.google.com.
7. The authoritative nameserver stores information specific to the domain name it serves (e.g., google.com), and it can provide a recursive resolver with the server's IP address as given in the DNS A record. So the resolver will now retain the IP address of google.com and will be able to respond to the DNS query that occurred from the browser.
TCP/IP:
TCP/IP is a suite of protocols used by devices to communicate over the Internet and most local networks. It is named after two of it's original protocols: the Transmission Control Protocol (TCP) and the Internet Protocol (IP)
When you request a web page in your browser, your computer sends TCP packets to the web server's address, asking it to send the web page back to you. The web server responds by sending a stream of TCP packets, which your web browser stitches together to form the web page. When you click a link, sign in, post a comment, or do anything else, your web browser sends TCP packets to the server, and the server sends TCP packets back. TCP is all about reliability—packets sent with TCP are tracked so no data is lost or corrupted in transit.
Firewall:
A firewall is a barrier between a private network and an external network, usually the internet, that controls traffic between the two networks. It is implemented using either hardware or software. Firewalls enable, limit, and block network traffic based on predefined rules in the hardware or software, evaluating data packets that request admission into the network.
All of the benefits of firewall security start with the ability to monitor network traffic. Data coming in and out of your systems creates opportunities for threats to compromise your operations. By monitoring and analyzing network traffic, firewalls leverage preestablished rules and filters to keep your systems protected.
So, when you put www.google.com into your browser, you are sending a request to the Google web server, which will assess your incoming traffic and, if authorized, provide you with a stream of TCP packets containing the desired webpage.
领英推荐
What are port numbers:
A simple illustration for the port number is ordering something from a shopping mall. The mall functions similarly to a web server, providing you with the content you demand. The mall's location on the map corresponds to the IP address of your web server. And, just as the many businesses and services in the mall, such as stores, restaurants, and post offices, are marked with numbers, so is the server, which has port numbers that indicate which service you are attempting to access, such as ssh, http, and https. For example, the https protocol uses port number 443, whereas the http protocol uses port 80.
This implies that when you type https://www.google.com in your browser, you are attempting to send an https request to a google webserver that is listening on port 443.
HTTPS/SSL:
Hyper Text Transfer Protocol Secure (HTTPS) is the secure version of HTTP, the protocol over which data is sent between your browser and the website that you are connected to. The 'S' at the end of HTTPS stands for 'Secure'. It means all communications between your browser and the website are encrypted. HTTPS is often used to protect highly confidential online transactions like online banking and online shopping order?forms.
HTTPS pages typically use one of two secure protocols to encrypt communications: SSL (Secure Sockets Layer) or TLS (Transport Layer Security).
All communications sent over regular HTTP connections are in 'plain text' and can be read by any hacker that manages to break into the connection between your browser and the website. This presents a clear danger if the 'communication' is on an order form and includes your credit card details or social security number. With an HTTPS connection, all communications are securely encrypted. This means that even if somebody managed to break into the connection, they would not be able to decrypt any of the data that passes between you and the?website.
Single Point of Failure (SPOF):
A single point of failure (SPOF) is a weakness in the design, configuration, or implementation of a system, circuit, or component that can cause the entire system to fail due to a single malfunction or fault. If Google had only one server to service all https requests, that server might not be able to handle such high traffic; thus, they have tens of thousands of servers instead. To do this, web traffic must be routed to these servers, which is the responsibility of a load balancer.
Load balancer:
The load balancer will distribute the work-load of your system to multiple individual systems, or group of systems to reduce the amount of load on an individual system, which in turn increases the reliability, efficiency and availability of your enterprise application or website
Differences between a web server, an application server, and a database server:
A web server is a software component that delivers static data like images, files, and text in response to client requests. An application server adds business logic to compute the web server's response.
An application server extends the capabilities of a web server by supporting dynamic content generation, application logic, and integration with various resources. It provides a runtime environment where you can run application code and interact with other software components, like messaging systems and databases. It uses business logic to transform data more meaningfully than a web server.
A database server runs a database management system and provides database services to clients. The server manages data access and retrieval and completes clients’ requests.
When you attempt to access interactive content on a website, the process works as follows: