Computer Networks Huge Assignment (S-IV)
Computer Networks Huge Assignment (S-IV)
DNS, or Domain Name System, is a system that translates human-readable domain names into IP
addresses used by computers to identify each other on a network. It acts like a phone book for the
internet, making it easier for users to access websites without needing to remember numerical IP
addresses.
Need of DNS:
DNS is essential for several reasons:
Human-Readable Addresses:
People find it easier to remember domain names than numerical IP addresses. DNS translates
these names into IP addresses, making the internet more user-friendly.
Internet Navigation: DNS enables users to navigate the internet by providing a way to access
websites using familiar names. Without DNS, users would have to remember and input numerical
IP addresses for each site.
Dynamic IP Addresses:
Many websites and services have dynamic IP addresses that may change. DNS allows these
changes to happen transparently to users, as the domain name remains the same.
Load Balancing:
DNS can be used for load balancing, distributing incoming traffic across multiple servers to
ensure optimal performance and prevent server overloads.
Redundancy and Failover:
DNS can be configured to provide redundancy and failover. If one server is unavailable, DNS can
redirect traffic to an alternative server, improving overall system reliability.
In summary, DNS simplifies internet usage, enhances accessibility, and contributes to the stability
and efficiency of online services.
Operation Of DNS:
The Domain Name System (DNS) operates as follows:
Hostname Resolution Request: When a user enters a domain name in a web browser, the system
initiates a DNS resolution request to find the corresponding IP address.
Final Resolution:
The recursive resolver sends a query to the authoritative DNS server, which provides the IP
address associated with the specific domain name.
Caching:
The resolver caches the IP address locally for a specified time (TTL – Time to Live) to speed up
future requests for the same domain.
User Access:
Finally, the IP address is returned to the user’s device, allowing it to establish a connection with
the web server hosting the requested content.
This process ensures efficient and distributed resolution of domain names to IP addresses,
facilitating seamless navigation on the internet.
Data Communication:
HTTP enables the transfer of various types of data, including text, images, videos, and other
multimedia content, between a client (such as a web browser) and a server. This communication
is fundamental to the functionality of the web.
Client-Server Interaction:
It establishes a client-server model where a client (e.g., a web browser) sends requests to a
server, and the server responds with the requested data. This interaction forms the basis for how
users access and interact with content on the internet.
Stateless Protocol:
HTTP is stateless, meaning each request from a client to a server is independent, and the server
does not retain information about the client’s previous requests. To maintain continuity and
manage user sessions, technologies like cookies and sessions are often employed in conjunction
with HTTP.
Uniform Resource Identification: HTTP uses URLs (Uniform Resource Locators) to identify and
locate resources on the web. URLs specify the protocol (HTTP), the server’s address, and the
path to the specific resource.
Request Line:
Specifies the HTTP method (e.g., GET, POST), the target resource (Uniform Resource Identifier
– URI), and the HTTP version.
Example:
GET /path/to/resource HTTP/1.1
Headers:
Additional information about the request, such as the type of data the client can accept, the type
of data being sent (Content-Type), and more.
Example:
Host: www.example.com
Accept: text/html
Body (Optional):
This is where the client can include data, often used with methods like POST. It is not present in
all types of requests.
Example:
Name=John&age=25
Status Line:
Indicates the HTTP version, a status code indicating the outcome of the request, and a short
description of the status.
Example:
HTTP/1.1 200 OK
Headers:
Similar to request headers, providing additional information about the response, such as the
content type, server information, and more.
Example:
Content-Type: text/html
Server: Apache
HTTP conditional requests allow clients to make a request for a resource only if certain
conditions are met, reducing unnecessary data transfer and improving efficiency. Two common
conditional request headers are If-Match and If-None-Match.
HTTP/1.1 200 OK
ETag: “abc123”
Content-Length: 123
Content-Type: text/plain
Client caches the resource and its ETag. Next time, it sends a conditional request:
HTTP/1.1 200 OK
ETag: “xyz789”
Content-Length: 134
Content-Type: text/plain
HTTP/1.0:
HTTP/1.1:
HTTP/2:
Multiplexing: Supports multiple concurrent requests and responses on the same connection,
improving efficiency.
Header Compression: Introduces header compression to reduce overhead.
Server Push: Allows the server to push additional resources to the client before they are
explicitly requested.
Binary Protocol: Uses a binary protocol instead of plain text, enhancing performance.
HTTP/3:
Transport Protocol: Uses QUIC (Quick UDP Internet Connections) as the underlying transport
protocol, providing better performance than TCP.
Multiplexing: Similar to HTTP/2, it supports multiplexing for concurrent requests and responses.
Improved Security: Built on top of UDP with integrated encryption, improving security.
Reduced Latency: Aims to further reduce latency compared to previous versions, especially in
scenarios with high packet loss.
Each version brings improvements in terms of performance, efficiency, and additional features,
with HTTP/3 being the latest evolution in the series, emphasizing reduced latency and enhanced
security. The choice of which version to use depends on factors such as server and client support
and specific performance requirements.