The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+2 votes
130 views

Consider Amit lives in Delhi, connected to the internet via a 100 Mbps connection retrieve a 250 KB webpage from server in Bangalore, where page contain 3  images of 500 KB each. Assume one way propagation delay is 75 ms and Amit’s access link is the bandwidth bottleneck for this connection. If T1 is the time taken for the page with images to appear on Amit’s screen using nonpersistent HTTP and T2 is time using persistent connection, then T = T1 – T2 will be ________  msec.

asked in Computer Networks by (95 points) | 130 views

2 Answers

+4 votes

Given data rate $= 100\space Mbps$

One way propagation delay  $= 75\space ms$
Round Trip Time $RTT = 2$ x One way propagation delay  $= 2$ x $75 ms\space = 150\space ms$

 

In $non-persistent\space HTTP$, we need one TCP connection each for $each\space object$ sent. Here, we have to send $4$ objects $\rightarrow\space$ $1\space$ base file (web page) and $3$ images. 

Client Action Server Action Time requred
Request Connection Accept Connection 1 RTT
Request Webpage

Accept Request

Send Web page

1 RTT

Receive Webpage

(Finds 3 objects)

Close connection Transmission Time
Request Connection Accept Connection 1 RTT
Request Image 1

Accept Request

Send Image1

1 RTT
Receive Image 1 Close connection Transmission Time
Request Connection Accept Connection 1 RTT
Request Image 2

Accept Request

Send Image 2

1 RTT
Receive Image 2 Close connection Transmission Time
Request Connection

Accept Connection

1 RTT
Request Image 3

Accept Request

Send Image 3

1 RTT
Receive Image 3 Close Connection Transmission Time

Thus, the total time is $T1 = 4* 2 RTT +$ Total Data Transmission time

Transmission time $= \frac{Amount\space of\space data}{Data\space Rate} = \frac{250 KB + 3 * 500 KB}{100\space Mbps }= \frac{(250*8 + 3*500*8) Kb}{100\space Mbps}$
    $=  \frac{(2000 + 12000) . 10^3 }{ 100 * 10^6} \space s = 140\space ms$

Now $T_1 = 4*2*150\space  ms+ 140\space ms = 1340\space ms$

 

$Persistent\space HTTP$ is the idea of using a single TCP connection to send and receive multiple HTTP requests/responses. All objects will be sent with a single request here. 

Client Action Server Action Time Required
Request Connection Accept Connection 1 RTT
Request Web page

Accept Request

Send Web page

1 RTT

Receive Web page

(Finds 3 objects)

Close connection Transmission Time
Request all objects

Accept Request

Send all objects

1 RTT
Receive all objects Close connection Transmission Time

So, total time here is $T_2 = 3* RTT +$ Total Data Transmission Time
        $= 3* 150\space ms + 140\space ms = 590\space ms$

 

Therefore $T_1 - T_2 = 1340\space ms - 590\space ms = 750\space ms$.

answered by Active (1.3k points)
0
in the persistent http , after establishing the tcp connection why can't we get the webpage as well as all the 3 images over this single connection so that t2=2*rtt + transmission time for the entire data ?
0
The base file (web page - html/txt) always has to be loaded first to allow some more exchanges between the client and the server before the needed resources are sent. for example

i) Cookies : Cookies are files containing user specific data like selections in a form, shopping cart contents, or authentication data stored in the $client\space  computer$. If the cookies are not already set, it is set by the cookie information the server sent along with the base file. The client sends this information also in the later requests. This is needed because otherwise the server has to keep different sets of web pages for different users.

ii) Web Cache : Web cache is a storage nearer to the client than the server. It is to load resources fast. Only after reading the base file the client know what resources are needed, and hence can make use of the web cache. If an updated cached version is found, client sends this information also along with the later request so that the server responds with blank. So if all the resources are sent by the server upfront, it simply increases the overhead, or the web cache will be useless.
+4 votes

For non persistent we have to make the connection request after every object while in Persistent we can view all object in one go.
Here the total transmission time is nothing but the transmission time of page with all three images. 

answered by Active (1.3k points)
0

Rally wonder explanation ..thanks @sumit

0
but their is small doubt in nonpersistent what for third transimission is ?
+1
Third transmission is requesting for the first object.
0
for first object or for base file..?
0
For first object, as it already connected with the basefile. Let's take example of internet banking, there you have to first connect with the base account by entering the login credentials. Once you are connected you have to enter the transition password for every transition (money transfer).
0
so response for base file comes in second RTT itself..isn't it?
0
Right


Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

39,437 questions
46,622 answers
139,340 comments
57,000 users