You are on page 1of 4

Rithik raj

CS201219
6D

Question 1

explain what is HTTP? persistent and non-persistent http


also elobrate the architecture oh HTTP?

The fundamental protocol used to send data between a client and a


server across the internet is called HTTP, or Hypertext send Protocol.
Since it is a stateless protocol, every request made by a client to a
server is distinct from all others. Due to the fact that the server does not
have to maintain track of the client's state, HTTP is incredibly efficient.

HTTP connections come in two flavours: permanent and non-persistent.


For every request, the client establishes a fresh connection with the
server in a non-persistent connection. As a result, the server must
terminate the connection after each request, which can be a time- and
resource-consuming process. With a persistent connection, the client
may establish just one connection with the server and send several
requests across it. By decreasing the number of times the server must
open and shut connections, this can enhance performance.

The architecture of HTTP is as follows:

1. The client sends a request to the server.


2. The server receives the request and sends a response back to the client.
3. The client receives the response and displays it to the user.

The request and response messages are made up of a series of headers and a
body. The headers contain information about the request or response, such as the
type of request, the size of the body, and the caching instructions. The body contains
the actual data being transferred, such as a web page or an image.
HTTP is a very important protocol for the internet. It is used to transfer data for web
pages, images, videos, and other types of content. Without HTTP, the internet would
not be the same.

Here are some additional details about HTTP persistent connections:

● Connection pooling: Connection pooling is a technique that allows a client to


reuse previously opened connections to the server. This can further improve
performance by reducing the number of times the server has to create and
destroy connections.
● Keep-alive: Keep-alive is a mechanism that allows a client to keep a
connection open to the server for a period of time after the initial request. This
allows the client to make multiple requests over the same connection, without
having to open a new connection for each request.

HTTP persistent connections can provide significant performance improvements


over non-persistent connections. However, they can also introduce some complexity,
such as the need to manage connection pools and keep-alive timers.

Question 2

draw and explain web caching cookies and descirbe state of cookies, why
cookies used also explian why web caching used, assumptions and
consequences of web caching

Web caching is a way to store copies of web pages in a local cache so that they can
be served to users more quickly. This can improve performance by reducing the
number of requests that need to be made to the origin server.

Cookies are small text files that are stored on a user's computer by a web server.
They can be used to store information about the user, such as their preferences,
login status, and browsing history. Cookies can be used to improve the user
experience by personalizing the user's experience and remembering their
preferences. They can also be used to track the user's browsing activity and target
them with advertising.
Both web caching and cookies can improve the performance and user experience of
web applications. However, they can also introduce some security and privacy
concerns.

Question 3

The Domain Name System (DNS) is a system that translates human-readable


domain names into machine-readable IP addresses. This allows users to access
websites and other resources by using domain names instead of IP addresses.

There are two main types of DNS queries: iterative and recursive.

● In an iterative query, the client computer sends a DNS query to a DNS server.
The DNS server then checks its own database for the requested information.
If the DNS server does not have the requested information, it will return a
referral to another DNS server. The client computer will then send the DNS
query to the referred DNS server. This process continues until the client
computer finds a DNS server that has the requested information.
● In a recursive query, the client computer sends a DNS query to a DNS server.
The DNS server then recursively searches its own database and the
databases of other DNS servers until it finds the requested information. The
DNS server then returns the requested information to the client computer.

The structure of the DNS is hierarchical. There are three main levels in the DNS
hierarchy:

● Top-level domains (TLDs): The top-level domain is the highest level in the
DNS hierarchy. There are a few hundred TLDs, such as .com, .net, and .org.
● Second-level domains (SLDs): The second-level domain is the second level in
the DNS hierarchy. SLDs are registered by organizations or individuals. For
example, the SLD for Google is "google" and the SLD for Amazon is
"amazon".
● Third-level domains (TLDs): The third-level domain is the third level in the
DNS hierarchy. TLDs are often used to identify specific departments or
divisions within an organization. For example, the TLD for Google's marketing
department is "marketing".

The DNS is a critical part of the internet. It allows users to easily access websites
and other resources by using domain names instead of IP addresses. The DNS is
also used by email servers to deliver email.

You might also like