🌐 Web Architecture: How the Web Works (All-in-One Guide)
Web communications rely on four essential pillars working together seamlessly:
1. 🧒 Client vs. Server Model
The Client (You): This is your web browser (Chrome, Safari, Edge). It acts like a customer ordering food at a restaurant: *"Can I please have the HTML page?"*The Server (The Host): This is a powerful remote computer storing website files. It acts like the chef: it receives your request, finds the files, and sends them back to your screen.
2. 📞 DNS (Domain Name System): The Web's Phonebook
Computers don't understand words like `nextsem.online`; they only understand numeric IP addresses (like `192.168.29.170`).DNS acts as the contacts phonebook of the internet. When you type a domain name, the DNS resolver looks up the name and retrieves the matching IP address in milliseconds!
3. 🏠 IP Addresses (IPv4 vs. IPv6)
Every connected device needs a unique address so data packets reach the right destination.IPv4: The classic 32-bit format using 4 numbers separated by dots (e.g., `192.168.1.1`).IPv6: The 128-bit hexadecimal format (e.g., `2001:0db8:85a3::8a2e:0370:7334`) created to provide trillions of new addresses.
4. 🤝 The TCP 3-Way Handshake
Before sending data, your browser and server perform a 3-step handshake to establish a reliable connection:
SYN (Hello): Client asks *"Can we connect?"*SYN-ACK (Hello Back): Server replies *"Yes! I hear you, can you hear me?"*ACK (Confirm): Client confirms *"Yes! Connection established, let's transfer data!"*