The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+1 vote
52 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 (83 points) | 52 views

1 Answer

0 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.1k 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.


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

36,995 questions
44,570 answers
126,774 comments
43,636 users