0% found this document useful (0 votes)
24 views4 pages

DNS Query Types and Web Performance Analysis

Uploaded by

werelywerelyu
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)
24 views4 pages

DNS Query Types and Web Performance Analysis

Uploaded by

werelywerelyu
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

National University of Computer and Emerging Sciences

FAST School of Computing Spring-2024 Islamabad Campus

CS-3001: Computer Sessional-II Exam


Networks
Total Time: 1 Hour
BS(AI)-(J,K) Total Marks: 35
Date: 6th April, 2024
Course Instructor
Dr. Abid Rauf
INSTRUCTOR SOLUTION

Q1: DNS RECURSIVE QUERY [07 marks]


Assume that a user is trying to visit [Link], but his browser doesn't know the IP address of
the website. In this example, examine the difference between an
iterative and recursive DNS query.
a) Between steps 1 and 2, where does the Local DNS server check first?
Answer with 'User', 'DNS Local', 'DNS Root', 'DNS TLD', or 'DNS
Authoritative'.

DNS Root

b) Between steps 2 and 3, where does the root DNS forward the
request to? Answer with 'DNS Local', 'DNS Root', 'DNS TLD',
or 'DNS Authoritative'.

DNS TLD server

c) Between steps 4 and 5, where does the authoritative DNS


forward the response to? Answer with 'DNS Local', 'DNS Root', 'DNS TLD', or 'DNS Authoritative'.

DNS TLD

d) In steps 6-8, the response is sent back in the reverse direction until it reaches the user. What type of
DNS record is returned?

The DNS record received is type A (Type A is hostname:IP)

e) Which type of query is considered best practice and why? Iterative or Recursive?

Iterative is considered 'best practice' because it puts less strain on the Root and TLD DNS servers

Page 1 of 4
National University of Computer and Emerging Sciences
FAST School of Computing Spring-2024 Islamabad Campus
Q2: DNS AND HTTP DELAYS [08 marks]
Suppose within your Web browser you click on a link to obtain a Web page. The IP address for the
associated URL is not cached in your local host, so a DNS lookup is necessary to obtain the IP address.
Suppose that two DNS servers are visited before your host receives the IP address from DNS. The first
DNS server visited is the local DNS cache, with an RTT delay of RTT0 = 2 msecs. The second DNS
server contacted has an RTT1 of 26 msecs. Initially, let's suppose that the Web page associated with the
link contains exactly one object, consisting of a small amount of HTML text. Suppose the RTT between
the local host and the Web server containing the object is RTTHTTP = 1 msecs.
a) Assuming zero transmission time for the HTML object, how much
time (in msec) elapses from when the client clicks on the link until
the client receives the object?

The time from when the Web request is made in the browser until
the page is displayed in the browser is: RTT0 + RTT1 + 2* RTTHTTP
= 2 + 26 + 2*1 = 30 msecs.
Note that 2 RTTHTTP are needed to fetch the HTML object - one
RTTHTTP to establish the TCP connection, and then one RTTHTTP to
perform the HTTP GET/response over that TCP connection.

b) Now suppose the HTML object references 5 very small objects on the same server. Neglecting
transmission times, how much time (in msec) elapses from when the client clicks on the link until
the base object and all 5 additional objects are received from web server at the client, assuming non-
persistent HTTP and no parallel TCP connections?

The time from when the Web request is made in the browser until the page is displayed in the
browser is: RTT0 + RTT1 + 2* RTTHTTP + 2*5* RTTHTTP = 2 + 26 + 2*1 + 2*5*1 = 40 msecs
Note that two RTTHTTP delays are needed to fetch the base HTML object - one RTTHTTP to establish
the TCP connection, and one RTTHTTP to send the HTTP request, and receive the HTTP reply. Then,
serially, for each of the 5 embedded objects, a delay of 2* RTTHTTP is needed - one RTTHTTP to
establish the TCP connection and then one RTTHTTP to perform the HTTP GET/response over that
TCP connection.

c) Suppose the HTML object references 5 very small objects on the same server, but assume that the
client is configured to support a maximum of 5 parallel TCP connections, with non-persistent
HTTP.
Since there are only 5 objects, there's a delay of 28 msec for the DNS query, two RTTHTTP for the
base page, and 2*RTTHTTP for the objects since the requests for these can be run in parallel. The
total is 28 + 2 + 2 = 32 msec. As in 2 above, 2 RTTHTTP are needed to fetch the base HTML object
- one RTTHTTP to establish the TCP connection, and one RTTHTTP to send the HTTP request
and receive the HTTP reply containing the base HTML object. Once the base object is received at
the client, the 5 HTTP GETS for the embedded objects can proceed in parallel. Each (in parallel)
requires two RTTHTTP delays - one RTTHTTP to set up the TCP connection, and one RTTHTTP
to perform the HTTP GET/response for an embedded object.

Page 2 of 4
National University of Computer and Emerging Sciences
FAST School of Computing Spring-2024 Islamabad Campus
Q3: Look at the scenario below, where Alice sends an email to Bob. [8 marks]
Note: For the questions below, assume both Bob's and Alice's user agents use the POP3 protocol.
a) At point 2 in the diagram, what protocol is being used?

the SMTP protocol is used

b) At point 4 in the diagram, what protocol is being used?

the SMTP protocol is used

c) At point 6 in the diagram, what protocol is being used?

the POP3 protocol is used

d) Does SMTP use TCP or UDP?

TCP protocol

e) Is SMTP a 'push' or 'pull'


protocol?

'push' protocol

f) Is POP3 a 'push' or 'pull' protocol?

'pull' protocol

g) What port does SMTP use?

port 25

h) What port does POP3 use?

port 110

Page 3 of 4
National University of Computer and Emerging Sciences
FAST School of Computing Spring-2024 Islamabad Campus
Q4: In this problem, you'll compare the time needed to distribute a file that is initially located at
a server to clients via either client-server download or peer-to-peer download. [5+1+5+1 marks]
The problem is to distribute a file of size F = 4 Gbits to each of these 5 peers. Suppose the server has
an upload rate of u = 76 Mbps.
The 5 peers have upload rates of: u1 = 28 Mbps, u2 = 22 Mbps,
u3 = 24 Mbps, u4 = 25 Mbps, and u5 = 27 Mbps
The 5 peers have download rates of: d1 = 22 Mbps, d2 = 29
Mbps, d3 = 14 Mbps, d4 = 11 Mbps, and d5 = 17 Mbps
a) What is the minimum time (in seconds) needed to distribute
this file from the central server to the 5 peers using the
client-server model? Show complete working.

The minimum time needed to distribute the file = max of: N*F / US and F / dmin = 363.64 seconds.

b) For part a, what is the root cause of this specific minimum time? Answer as 's' or 'ci' where 'i' is the
client's number.

The root cause of the minimum time was c4

c) What is the minimum time (in seconds) needed to distribute this file using peer-to-peer download?
Show complete working.

The minimum time needed to distribute the file = max of: F / US, F / dmin, and N * F / sum of ui
for all i + uS = 363.64 seconds

d) For part c, what is the root cause of this specific minimum time: the server (s), client (c), or the
combined upload of the clients and the server (cu)

The root cause of the minimum time was c.

Page 4 of 4

Common questions

Powered by AI

SMTP is a "push" protocol because it actively sends emails from one server to another, delivering messages without the destination server needing to request them. This proactive mechanism contrasts with POP3, a "pull" protocol, where the client requests the server to download messages when the user checks the inbox. SMTP's design is inherently meant to transfer messages between servers, initiating actions to push emails forward through the mail network, while POP3 requires a manual or scheduled pull operation to retrieve emails from a server to a local device .

Iterative DNS queries offer the advantage of reducing individual server load, as each query is resolved stepwise, directing the client to the next server until the resolution is complete. This method can enhance resilience and scalability in high-traffic networks, as it distributes processing across multiple DNS servers and lessens the burden on root and TLD servers. However, iterative queries can increase latency for the client due to multiple requests, especially when there are many intermediate servers. This trade-off must be balanced against the benefits of lowered server strain and improved distributed workload management .

Non-persistent HTTP limits efficiency when using a single TCP connection because it requires opening a new connection for each object retrieval, introducing latency due to setup and teardown for each request/response cycle. The sequential nature of requests elongates the overall process, especially for web pages containing multiple objects. In contrast, using parallel TCP connections allows concurrent HTTP requests, markedly reducing download times by overlapping connection setups and data transfers, thereby utilizing network resources more effectively and cutting down times from 40 msec to 32 msec for 5 embedded objects .

Using multiple parallel TCP connections significantly reduces web page loading time when non-persistent HTTP is involved. In non-persistent HTTP, a separate TCP connection is needed for each HTTP request/response pair. By allowing multiple parallel connections, a client can simultaneously establish TCP connections to fetch multiple resources, such as embedded objects in a page, rather than waiting for each one sequentially. This parallelism reduces the overall delay to 32 msec when fetching the base HTML and 5 objects, compared to a sequential approach taking 40 msec. Thus, parallel connections maximize bandwidth utilization and minimize delay .

Under non-persistent HTTP connections, TCP's reliance on RTTs impacts latency as each object on a webpage requires a separate TCP handshake, consuming 2 RTTs each (one for connection setup and one for data transmission). This necessity results in greater overhead for multiple embedded objects. In contrast, persistent HTTP maintains a single TCP connection for multiple HTTP transactions, reducing RTT-induced latency by removing the need for repeated handshakes, thus streamlining the process and enhancing performance in web browsing .

In a non-persistent HTTP setup without parallel TCP connections, the retrieval time involves multiple round-trip times (RTT) for DNS and HTTP operations. With RTTs for local and external DNS totaling 28 msec and for HTTP at 1 msec, loading a base HTML object requires 28 + 2*1 = 30 msec. If the HTML references 5 objects, 2 RTTHTTP per object mean an additional 10 msec, leading to a total page load time of 40 msec .

In the client-server file distribution model, the effectiveness hinges on both the server’s and clients’ upload/download rates. The minimum distribution time is constrained by either the server’s capacity to serve files (upload rate) or the slowest client's download rate. In the given scenario, distributing a 4 Gbit file is limited by client 4’s download rate of 11 Mbps, determining the minimum time required at 363.64 seconds. This rate highlights how slower client speeds can bottleneck the entire distribution process, even when the server’s upload capabilities are sufficient .

Iterative DNS queries are generally considered 'best practice' as they distribute the load across the various DNS servers involved in the domain name resolution process. In an iterative query, each DNS server returns its best answer to the client, often directing the client to another DNS server, thus balancing the load. In contrast, recursive queries burden the initial DNS server with the task of resolving the entire query chain, increasing the server's load and potentially slowing down response times .

A recursive DNS query occurs when a DNS client requests the local DNS server to resolve a domain name completely. The local DNS server, acting as a client to other DNS servers, queries subsequent servers to resolve the domain name. When trying to access gaia.cs.umass.edu, the query first hits the DNS Root, from where it proceeds to the DNS TLD and eventually reaches the DNS Authoritative server. This path allows the DNS server to return the final IP address to the client without requiring the client to make additional steps. A recursive query involves more load on the DNS servers compared to iterative queries and is used where an answer is required directly from the DNS server queried, which, in turn, fetches the result from other DNS servers .

Peer-to-peer (P2P) file distribution is often more efficient than client-server models as it leverages the combined upload capacity of all clients. In a client-server model, file distribution is limited by the server's upload rate and the slowest client's download rate. Conversely, P2P allows files to be distributed among peers, reducing the overall upload burden on any single server and enhancing speed by utilizing the collective upload bandwidth of peers. With the given client upload rates, the minimum time for file distribution in both models is 363.64 seconds, highlighting P2P's ability to match the efficiency by maximizing shared resources, thus minimizing time .

You might also like