0% found this document useful (0 votes)
14 views8 pages

Understanding HTTP Connections and Protocols

The document discusses HTTP connections, distinguishing between non-persistent and persistent connections, with persistent connections being the default in HTTP/1.1 for improved efficiency. It also covers the client-server paradigm and introduces the peer-to-peer model as a solution to its limitations, highlighting advantages and challenges. Additionally, it explains recursive DNS resolution, local and remote logging, SSH protocol components, HTTP request and response structures, FTP protocol, and the World Wide Web's functionality and document types.

Uploaded by

moulyababru23
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views8 pages

Understanding HTTP Connections and Protocols

The document discusses HTTP connections, distinguishing between non-persistent and persistent connections, with persistent connections being the default in HTTP/1.1 for improved efficiency. It also covers the client-server paradigm and introduces the peer-to-peer model as a solution to its limitations, highlighting advantages and challenges. Additionally, it explains recursive DNS resolution, local and remote logging, SSH protocol components, HTTP request and response structures, FTP protocol, and the World Wide Web's functionality and document types.

Uploaded by

moulyababru23
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Non-Persistent and Persistent Connections (10 Marks)

Introduction
HTTP uses TCP connections to transfer web objects. Depending on how the TCP connection is
managed, HTTP connections are classified as non-persistent and persistent connections.
Non-Persistent Connection
• A separate TCP connection is established for each request–response pair.
• Steps involved:

1. Client opens TCP connection


2. Sends request
3. Server sends response and closes connection
• For a web page with N embedded objects, N + 1 TCP connections are required.
• Each connection requires connection establishment and termination.
• Causes high overhead due to multiple handshakes.
• Increases delay and server load.
• Requires multiple buffers and resources.
• Used in HTTP versions prior to 1.1.
Persistent Connection
• A single TCP connection is reused for multiple requests and responses.
• Server keeps the connection open after sending a response.
• Connection is closed only on client request or timeout.
• Multiple objects can be transferred using the same connection.
• Reduces round-trip time and handshakes.
• Requires fewer resources and buffers.
• Improves performance and efficiency.
• Default behavior in HTTP/1.1.
Client–Server Paradigm (Traditional Paradigm)
• It is the traditional and most popular communication model on the Internet.
• In this paradigm, the server is a service provider and the client is a service requester.
• The server process runs continuously, waiting for requests from clients.
• The client process runs only when service is needed and stops after completion.
• Normally few servers exist, but many clients can request service at any time.
• Communication happens between two application programs, but their roles are fixed.
• A client program cannot act as a server and vice versa.
• A separate client program and server program must be written for each service.
• Example analogy:
o Telephone directory center = Server
o Subscriber calling for information = Client
• Common Internet applications using this paradigm:

o World Wide Web (HTTP)


o File Transfer Protocol (FTP)
o Email
o Secure Shell (SSH)
Limitations / Problems
• Heavy communication load is concentrated on the server.
• Server must be a powerful and expensive machine.
• If too many clients connect, server may become overloaded.
• Requires an organization willing to operate and maintain the server.
• Service must usually be commercially beneficial to justify cost.
Peer-to-Peer (P2P) Paradigm (New Paradigm)
• Introduced to solve limitations of the client–server model.
• No dedicated server is required.
• Every participating computer is called a peer.
• A peer can provide service and receive service.
• A peer can do both at the same time.
• Communication and responsibility are shared among all peers.
Where P2P Fits Well
• Internet Telephony → both users act like peers.
• File Sharing Applications → users share data with each other.
• A peer does not need to stay online continuously, unlike a server.
Advantages
• Highly scalable.
• Cost-effective because there is no need for powerful central servers.
• Reduces load concentration.
Challenges
• Security issues, because control is distributed.
• Not all applications can use P2P effectively.
• Some users do not want to share their resources.
• Example applications:
o BitTorrent

o Skype
o IPTV
o Internet Telephony
Recursive Resolution (DNS)
Definition:
Recursive resolution is a DNS query process in which the DNS server takes full responsibility for
resolving a domain name and returns the final IP address to the client.
Working of Recursive Resolution
1. Client sends a DNS query to a recursive resolver.
2. The resolver contacts the root DNS server.
3. Root server directs it to the TLD server (e.g., .com, .org).
4. TLD server directs it to the authoritative DNS server.
5. Authoritative server returns the IP address.
6. Recursive resolver sends the final IP address to the client.

Local Logging
In local logging, the user logs into the local system. The keystrokes typed by the user are accepted by
the terminal driver, which passes them to the local operating system. The operating system
interprets the characters and starts the required application or utility. All activities take place inside
the local machine, so no network is needed.
Remote Logging (TELNET)
Remote logging is used when a user wants to access programs on a remote computer. The
keystrokes are accepted by the terminal driver, but the local OS does not interpret them. Instead,
they are passed to the TELNET client, which converts them into Network Virtual Terminal (NVT)
format and sends them across the Internet to the remote computer. At the remote machine, the
TELNET server converts them again and passes them to a pseudoterminal driver, which makes the
operating system believe the input is coming from a real terminal. The remote OS then runs the
required application.

SSH (Secure Shell) – Definition and Components (10 Marks)


Definition of SSH:
SSH (Secure Shell) is a network security protocol used for secure remote login and command
execution over an insecure network. It provides confidentiality, authentication, and data integrity
by encrypting all transmitted data.
Components of SSH
1. SSH Transport Layer Protocol
• Establishes a secure connection between client and server.
• Performs server authentication.
• Provides encryption to protect data from eavesdropping.
• Ensures data integrity using message authentication codes (MAC).
2. SSH Authentication Protocol
• Authenticates the client user to the server.
• Supports password-based authentication.
• Supports public key authentication for higher security.
• Ensures that only authorized users can access the remote system.
3. SSH Connection Protocol
• Runs over the secure transport layer.
• Manages multiple logical channels over a single SSH connection.
• Supports:
o Remote shell access
o Remote command execution
o Secure file transfer and port forwarding

HTTP Request Message – Medium Explanation

The HTTP request message consists of four parts. The first line is called the request
line, which has three fields separated by spaces: method, URL, and version. The
method field specifies the type of request such as GET, HEAD, POST, PUT,
DELETE, TRACE, CONNECT, and OPTIONS. GET is most commonly used to
request a webpage, HEAD is used to get only information about a page, PUT and
POST are used to send data to the server, TRACE is for debugging, DELETE
removes a webpage, CONNECT is used mainly by proxy servers, and OPTIONS asks
about webpage properties. The URL field specifies the address of the webpage and
the version field indicates the HTTP version, usually HTTP/1.1. After the request
line, there may be one or more header lines that send additional information from the
client to the server. Finally, there may be an optional message body, usually present
in PUT or POST, which carries data or files to be sent to the server.

HTTP Response Message – Better Short Explanation

An HTTP response message is generated by the server and sent back to the client. It consists
of four parts: a status line, header lines, a blank line, and sometimes a body. The status line
is the first line and contains three fields: the HTTP version, a three-digit status code, and a
status phrase that explains the status. Status codes are grouped as follows: 100-series for
information, 200-series for success (e.g., 200 OK), 300-series for redirection, 400-series
for client errors, and 500-series for server errors.

After the status line, there are response header lines, which carry additional information
such as server identity, content type, date, and other properties of the document. Each header
line contains a header name, a colon, a space, and its value. A blank line separates the
headers from the next part. Finally, the body may appear in the response message. The body
usually contains the requested webpage or data, but in some responses (like HEAD), the body
is absent.

ACTION of HTTP

Method Action
GET Requests a document from the server
HEAD Requests information about a document, but not the document itself
PUT Sends a document from the client to the server
POST Sends information from the client to the server
TRACE Echoes the incoming request (used for debugging)
DELETE Removes the web page
CONNECT Reserved (used by proxy servers)
OPTIONS Inquires about available options

FTP (File Transfer Protocol) – Medium Short Explanation


FTP is an application layer protocol used to transfer files between a client and a server over the
Internet. It follows the client–server model, where the user runs an FTP client to communicate with
an FTP server.
FTP uses two separate TCP connections. The control connection (port 21) is used for sending
commands and receiving replies and remains open throughout the session. The data connection
(usually port 20) is used only for transferring files and is opened and closed whenever data is
transferred.
Before accessing files, the user must log in by providing a username and password. After successful
authentication, the user can perform various operations such as uploading files, downloading files,
renaming files, deleting files, and listing directories. FTP supports ASCII mode for text files and
binary mode for images and other binary data. It can also work in active and passive modes for
establishing data connections.
A major disadvantage of FTP is that it is not secure, because data and passwords are sent in plain
text. Therefore, secure versions like FTPS and SFTP are often used.

Difference between SSH and TELNET

World Wide Web (WWW)


The World Wide Web is a distributed information system that allows users all over the world to
access information through the Internet. Information is stored as web pages on web servers, and
users access them using a web browser. WWW works on the client–server model and uses HTTP
protocol for communication.
Web pages are connected to each other using hyperlinks, so a user can easily move from one page
to another. WWW supports hypermedia, meaning it can handle text, images, audio, video, and
graphics. It is not stored in one place; instead, information is distributed across many servers
worldwide.
Web Documents
A web document is any document stored on a web server and accessed through the web. Web
documents are mainly of three types:
1. Static Web Documents
These have fixed content. They are created and stored on the server in advance and the same
content is delivered to every user. Example: normal HTML pages.
2. Dynamic Web Documents
These documents are created at the time of request. They are generated by programs or scripts on
the server and may change depending on time, user, or data. Example: pages showing current date,
user account data, etc.
3. Active Web Documents
In this case, the program is sent to the client’s machine and executed there. The document becomes
active at the client side to produce output. Example: Java applets, JavaScript programs.

Working of HTTP – Better Short Explanation


HTTP works based on the client–server principle. When a user types a URL in the browser, the
browser first creates a TCP connection with the web server (normally on port 80). After the
connection is established, the browser sends an HTTP request to the server. The request contains
the method (such as GET or POST), the URL of the web page, HTTP version, header fields, and
sometimes a body.
The web server receives the request, processes it, and prepares an HTTP response. The response
contains a status line (with status code like 200 OK, 404 Not Found), header fields, and usually a
body that carries the requested webpage or data. The browser then displays the received page to
the user. Depending on the type of connection, HTTP may close the connection after the response
(non-persistent) or keep it open for further requests (persistent).

You might also like