
Session - 4 (17-12-2024)
AWS with Devops
Overview
This session explains the fundamental processes behind accessing a website, starting from a user typing a URL into a browser to the page rendering. It details the journey of a request, including the roles of DNS for name resolution, the function of servers (application and database), the importance of protocols like HTTP and HTTPS, the security provided by firewalls, and the efficiency gained through load balancers. The session emphasizes that understanding these backend processes is crucial for troubleshooting and managing applications effectively.
Save this permanently with flashcards, quizzes, and AI chat
Chapters
- Client-server architecture involves clients requesting resources and servers responding.
- One-tier architecture (client and server on the same machine) is obsolete due to performance and security issues.
- Two-tier architecture separates client and server, but placing application and database on the same server is not recommended for production.
- Three-tier architecture separates client, application server, and database server, offering better performance and security.
- Different environments (Dev, Test, Pre-prod, Prod) are used for software development and deployment.
- When a user types a URL (hostname) into a browser, the browser needs both the hostname and its corresponding IP address to proceed.
- Humans remember hostnames (like google.com), while computers use IP addresses.
- DNS (Domain Name System) acts as a translator, mapping hostnames to IP addresses, similar to a phone's contact list.
- The request first checks a local DNS cache (often in the /etc/hosts file) before querying external DNS servers.
- The DNS resolution process involves root name servers, top-level domain (TLD) servers (like .com), and authoritative name servers to find the IP address.
- Data travels across the network in packets, containing information about the source, destination, and protocol.
- Protocols like HTTP (port 80) and HTTPS (port 443) govern how web browsers communicate with servers.
- HTTPS is the secure version of HTTP, encrypting data for safe transmission.
- Firewalls act as security guards, inspecting incoming and outgoing traffic and blocking unauthorized access based on predefined rules (e.g., allowing HTTPS but denying HTTP).
- Other protocols include SSH (port 22) for Linux machine access and RDP (port 3389) for Windows machine access.
- Directly exposing servers to the internet is risky; a load balancer acts as an intermediary, similar to a web server.
- Load balancers distribute incoming traffic across multiple application or web servers.
- This distribution, often using a round-robin method, prevents any single server from being overloaded and ensures high availability.
- If one server fails, the load balancer redirects traffic to the remaining healthy servers.
- Users access applications via a single, friendly DNS name (like 'raj.com'), which resolves to the load balancer.
- The entire process involves the browser requesting a hostname, DNS resolving it to an IP, the request passing through firewalls, and being handled by load balancers which distribute it to application and database servers.
- Understanding this flow allows for effective troubleshooting, pinpointing issues at the firewall, load balancer, web server, or application server level.
- The `nslookup` command can be used to find the IP address of a website and view its associated DNS records, including load balancer names.
- The final response travels back through the same path: DB server -> App server -> Load Balancer -> Firewall -> Browser.
Key takeaways
- Understanding the client-server model and tiered architectures is fundamental to web application deployment.
- DNS is essential for translating human-readable hostnames into machine-readable IP addresses.
- Protocols like HTTP and HTTPS dictate how data is transmitted, with HTTPS providing crucial security.
- Firewalls protect networks by controlling access based on rules, enhancing security.
- Load balancers are vital for distributing traffic, ensuring application availability and scalability.
- The entire process from typing a URL to seeing a webpage involves multiple interconnected components and steps.
- Troubleshooting web application issues requires knowledge of the entire request-response lifecycle.
Key terms
Test your understanding
- What is the primary role of DNS in accessing a website, and how does it differ from how humans typically remember website information?
- Explain the security implications of using HTTP versus HTTPS and how a firewall enforces these differences.
- How does a load balancer contribute to the high availability and scalability of web applications?
- Describe the step-by-step process that occurs when a user types a URL into their browser and expects to see a webpage.
- Why is a three-tier architecture generally preferred over a two-tier architecture for production environments?