Professional Documents
Culture Documents
cs201219 Assignmnet 2
cs201219 Assignmnet 2
CS201219
6D
Question 1
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.
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.
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.