Unlocking the Web: A Beginners to Advance Guide

Maurya kaviMaurya kavi
5 min read

HTTP vs HTTPS :

In this digital era where everything happens from your professional to the social life through internet all your data are publicly available and can be access through anyone in a multiple ways. so it’s been very important to understand what exactly are you doing and where on the internet ? is it secure or not ? so let’s understand which can be secure for your data transmission.

HTTP(Hypertext transfer protocol) and HTTPS ( hyper text transfer protocol secure)

Hypertext refers to the web docs whereas protocol contains the set of rules to make the system to work on certain instruction.

HTTP:

HTTP is a protocol used to transfer data between client(browser) and server. Enable the loading of web page including from text, images, videos, animation to the client side.

HTTPS:

secure version of http. it uses encryption to protect the data exchange between a user’s browser and website, ensuring authenticity.

Features & Limitation of HTTP and HTTPS:

Tech Jargons:

  • Stateless Protocol:

You as a client visiting a web page many times, but you are always being treated as a new user.

Means, your previously visited data has not been stored by that web page.

(web page has not store previous memory/request)

  • Session:

Till the connection has been between client and server to exchange data, their information/request has been stored during that period.

(stored state between fronted and backend)

  • TLS/SSL certificate:

    SSL (secure sockets layer) or TLS(Transport Layer Security) certificate encrypts the data in HTTPS.

    The exchange of certificate between client and server ensure more security in data transmission.

  • TCP: transmission control protocol

  • FTP: File transfer protocol

  • IP: Internet protocol

  • DNS: Domain Name Server

  • Header- Pass additional information

  • Payload- Actual data like email, password

  • Cache- Store the data

OSI Model:

The OSI Model (Open Systems Interconnection Model) is a conceptual framework used to understand and standardize the functions of a networking system. It divides the process of data communication into seven distinct layers, each with specific responsibilities. This model helps network devices communicate effectively, providing interoperability between different products and technologies.

7 Layers of the OSI Model

  1. Layer 1: Physical Layer

    • Function: Transmits raw bits (binary data) over a physical medium (cables, fiber optics, etc.).

    • Examples: Ethernet cables, USB, network adapters.

    • Key Devices: Hubs, switches (at Layer 1), repeaters.

  2. Layer 2: Data Link Layer

    • Function: Provides error detection and correction for data frames, and manages access to the physical medium.

    • Examples: MAC addresses, Ethernet (IEEE 802.3), Wi-Fi (802.11).

    • Key Devices: Switches, bridges.

  3. Layer 3: Network Layer

    • Function: Determines the best path for data packets to travel between devices in different networks.

    • Examples: IP (Internet Protocol), ICMP (Internet Control Message Protocol).

    • Key Devices: Routers.

  4. Layer 4: Transport Layer

    • Function: Ensures reliable data transfer, flow control, and error handling between end systems.

    • Examples: TCP (Transmission Control Protocol), UDP (User Datagram Protocol).

    • Key Devices: Firewalls.

  5. Layer 5: Session Layer

    • Function: Manages sessions or connections between applications. It establishes, maintains, and terminates sessions.

    • Examples: Remote Procedure Call (RPC), NetBIOS.

  6. Layer 6: Presentation Layer

    • Function: Translates data into a format understandable by the application layer (data encryption, compression).

    • Examples: SSL/TLS, JPEG, MPEG.

  7. Layer 7: Application Layer

    • Function: Provides network services directly to end-user applications.

    • Examples: HTTP, HTTPS, FTP, SMTP, DNS.

    • Key Devices: Web browsers, email clients.

3-way handshake :

TCP:

Transmission Control Protocol:

  • Reliable- All the data is transferred carefully, and re-transmitted if data is missed.

  • Ordered-Data packet is delivered is the same ordered as they were send.

  • 3-way handshake.

  • It leads to latency in data delivering.

  • Takes more time in processing the data.

  • examples: uses in text messages, cricket match live, YouTube live zoom chat box.

UDP:

(User Data Program)

  • Faster but less reliable

  • It can loss the packets(data)

  • examples: uses in video calls, zoom video call.

DNS

DNS (Domain Name System)

The Domain Name System (DNS) is a hierarchical and decentralized system used to translate human-readable domain names (like www.example.com) into machine-readable IP addresses (like 192.0.2.1). DNS acts as the phonebook of the internet, enabling users to access websites and online resources using easily memorable names instead of numeric IP addresses.


How DNS Works

  1. User Action: You type www.chaicode.com into a browser.

  2. Query to Recursive Resolver: The request goes to a DNS resolver, usually provided by your ISP or a public DNS service like Google DNS (8.8.8.8) or Cloudflare (1.1.1.1).

  3. Recursive Lookup Process:

    • Root Server: The resolver queries a root server to find the top-level domain (TLD) for .com.

    • TLD Name Server: The TLD server provides the address of the authoritative server for chaicode.com.

    • Authoritative Name Server: The final lookup returns the IP address of www.chaicode.com.

  4. Result Returned: The resolver sends the IP address to your browser, which uses it to connect to the web server and load the website.


DNS Components

  1. DNS Resolver: The first point of contact for DNS queries; performs the lookup process.

  2. Root Servers: Direct queries to TLD servers for the relevant domain.

  3. TLD Servers: Handle top-level domains like .com, .org, .net.

  4. Authoritative Name Servers: Store the actual mapping of domain names to IP addresses.

  5. Caching: DNS resolvers cache responses to speed up future queries.

11
Subscribe to my newsletter

Read articles from Maurya kavi directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Maurya kavi
Maurya kavi