in Computer Networks
4,714 views
1 vote
1 vote
Suppose you needed to use HTTP to download a webpage with three embedded images. The total number messages saved between the client and server starting from initiates TCP connection to receive the third object and close connection when using persistent HTTP without pipelining instead of non-persistent HTTP are?
in Computer Networks
4.7k views

4 Comments

3 embeded image

so, 3 msg

Any solution given @ Shubhanshu

0
0

Firstly number of objects are 4.That are one base HTML file and 3 Images.So there are 4 request-response pair

A Web page (also called a document) consists of objects. An object is simply a file—such as an HTML file, a JPEG image, a Java applet, or a video clip—that is addressable by a single URL. Most Web pages consist of a base HTML file and several referenced objects. For example, if a Web page contains HTML text and five JPEG images, then the Web page has six objects: the base HTML file plus the five images. The base HTML file references the other objects in the page with the objects’ URLs.
 

Kurose & Ross

 Secondly I find following different solution

Interpretation 1: We are concerned with only total number of Application layer messages.

So in persistent HTTP without pipelining total messages are  ( 1 + 2*4 + 1) =10

1 HTTP client process msg to initiate TCP connection to server.

4 pair of req-response msgs = 8 msgs

1  HTTP client process msg to initiate close TCP connection to server.

In non-persistent total messages are  (4*6) =16

Each of the 4 objects need 4 msgs. ( 1 intiate TCP + 2 req-resp + 1 + initiate close TCP)

So the ans is 16-10=6.

Interpretation  2:  We are concerned with only total number of Transport layer segments send

So in persistent HTTP without pipelining total messages are  ( 2 + 2*4 + 2) =12

2 mgs to establish TCP connection establishment ( 3 way handshake )

4 pair of req-response msgs = 8 msgs

2 mgs to terminate TCP connection ( in this I am assuming Client's last request piggybanks FIN and next Server to Client msg piggybanks reponse with ack of client to server FIN and also server includes Server to client Fin.So this reduces 4 way handshake to terminate TCP connection to 2 msgs. I am not sure that it works this way.Any correction/ insight would be helpful :)  )

In non-persistent total messages are  (6*4) =24

So ans = 12

Interpretation 3: I don't know why but connection termination is not included.Like in mentioned answer https://gateoverflow.in/66837/made-easy-2017#. So this is interpretation2 without extra msgs for connection termination.Ans = (2+2)*4 - (2 + 2*4) = 6.

1
1

 https://gateoverflow.in/66837/made-easy-2017#

In this given link........for persistant HTTP without pipelining after the third object...i mean.. it receives the third object request and closes the connection there itself.....but how does the server know that the object requests are over??

only if the response goes to the client.....the client doesnt have any more request..therefore can close the connection right ?

0
0

2 Answers

0 votes
0 votes

PERSISTENT

Connection establishment---2

3 embedded images & ack--6

connection termination-------2

TOTAL MESSAGES = 10

NON-PERSISTENT

for 1st image-

Connection establishment---2

1 embedded images & ack--2

connection termination-------2

for 2nd image-

Connection establishment---2

1 embedded images & ack--2

connection termination-------2

for 3rd image-

Connection establishment---2

1 embedded images & ack--2

connection termination-------2

TOTAL MESSAGES = 18

MESSAGE SAVED = 18-10= 8

1 comment

Why are we not considering 3-way handshaking in TCP for connection establishment & rather taking 1 RTT only?
0
0
0 votes
0 votes

Ref : http://blog.catchpoint.com/2010/09/17/anatomyhttp/

Persistent http means, following events will occur while loading the page:

DNS resolution,

1 connection request message,

2 messages(request and load per object),

1 connection close message.

So, starting from TCP connection establishment: $1 + 2+2+2+ 1 = 8 messages$

4 Comments

don't know what pipelining here means?
0
0

for more information check out  this link nicely explained by @sachin Mittall

https://gateoverflow.in/66837/made-easy-2017#  for pipeline persistent http it will required 6 rtt

0
0
Is 6 correct ans?
0
0

@Shivansh Gupta

multiple Web pages residing on the same
server can be sent from the server to the same client over a single persistent TCP
connection. These requests for objects can be made back-to-back, without waiting
for replies to pending requests (pipelining).
 

Kurose & Ross 

0
0

Related questions

1 vote
1 vote
0 answers
4
Na462 asked in Computer Networks Jan 12, 2019
838 views
Na462 asked in Computer Networks Jan 12, 2019
by Na462
838 views