edited by
32,527 views
77 77 votes

Suppose in a web browser, you click on the $\textsf{www. gate-2023.in}\; \text{URL}$. The browser cache is empty. The $\text{IP address}$ for this $\text{URL}$ is not cached in your local host, so a $\text{DNS}$ lookup is triggered (by the local $\text{DNS}$ server deployed on your local host) over the $3$-tier $\text{DNS}$ hierarchy in an iterative mode. No resource records are cached anywhere across all $\text{DNS}$ servers.

Let $\text{RTT}$ denote the round trip time between your local host and $\text{DNS}$ servers in the $\text{DNS}$ hierarchy. The round trip time between the local host and the web server hosting $\textsf{www.gate-2023.in}$ is also equal to $\text{RTT}$. The $\text{HTML}$ file associated with the $\text{URL}$ is small enough to have negligible transmission time and negligible rendering time by your web browser, which references $10$ equally small objects on the same web server.

Which of the following statements is/are $\text{CORRECT}$ about the minimum elapsed time between clicking on the $\text{URL}$ and your browser fully rendering it?

  1. $7\; \text{RTT}$s, in case of non-persistent $\text{HTTP}$ with $5$ parallel $\text{TCP}$ connections.
  2. $5\; \text{RTT}$s, in case of persistent $\text{HTTP}$ with pipelining.
  3. $9\; \text{RTT}$s, in case of non-persistent $\text{HTTP}$ with $5$ parallel $\text{TCP}$ connections.
  4. $6\; \text{RTT}$s, in case of persistent $\text{HTTP}$ with pipelining.

5 Answers

105 105 votes

********************explanation behind 6 and 9 rtts***************************                           

                                           For persistent HTTP with pipelining

Persistent HTTP –  TCP Connection is Established only once and multiple files are transmitted in that single connection.

Pipelined – Pipelined means that a new HTTP request could be sent to server without receiving the Acknowledgment of previous request.

-------------------------------------------------------------------------------------------------------------------------------------------------

  1. The host will contact the DNS servers to Resolve the Domain Name and getting the IP address. This will take   3RTTs.

 

  1. Now, client Establishes TCP connection with the gate-2023.in server that will take 1RTT 

                                 *****The last Ack is sent on HTTP Request Packet (piggybakced) *****

 

  1. Client sends HTTP request to get the Base HTML file and receives it in 1RTT.                                                                            
  1. Finally Client sends HTTP requests( PIPELINED ) for objects and receives all 10 objects in 1RTT . 

Everything together :

 

3RTTs (dns) + 1RTT(TCP connection establishment) + 1RTT(Html Base file) + 1RTT(objects) = 6RTTs

                                               

 

                                     For non-persistent HTTP with 5 Parallel connections

non-Persistent – TCP connection is made for each HTTP request and then closed.

 

5 parallel connections – 5 objects could be sent parallelly at same time.


  1. 3RTTs for DNS resolution.                                                                                                                                                                                            
  2.  1RTT for TCP connection establishment.                                                                                                                                       
  3. 1RTT for getting HTML base file.                                                                                                                                                     
  4. 1RTT for establishing TCP Connection again.                                                                                                                                       
  5. 1RTT for getting 5 objects parallelly ( 5 left ).                                                                                                                                       
  6. 1RTT for establishing TCP connection again.                                                                                                                                       
  7. 1RTT for getting remaining 5 objects.

Everything together:

                                                                                                                                                                                                                 3RTTs (dns) + 3RTTs (TCP connection establishment) + 1RTT (HTML Base file) + 2RTTs ( objects ) = 9RTTs

edited by
38 38 votes

Answer: C, D

Persistent HTTP –  Multiple objects can be sent over a single TCP connection.

Non-Persistent – There can be at most one object that can be sent over a single TCP connection.

Persistent with pipeline

  1. 3 RTT for DNS Resolution (Given in Question 1st para)
  2. 1 RTT for TCP connection
  3. 1 RTT for HTTP Request & Reply (main HTML Page)
  4. 1 RTT for 10 small objects on the same web server( because of a pipeline)


The minimum elapsed time: 6 RTT

Non-persistent with 5 parallel TCP connections.

  1. 3 RTT for DNS Resolution (Given in Question 1st para)
  2. 1 RTT for TCP connection
  3. 1 RTT for HTTP Request & Reply (main HTML Page)
  4. 1 RTT for TCP connection
  5. 1 RTT for 5 small objects (parallel TCP connections).
  6. 1 RTT for TCP connection
  7. 1 RTT for other 5 small objects (parallel TCP connections).


The minimum elapsed time: 9 RTT

A similar type of question is in the standard book Computer Networking: A Top-Down Approach 6th Edition by Kurose & Rose

page no:173



Answer to this question:
https://cs.nyu.edu/~jcf/classes/CSCI-GA.2262-001/handouts/Homework2Solutions.pdf

edited by
2 2 votes

Is question mein humein total time (minimum elapsed time) nikalna hai. Question ke mutabiq sabhi RTT barabar hain.

Step 1: DNS Lookup Time

  • Humein 3-tier DNS hierarchy di gayi hai aur iterative mode ka use ho raha hai.

  • Kyuki cache empty hai, local DNS server ko 3 alag-alag servers (Root, TLD, Authoritative) se baat karni hogi.

  • Iska total DNS time hoga: 3 RTT.

Step 2: Connection and Base HTML

  • TCP connection establish karne ke liye: 1 RTT.

  • Base HTML file request aur receive karne ke liye: 1 RTT.

  • Ab tak total time: $3 + 1 + 1 = 5$ RTT.

Step 3: Fetching 10 Objects

Ab options ke hisaab se scenarios dekhte hain:

  • Case 1: Non-persistent HTTP with 5 parallel connections (Option A & C)

    • Yahan har object ke liye naya TCP connection chahiye.

    • Pehle batch mein 5 objects jayenge: $1\text{ (TCP)} + 1\text{ (Request)} = 2$ RTT.

    • Doosre batch mein baaki 5 objects: Fir se $2$ RTT.

    • Total: $5\text{ (pichla)} + 2 + 2 = 9$ RTT. (Option C sahi hai, A galat hai).

  • Case 2: Persistent HTTP with Pipelining (Option B & D)

    • Persistent mein TCP connection wahi rehta hai, naya connection nahi banana padta.

    • Pipelining ka matlab hai ki saare 10 objects ki request ek saath bheji ja sakti hai.

    • Saare 10 objects fetch karne mein sirf 1 RTT lagega.

    • Total: $5\text{ (pichla)} + 1 = 6$ RTT. (Option D sahi hai, B galat hai).

0 0 votes

Answer: (C) and (D) are correct
Given:

  • 3-tier DNS, iterative, no cache
  • 1 HTML + 10 objects
  • All RTT equal

Persistent vs Non-persistent:

TypeAfter fetching HTML, for more objects...
Non-persistentClose TCP, open new one (2 RTT each)
PersistentKeep TCP open, reuse it (1 RTT each)

Non-persistent, 5 parallel connections

StepRTT
DNS resolution3
TCP setup + HTML2
10 objects (2 batches × 2 RTT)4
Total9

 

Persistent + pipelining

StepRTT
DNS resolution3
TCP setup + HTML2
10 objects (all pipelined)1
Total6
Answer:
Position:
Show:

Related questions

36 36 votes
10 10 answers
28.4k
28.4k views
admin asked Feb 15, 2023
28,393 views
Suppose you are asked to design a new reliable byte-stream transport protocol like $\text{TCP}.$ This protocol, named $\textsf{myTCP}$, runs over a $100 \mathrm{~Mbps}$ n...
35 35 votes
3 3 answers
22.4k
22.4k views
admin asked Feb 15, 2023
22,444 views
Which of the following statements is/are $\text{INCORRECT}$ about the $\textsf{OSPF (Open Shortest Path First)}$ routing protocol used in the Internet?$\textsf{OSPF}$ imp...
33 33 votes
9 9 answers
29.0k
29.0k views
admin asked Feb 15, 2023
29,008 views
The forwarding table of a router is shown below.$$\begin{array}{|l|l|c|}\hline \textbf{Subnet Number} & \textbf{Subnet Mask} & \textbf{Interface ID} \\\hline 200.150 .0 ....
58 58 votes
9 9 answers
17.4k
17.4k views
admin asked Feb 15, 2023
17,443 views
Let $f: A \rightarrow B$ be an onto (or surjective) function, where $A$ and $B$ are nonempty sets. Define an equivalence relation $\sim$ on the set $A$ as\[a_{1} \sim a_{...