Networking Jargons for Web development

·

11 min read

Feeling overwhelmed by networking and internet jargon? Don’t worry! This guide will make everything crystal clear with easy-to-follow explanations and relatable examples. Let’s dive in and master the basics together! 🚀

Protocol

Protocols are like rules that help computers talk to each other. Imagine a postman delivering letters: for the postman to do his job correctly, he must follow certain rules, like checking the address, knowing where to deliver the letter, and ensuring it reaches the right person.

Similarly, protocols are the "rules" that computers follow to send and receive information. These rules ensure that data is sent to the right destination, in the right format, and without getting lost. Without protocols, computers wouldn’t be able to communicate effectively.

Some common types of protocols are:

  • HTTP (HyperText Transfer Protocol): Used to access websites. For example, when you type www.google.com in your browser, HTTP helps fetch the webpage from Google’s server.

  • FTP (File Transfer Protocol): Used to transfer files between computers, like uploading files to a website.

  • SMTP (Simple Mail Transfer Protocol): Used to send emails from one mail server to another.

Without protocols like HTTP, FTP, or SMTP, online communication simply wouldn’t happen.

Request-Response Model

The request-response model is like ordering food at a restaurant. You (the client) place an order (request) with a waiter (server). The waiter takes your order to the kitchen, prepares the food, and brings it back to you (response).

In web development, this model works the same way:

  1. You type a URL (e.g., www.examples.com) into your browser. This is the request.

  2. The server receives the request, processes it, and sends back the data (like the webpage) as the response.

Every time you browse the internet, this process happens behind the scenes!

HTTP Headers and Payload

Imagine sending a package through the mail. The header is like the information on the package (address, sender, weight), while the payload is the actual contents of the package.

Headers:

HTTP headers contain additional information i.e metadata, in key-value pairs that are sent along with HTTP requests and responses:

  1. Content-Type: Specifies the media type of the resource. For example, text/html for HTML documents, application/json for JSON data, or image/png for PNG images.

  2. Authorization: Contains credentials to authenticate the client with the server. This can include tokens, API keys, or user credentials.

  3. User-Agent: Identifies the client software making the request, such as a web browser or a mobile app.

  4. Accept: Indicates the media types that the client is willing to receive from the server.For instance, Accept: application/json, text/html indicates that the client prefers JSON or HTML responses. This information allows the server to send a resource representation that meets the client’s needs.

  5. Host: Specifies the domain name of the server and the TCP port number on which the server is listening.

Payload:

The payload is the actual data being sent. For instance:

  1. In a request, the payload could be form data submitted by the user.

  2. In a response, the payload might be the content of a webpage or the result of an API call.

Stateless Protocol

Think of a stateless protocol like visiting a self-service restaurant. Every time you go to the counter, the staff doesn’t remember what you ordered before—you have to tell them again.

Similarly, HTTP is stateless, meaning each request from your browser is treated as a new interaction. The server doesn’t "remember" you. To keep track of users (e.g., to stay logged in), websites use tools like cookies and sessions.

Why is HTTP Stateless?

HTTP is designed this way for simplicity and efficiency. By not storing past interactions, servers can handle more requests quickly and avoid being overwhelmed by keeping track of user data. This design helps make web browsing faster and more scalable.

HTTP Evolution

HTTP/0.9 – The Beginnings:

Introduced: Early 1990s.

Key Features: This was the first version of HTTP, very basic, supporting only the GET method. It was designed to handle only simple document retrievals using plain text.

HTTP/1.0 – Expansion of Capabilities:

Introduced: Officially specified in RFC 1945, 1996.

Key Features: HTTP/1.0 introduced additional methods like POST and HEAD, enabling the submission of data to the server and fetching headers respectively. It also included HTTP headers, allowing clients and servers to exchange additional information like content type and content length.

HTTP/1.0 in not publicly available.

HTTP/1.1 – Refinement and Optimization:

Introduced: Initially in 1997, updated in RFC 2616.

Key Features:

  1. Connection Reuse: It introduced persistent connections that allowed for multiple requests and responses over a single connection, significantly reducing latency.

  2. Chunked Transfers: This feature enabled data to be sent in a series of chunks, facilitating streaming and dynamic content generation.

  3. Caching Improvements: More sophisticated caching mechanisms improved network efficiency.

  4. Host Headers: Supported virtual hosting by allowing multiple domain names to be hosted at a single IP address. Host Headers allow a single server to host multiple websites. Imagine you have one computer (server) but you want to run several websites on it, like example.com and mysite.com. Host headers make it possible for the server to know which website to show when someone visits one of those domain names, even though they all share the same IP address.

  5. New Methods: Expanded the set of methods with PUT, DELETE, and others to support a wider range of actions for web resources.

HTTP/2 – Performance Enhancements:

Introduced: Approved in 2015, defined in RFC 7540

HTTP means HTTP/2. HTTP/2 uses HTTP/1.1 for fallback. HTTP/2 is like upgrading a single-lane road to a modern multi-lane highway. Let’s compare:

  • HTTP/1.1: Imagine you’re on a single-lane road. If there are many cars (requests), they must line up and wait their turn, making travel (loading) slow.

  • HTTP/2: Now, think of a multi-lane highway. Many cars can move at the same time, so they don’t need to wait, making travel (loading) much faster.

Key Features of HTTP/2:

  • Multiplexing: Allows multiple requests and responses to be sent simultaneously over a single connection.

  • Header Compression: Reduces the size of data sent back and forth.

  • Server Push: Lets servers proactively send resources to the browser before they’re requested.

So, HTTP/2 makes browsing faster by enabling more efficient data transfers, much like a busy highway that handles heavy traffic smoothly.

HTTP/3 – The Latest Evolution:

Under Development: Builds on HTTP/2 and switches from TCP to QUIC, a transport layer network protocol based primarily on UDP.

Key Features:

  1. QUIC Integration: Improves latency by enabling multiplexed streams over a single connection without head-of-line blocking that affects TCP.

  2. Enhanced Security: Incorporates TLS 1.3 from the start, optimizing connection and handshake security.

  3. Better Performance Under Poor Conditions: Specifically designed to perform better in conditions where packet loss and network fluctuations are common, which is particularly advantageous for mobile networks and emerging technologies.

TLS (Transport Layer Security)

Imagine you’re sending a letter with sensitive information (like your bank details). You wouldn’t send it without sealing the envelope, right? TLS is like sealing the envelope. It ensures that data sent between your browser and the server is encrypted and can’t be read by hackers.

Websites using TLS have URLs that start with https://, where the "s" stands for "secure."

SSL (Secure Sockets Layer)

SSL is the older version of TLS, similar to how DVDs replaced VHS tapes. While SSL is no longer widely used, people often say "SSL" when they really mean TLS. Both aim to secure online communication.

A cookie is like a note you leave for yourself to help remember something later. Imagine going to a library and borrowing a book. The librarian gives you a small card with your name and the book details. Each time you return, the card helps the librarian recognize you and your borrowing history.

In web development, cookies work the same way. They’re small pieces of data stored on your browser by a website. These cookies are sent back to the server with each request, helping it "remember" you.

What Are Cookies Used For?

  • Authentication: To keep you logged into a website without needing to re-enter your password every time.

  • Preferences: To remember your settings, like language or dark mode.

  • Tracking: To monitor user behavior for analytics or personalized ads.

Cookies make the web feel more personalized, like a website that "remembers" you. However, they need to be handled carefully to ensure user privacy and security.

Session

A session is like a temporary membership card you get when visiting a club. It identifies you while you’re there but is discarded once you leave.

On websites, a session is created when you log in or start using the site. It assigns a unique session ID to your interaction, allowing the server to remember you temporarily. This ID is usually stored in a cookie and expires when you log out or close the browser.

Cache

A cache is like a pantry where you store frequently used ingredients so you don’t have to go to the market every time you cook.

Similarly, a browser cache stores files from websites (like images, CSS, and JavaScript). The next time you visit the site, the browser loads these files from the cache instead of downloading them again, making the page load faster.

Caching improves speed and reduces server load, enhancing the user experience.

User Agent

A user agent is like your browser’s business card. When your browser communicates with a website, it introduces itself by saying, "Hi, I’m Chrome running on Windows!"

This information helps the server send content optimized for your browser and device.

TCP (Transmission Control Protocol)

TCP ensures reliable data delivery over the internet. It works by breaking data into smaller packets, sending them to the receiver, and making sure all packets arrive correctly and in order. If any packets are lost or damaged, TCP resend them. It’s like sending a series of letters with delivery guarantees—each one is checked, and missing ones are resent. This process makes TCP ideal for activities like browsing, emailing, or downloading, where accurate and complete information is essential. TCP focuses on reliability and ensures you get the exact data sent, no matter the network conditions.

FTP (File Transfer Protocol)

FTP is like a delivery service for files. Imagine you need to send a big package to a friend across town. You use a reliable courier to pick it up and deliver it.

Similarly, FTP is used to transfer files between computers over the internet. For example:

  • Uploading files to a website from your computer.

  • Downloading files from a server to your computer.

IP (Internet Protocol)

An IP address is like your home address on the internet. Just as a letter needs an address to reach you, every device on the internet has a unique IP address so data knows where to go.

There are two main types:

  • IPv4: A format like 192.168.1.1.

  • IPv6: A longer format like 2001:0db8:85a3:0000:8a2e:0370:7334, used as we run out of IPv4 addresses.

URL (Uniform Resource Locator)

A URL is like a map that tells you how to find something online.

Similarly, A URL (Uniform Resource Locator) is a specific type of identifier used to access information on the internet For example, this URL:

https://www.example.com/products?id=123 has three parts:

  • https: The protocol (how to access the data).

  • www.example.com: The domain (the website's address).

  • /products?id=123: The path and query (the specific page and details you’re looking for).

DNS (Domain Name System)

DNS is like a phonebook for the internet. When you type a website name (like www.google.com), DNS translates it into an IP address (like 142.250.72.238), so your browser can find the right server.

Without DNS, you’d have to remember long strings of numbers instead of website names!

UDP (User Datagram Protocol)

UDP (User Datagram Protocol) is used for fast and efficient data transmission over the internet. Here are some key uses:

Online Gaming: UDP is ideal for real-time applications like online gaming, where speed is more important than perfect accuracy. It allows for quick data transmission without waiting for acknowledgments.

Video Streaming: Services like live video streaming use UDP to send data quickly, ensuring smooth playback even if some data packets are lost.

QUIC (Quick UDP Internet Connections)

QUIC is an Internet transport protocol that multiplexes multiple streams over a single connection. It is designed to be faster and more secure than TCP, primarily by improving the performance of connection-oriented web applications that are currently using TCP.

VOIP (Voice over Internet Protocol)

VOIP is like making a phone call over the internet instead of traditional phone lines. Apps like Skype and Zoom use VOIP to allow voice and video communication.

Firewall

A firewall is like a security guard at the entrance of a building. It checks who’s trying to enter and ensures only authorized people get through.

Firewalls protect networks by monitoring and controlling incoming and outgoing traffic. They block threats like hackers and malicious software.

MAC Address (Media Access Control Address)

Definition: A unique hardware identifier assigned to a network interface card (NIC) by the manufacturer.

Format: Typically displayed in hexadecimal, e.g., 00:1A:2B:3C:4D:5E.

Purpose:

  1. Operates at the Data Link Layer of the OSI model.

  2. Used for communication within a local network (LAN).

  3. Key Point: Unlike IP addresses, MAC addresses are tied to hardware and do not change.