Computer network
A computer network is a collection of computers linked together that communicate via some A network consists of interconnected computers that communicate using established protocols. Essentially, the Internet is a vast network of these linked devices and computers. It serves as the foundation for global information sharing, video streaming, and long-distance communication. But what happens behind the scenes? How does entering a web address lead to content appearing on our screens? To explain, let's dive into a simple example: typing google.com into our web browser and pressing Enter.
Firewall
A firewall is a network security device or software that monitors and controls incoming and outgoing network traffic based on predetermined security rules. Its primary purpose is to establish a barrier between your internal network (trusted) and external networks (untrusted, like the internet) to protect against unauthorized access, cyberattacks, and data breaches.
When you search "google.com" and press Enter, your computer sends a request to that domain. If you have a firewall in place, it will evaluate this request based on its configured rules. Here's what happens step-by-step:
Outgoing Request Check: The firewall checks the outgoing request from your browser to "google.com".
DNS Request: Your browser will perform a DNS request to resolve "google.com" to its IP address. The firewall may monitor this DNS traffic.
Access Control: The firewall assesses whether to allow or block the connection based on its rules (e.g., blocking certain domains or types of content).
Traffic Filtering: If allowed, the firewall may still filter the traffic, scanning for potential threats or malicious content.
If "google.com" is not a trusted site or is known for hosting malicious content, a well-configured firewall might block the connection to protect your system. In corporate environments, firewalls are often configured to block access to unauthorized or non-work-related sites to ensure security and productivity.
Servers
To begin with, it's important to recognize that the Internet is a network of computers, and any information you request via your browser is stored on another computer within this network. These specialized computers are known as servers. Servers are dedicated machines (or sometimes software) that host information and provide the requested data to clients (users). They are designed to operate continuously, 24/7, with enhanced resources to support this constant operation. Typically, servers are housed in data centers, which ensure a reliable power supply and optimal environmental conditions. Therefore, when you type google.com
, you are essentially requesting access to specific content. However, your browser does not inherently know the exact location of this information among the vast array of interconnected computers on the Internet. This is where the IP address
comes into play.
TCP/IP protocols
Every computer on the internet has a unique identifier called an IP
(Internet Protocol) address. This uniqueness ensures that no two computers have the same IP address. For example, if there are 10 billion distinct servers, there would be 10 billion unique IP addresses—quite fascinating, isn't it? The IP address acts as an identifier for computers within the vast internet network. An IP address might look like 127.14.22.49
in the older format, or something like fe90::3491:1453:7b43:f752%20
in the latest IPv6 format.
In addition to IP addresses, the Transmission Control Protocol (TCP) plays a crucial role in ensuring reliable communication over the internet. TCP manages the sending and receiving of data packets, ensuring that they are delivered accurately and in the correct order.
Traditionally, accessing information from sites like Google
or Facebook
would require knowing the specific IP addresses of their servers. However, this is impractical because IP addresses are not user-friendly or easy to remember. This is where the concept of a 'domain name' becomes essential.
DNS (Doman Name System)
Each server is given a unique name known as a domain name. When you type something into your browser, you're entering this domain name instead of the IP address. Every IP address on the internet has a corresponding domain name, making it easier for users to interact without dealing with the complexities of IP addresses. It's much simpler to remember google.com than a sequence of numbers like 127.0.23....
However, it is significant to understand that domain names are essentially aliases. To find the actual location of a server, you need the real IP address. This is where the DNS server comes into play. The DNS server, another computer on the internet, has a simple task: to recieve DNS request by taking a domain name from your web browser and return the corresponding IP address. This process is managed by a 'DNS Resolver,' which first checks the local cache for the IP address—recently visited websites are often cached. If no match is found, the resolver contacts the Root DNS server, which then directs it to the Authoritative DNS server (also known as TLD - top-level domain). This complex system makes up the DNS server. Once the IP address is found, the DNS server sends it back to the DNS resolver, which then provides it to your web browser. And just like that, you can access the server - 'google.com'.
Web servers
In its basic function, a web server responds to requests by delivering static content stored within it, such as HTML documents and other related files. This process follows a 'Client-Server' architecture, where the client requests information from the server, and the server provides the requested information if available. If the resource is not found, a '404' error page is returned, indicating the content is missing. However, web servers are not standalone; they are often part of a larger system with additional servers, adding complexity. For example, since a web server mainly serves static content like documents, images, and videos, the question arises: how does it handle dynamic information, such as usernames, notifications, and personalized data specific to a user's request? This is where the integration of an Application server and a Database server becomes essential.
Application and Database servers
An application server operates behind a web server, collaborating closely with a database server. Dynamic information and business data, such as product details or user data, are typically stored in a database. When a web server needs to deliver dynamic content instead of static content, it sends a request to the application server. The application server then retrieves the necessary data from the database server. After obtaining the data, the application server processes it, applying any required business logic or refinements. The refined data is then sent back to the web server, which integrates it with the static content. The web server finally responds to the client, providing personalized and dynamic information, thereby enhancing the user experience. Sounds good, doesn't it? At this point, we've covered almost the entire process from typing 'google.com.' However, the story doesn't end here. Like regular computers, servers can face challenges when dealing with a high volume of traffic. Imagine a website with millions or even billions of users each day—a massive demand for the server to handle numerous requests. The result? A degraded user experience, with information taking longer to load and users potentially unable to access the application at all. So, how do we address this issue? This is where a load balancer comes into play.
Load balancers
A Load Balancer (LB) acts as an additional server within a web stack, primarily responsible for distributing traffic among multiple servers. Without a load balancer, servers hosting the same application operate independently, leading to potential issues if traffic spikes on individual servers. However, a load balancer changes this dynamic by evenly distributing incoming requests (or according to a specified algorithm) to prevent any single server from being overwhelmed. For example, with three servers, the load balancer will efficiently distribute traffic among them based on the chosen load balancing algorithm. This is particularly beneficial for applications requiring high availability and introduces redundancy, eliminating the risk of a 'Single Point of Failure.' If one server fails, the load balancer quickly redirects traffic to the remaining servers, ensuring continuous operation and significantly enhancing reliability and resilience.
Security - HTTPS/SSL
Additionally, securing web stacks involves implementing measures to ensure that messages exchanged between clients and servers are encrypted. This is achieved by installing an SSL certificate on the server and redirecting traffic from 'HTTP' to 'HTTPS'—the secure version of HTTP. But how does this security protocol work?
SSL, or Secure Socket Layer, is a powerful tool for encrypting information transmitted between clients and servers, using a mechanism known as 'public and private key' encryption. The public key is openly shared with any client requesting information from the server, while the private key remains securely stored on the server. Messages encrypted with the public key can only be decrypted using the corresponding private key. Therefore, when users send sensitive information, such as passwords or credit card details, only the server can interpret the encrypted data. This implementation of SSL ensures that the communication channel between clients and servers remains confidential and secure, protecting sensitive user information from potential unauthorized access during transmission.